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

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

1. 3D变换 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...距离。 * @param isLocal 是否局部空间。 */ translate(translation: Vector3, isLocal: boolean = true): void { if (isLocal) { Matrix4x4.createFromQuaternion(this.localRotation, Transform3D._tempMatrix0); Vector3.transformCoordinate(translation, Transform3D._tempMatrix0, Transform3D._tempVector...

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

2. 网格像素线 · LayaAir3.3 · 引擎文档 · LAYABOX [ 96%]

...始点颜色 * @param endColor 结束点颜色 */ addLine(startPosition: Vector3, endPosition: Vector3, startColor: Color, endColor: Color): void { (this._render as PixelLineRenderer).addLine(startPosition, endPosition, startColor, endColor); } 3.3 Tool.linearModel() 通常我们可以利用addLine(...

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

3. 3D基础显示对象 · LayaAir3.3 · 引擎文档 · LAYABOX [ 90%]

...his.scene.addChild(box); // 设置位置 box.transform.position = new Laya.Vector3(2.0, 0.25, 0.6); box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); /* 球体 */ let sphere = new Laya.Sprite3D; let sphereMesh = sphere.addComponent(Laya.MeshFilter); let sphereRender = sphere.addCompone...

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

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

...节点也跟随移动 this.layaMonkeyParent.transform.translate(new Laya.Vector3(-0.2, 0, 0); (动图3-2) 通过点击按钮,让子节点移动,可以看到父节点并没有移动 this.layaMonkeySon.transform.translate(new Laya.Vector3(-0.2, 0, 0); 四、克隆 关于克隆,LayaAir3D中...

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

5. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 82%]

...//调整方向 this.layaMonkey.transform.lookAt(this._tarPosition, this._upVector3, false); //因为资源规格,这里需要旋转180度 this.layaMonkey.transform.rotate(this._rotation2, false, false); //调整位置 Tween.to(this._finalPosition, { x: this._position.x, y: this._position.y, z: thi...

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

6. 组件属性的代码使用 · LayaAir3.3 · 引擎文档 · LAYABOX [ 81%]

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

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

7. 3D灯光与阴影 · LayaAir3.3 · 引擎文档 · LAYABOX [ 81%]

...的范围 pointCom.range = 3.0; pointLight.transform.position = new Laya.Vector3(0.0, 1, 0.0); 三、DirectionLight Direction Light(平行光)与点光区别较大,它有固定的一个方向,可通过弧度值设定,并且也没有衰减和光照范围,会对全场景所有模型进行...

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

8. 使用3D摄像机 · LayaAir3.3 · 引擎文档 · LAYABOX [ 76%]

...动插值参数值 public camDepthSmooth: number = 20 public curpos: Laya.Vector3; private delatpos: Laya.Vector3; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 * 此方法为虚方法,使用时重写覆盖即...

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

9. 缓动 · LayaAir3.3 · 引擎文档 · LAYABOX [ 68%]

... 缓动属性的类型支持不仅限于number,还新增了对Vector2、Vector3、Vector4、Color、Point以及字符串形式颜色值的支持。新的Tween对象设计得非常轻量,因此默认不重用,以避免因对象重用而引发的问题。此外,新系统不再使用Handler,...

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

10. 3D物理编辑 · LayaAir3.3 · 引擎文档 · LAYABOX [ 59%]

...移速度越快。 (动图1-2) angulaVelocity属性的值是3维向量Vector3类型值,Bullet使用欧拉角来描述物体的旋转,3D向量的每个分量代表绕x、y、z轴旋转的速度,单位是弧度/秒。动图1-2,就是在x轴分别设置了3.14与31.4的对比效果。 angul...

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