大约有 10 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0056 秒)
...距离。 * @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_文档 发布时间: 20251010
...始点颜色 * @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_文档 发布时间: 20251010
...节点也跟随移动 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_文档 发布时间: 20251010
...//调整方向 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
...动插值参数值 public camDepthSmooth: number = 20 public curpos: Laya.Vector3; private delatpos: Laya.Vector3; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 * 此方法为虚方法,使用时重写覆盖即...
来源: Laya3.0_文档 发布时间: 20251010
... colorIndex); } } private _getRandomPosition(positionRanvge: number): Laya.Vector3 { let getRangeRandom = () => { return (Math.random() - 0.5) * positionRanvge; } return new Laya.Vector3(getRangeRandom(), 0.3, getRangeRandom()); } } shader代码如下: Shader3D Start { type:Shader3D name:PBRCol...
来源: Laya3.0_文档 发布时间: 20251010
...移速度越快。 (动图1-2) angulaVelocity属性的值是3维向量Vector3类型值,Bullet使用欧拉角来描述物体的旋转,3D向量的每个分量代表绕x、y、z轴旋转的速度,单位是弧度/秒。动图1-2,就是在x轴分别设置了3.14与31.4的对比效果。 angul...
来源: Laya3.0_文档 发布时间: 20251010
...型 装饰器属性标识的类型支持引擎对象类型(例如:Laya.Vector3、Laya.Sprite3D、Laya.Camera等)、自定义的对象类型(需要标记@regClass())、以及TS语言的基本类型。 2.5.1 引擎对象类型 引擎对象类型的理解比较简单,暴露组件属性之...
来源: Laya3.0_文档 发布时间: 20251010
...mation动画节点添加动画脚本,添加的代码如下: ... import Vector3 = Laya.Vector3; ... export class AnimationScript extends Laya.AnimatorStateScript { ... private model: Laya.Sprite3D; /**@internal */ setPlayScriptInfo(animator: Laya.Animator | Laya.Animator2D, layerindex: number, pl...
来源: Laya3.0_文档 发布时间: 20251010
... { //注意这里面的属性不要使用到Laya引擎里的类型,比如Vector3这些,是不可以的 Editor.typeRegistry.addTypes([ { name: "MyTestSettingsType", properties: [ { name: "option1", type: "boolean", default: true }, { name: "option2", type: "string", default: "", } ] } ]); Editor....
来源: Laya3.0_文档 发布时间: 20251010