• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 395 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0046 秒)

391. 3D灯光与阴影 · LayaAir3.0文档 · LAYABOX [ 27%]

...为创建多光源的代码 代码参考“引擎API使用示例” export class MultiLight extends BaseScript { constructor() { super(); } onAwake(): void { var moveScript: LightMoveScript = this.camera.addComponent(LightMoveScript); var moverLights: Laya.Sprite3D[] = moveScript.lights; var offsets...

来源: Laya3.0_文档 发布时间: 20240624

392. 一篇上手LayaAir的3D物理引擎(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 25%]

... ```typescript /** * TypeScript语言的3D脚本示例 */ export default class TSDemo extends Laya.Script3D { constructor() { super(); } } ``` > 2D脚本与3D脚本不要混用,如果是用IDE创建的脚本模板,需要将继承的2D脚本类(Laya.Script)改为3D脚本类(Laya.Script3D)...

来源: Laya2.0_文档 发布时间: 20210715

393. 使用3D摄像机 · LayaAir3.0文档 · LAYABOX [ 22%]

...的移动,摄像机的位置也同步移动,代码如下: const { regClass, property } = Laya; @regClass() export default class CameraControll extends Laya.Script { @property( { type: Laya.Sprite3D } ) public target: Laya.Sprite3D; private camera: Laya.Camera; public distanceUp: number = 0.5;/...

来源: Laya3.0_文档 发布时间: 20231214

394. 时间轴动画编辑详解 · LayaAir3.0文档 · LAYABOX [ 21%]

...在脚本中监听到事件和参数了,脚本代码如下: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; constructor() { super(); } event1(p1:any, p2:any): void { console.log("event1",p1,p2); } } 在脚本中创建eve...

来源: Laya3.0_文档 发布时间: 20230519

395. 通用发布 · LayaAir3.0文档 · LAYABOX [ 17%]

...脚本, (图2-22) 然后在脚本中添加如下代码: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执...

来源: Laya3.0_文档 发布时间: 20240926