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

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

1. 2D自由形态光 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...灯光旋转动画 this.lightComp.lightRotation += this.rotateSpeed * Laya.timer.delta / 1000; // 实现灯光缩放动画 this.scaleTime += Laya.timer.delta / 1000 * this.scaleSpeed; const scale = 1 + Math.sin(this.scaleTime) * 0.5; // 增加缩放变化幅度 this.lightComp.lightScale.setValue(sca...

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

2. 2D方向光 · LayaAir3.3 · 引擎文档 · LAYABOX [ 72%]

... } onUpdate(): void { // 更新时间 this.dayTime = (this.dayTime + Laya.timer.delta / 1000) % this.dayDuration; const totalMinutes = Math.floor((this.getAdjustedProgress()) * 24 * 60); const hours = Math.floor(totalMinutes / 60); const minutes = totalMinutes % 60; const timeString = `${this.padNum...

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

3. 使用3D精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 40%]

... * 监听键盘事件 */ onUpdate(): void { var elapsedTime: number = Laya.timer.delta; if (!isNaN(this.lastMouseX) && !isNaN(this.lastMouseY) && this.isMouseDown) { Laya.InputManager.hasKeyDown(87) && this.moveForward(-this.speed * elapsedTime);//W Laya.InputManager.hasKeyDo...

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