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

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

1. 动画状态机详解 · LayaAir3.0文档 · LAYABOX [ 100%]

...index: number, playstate: Laya.AnimatorState | Laya.AnimatorState2D) { ... this.model = animator.owner as Laya.Sprite3D;//得到Cube节点 } ... /** * 动画状态退出时执行。 */ onStateExit(): void { console.log("动画退出了"); //平移操作 let position = new Vector3(1, 1, 1); this.mode...

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

2. 模型与动画的导入使用 · LayaAir3.0文档 · LAYABOX [ 98%]

...("girl/girl.lh").then(res => { let girl : Laya.Sprite3D = res.create(); this.scene3D.addChild(girl); //获得Animator this._animator = girl.getComponent<Laya.Animator>(Laya.Animator); }); this.on( Laya.Event.MOUSE_DOWN, this, this.switchAni ); } switchAni(): void { if (this._isRun) { //播...

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

3. 内置骨骼动画 · LayaAir3.0文档 · LAYABOX [ 94%]

...en((templet: Laya.Templet) => { //创建模式为1,可以启用换装 this.mArmature = templet.buildArmature(0); this.mArmature.x = 300; this.mArmature.y = 350; this.mArmature.scale(0.5, 0.5); this.owner.addChild(this.mArmature); //设置动画播放完成后,调用completeHandler继续播放...

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

4. 使用3DUI · LayaAir3.0文档 · LAYABOX [ 90%]

...@regClass() export class BloodBar extends BloodBarBase { onAwake(): void { this.bar.value = 1; this.value.visible = false; Laya.stage.on( Laya.Event.CLICK, this, this.onHurt ); } onHurt(): void { this.bar.value = this.bar.value - 0.1; this.value.y = 35; this.value.visible = true; Main.instance.anima...

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

5. 3D粒子编辑模块 · LayaAir3.0文档 · LAYABOX [ 71%]

... ret; } //粒子特效初始化 private Init(file_path:string): void { if (this._isInited) { return; } this._filePath = file_path; console.log("Particle3D"); //从拿到的粒子系统克隆一个 var res = Laya.loader.getRes(file_path); var particle = res.clone(); this._particle = particle; //获...

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

6. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 67%]

...通过下面的代码,可以初始化A*的地图数据 //读取地形图 this.aStarMap = Loader.getTexture2D("res/threeDimen/scene/TerrainScene/Assets/AStarMap.png"); //获得地图数据 var aStarArr = this.createGridFromAStarMap(this.aStarMap); //使用astar初始化地图数据 this.graph = new...

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