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

大约有 4 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0034 秒)

1. 定时器 · LayaAir3.4 · 引擎文档 · LAYABOX [ 100%]

...Image.alpha = 0.5; }) } } 1.2 定时重复执行 (基于帧率) Laya.timer.frameLoop,定义如下: /** * 定时重复执行(基于帧率)。 * @param delay 间隔几帧(单位为帧)。 * @param caller 执行域(this)。 * @param method 定时器回调函数。 * @param args 回调参数。 * @p...

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

2. 3D变换 · LayaAir3.4 · 引擎文档 · LAYABOX [ 75%]

...void { //设置定时器执行,定时重复执行(基于帧率) Laya.timer.frameLoop(1, this, this.animate); } private animate(): void { // 旋转立方体(四元数) this.cube.transform.rotate(this.rot, false, false); } } 旋转的效果如动图2-1所示: (动图2-1) 2.2 localRotationEul...

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

3. 实体组件系统 · LayaAir3.4 · 引擎文档 · LAYABOX [ 61%]

...ation: Laya.Vector3 = new Laya.Vector3(0, 0.01, 0); onStart() { Laya.timer.frameLoop(1, this, ()=> { this.cube.transform.rotate(this.rotation, false); }); } } 效果如动图4-4所示: (动图4-4) 4.1.3 3D节点的进阶使用 @property( { type :Laya.Sprite3D } ) //节点类型 public p3d: ...

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

4. 动画状态机 · LayaAir3.4 · 引擎文档 · LAYABOX [ 54%]

...this.animator.crossFade("Run", 0.1); //等待动画播放完成 Laya.timer.frameLoop(1,this,()=>{ //如果当前播放state已经播放完了一次 if(this.animator.getControllerLayer(0).getCurrentPlayState().normalizedTime >= 1){ //回到站立状态 this.animator.crossFade("Stand", 0.1); Lay...

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