大约有 82 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0039 秒)
...= Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件被激活后执行,此时所有节点...
来源: Laya3.0_文档 发布时间: 20251010
...date(normalizeTime: number): void { const sp = this.playStateInfo.animator.owner as Laya.Sprite; sp.graphics.repaint(); } } 修改后的完整源码见附件。 LayaTest2.zip 2025-10-27 0 0 分享 微博 QZONE 微信 lv 赞同来自: layabox 崩溃问题会在3.3.3版本修复 2025-10-17 1 0 分享 ...
来源: Laya_社区 发布时间: 20251010
...t():void { trace("onStart"); } override public function onUpdate():void { (owner as Sprite3D).transform.rotate(rotation, false); } override public function onLateUpdate():void { trace("onLateUpdate"); } } ``` 这样脚本就添加完成了,我们可以看下运行之后的效果: (...
来源: Laya2.0_文档 发布时间: 20210714
...访问访问私有成员。 示例如下: let animator: Animator = this.owner.getChildAt(0).getComponentByType(Animator) as Animator; let clipNames: string[] = animator["_clipNames"]; 来个点赞吧!!!鄙视官方的不作为! 2018-04-26 3 2 分享 微博 QZONE 微信 w1114367261 赞同...
来源: Laya_社区 发布时间: 20180425
...orldRoot為當前容器 Laya.Physics.I.worldRoot = <Laya.Sprite>this.owner; } 雖然寫在onEnable畫面一開始會閃一下,但運作都正常,感謝回應
来源: Laya_社区 发布时间: 20181215
...点被添加到舞台后 onEnable(): void { let a = this.owner.getChildByName("Sprite3D") as Laya.Sprite3D; console.log(a,typeof(a)) let aa = a.addComponent(Laya.Rigidbody3D); } 报错 TypeError: Cannot read properties of undefined (reading &apo...
来源: Laya_社区 发布时间: 20240102
...用parent去做转换,把代码下面这样也行: const pos = (this.owner as Laya.Sprite).localToGlobal(new Laya.Point(0, 0)); 2025-08-15 1 1 分享 微博 QZONE 微信 Recovery 赞同来自: ??? 2025-08-12 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题...
来源: Laya_社区 发布时间: 20250528
...riteTransform, avatarWorldMatrix, avatarWorldMatrix); Matrix4x4.multiply((_owner as Sprite3D)._transform.worldMatrix, avatarWorldMatrix, spriteWorldMatrix); 138*****175 • 2017-09-06 11:38 @我觉得挂空节点是可以省的吧?如果可以省,少了一层,也算是优化吧? 183*****755 ...
来源: Laya_社区 发布时间: 20170904
...建完毕,此方法只执行一次 onAwake(): void { let sprite = this.owner as Laya.Sprite; //sprite.cache = true; this._temp = new Laya.Sprite(); this.owner.scene.addChild(this._temp); this.findCompents(this._allAgent, sprite.scene, Nav2DAgent); } onMouseClick(evt: Laya.Event): void { let pos = ...
来源: Laya3.0_文档 发布时间: 20251010
...1 新建个3D项目 2 在main.ts start里写 let camera:Laya.Camera = this.owner as Laya.Camera; let renderTexture:Laya.RenderTexture = camera._getRenderTexture(); let out:Uint8Array = new Uint8Array(50 * 28 * 4); let pixels:Uint8Array = await renderTexture.getDataAsync(0, 0, 50, 28, out) as Uint8Ar...
来源: Laya_社区 发布时间: 20250916