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

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

61. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 58%]

...= 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

62. [LayaAir3]3.3.2与设置组件灰显相关的 Bug 和 Crash [ 57%]

...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

63. Sprite3D添加组件或脚本(ActionScript-3D基础(AS3)-LayaAir3D之精灵) [ 57%]

...t():void { trace("onStart"); } override public function onUpdate():void { (owner as Sprite3D).transform.rotate(rotation, false); } override public function onLateUpdate():void { trace("onLateUpdate"); } } ``` 这样脚本就添加完成了,我们可以看下运行之后的效果: ![](img/2.gif)(...

来源: Laya2.0_文档 发布时间: 20210714

64. Animator 如何获取当前所有动画名称呢?或者所有的AnimationClip呢? [ 57%]

...访问访问私有成员。 示例如下: 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

65. 使用ScrollRect捲動物理世界,貼圖錯位問題 [ 55%]

...orldRoot為當前容器 Laya.Physics.I.worldRoot = <Laya.Sprite>this.owner; } 雖然寫在onEnable畫面一開始會閃一下,但運作都正常,感謝回應

来源: Laya_社区 发布时间: 20181215

66. [LayaAir3]addComponent(Laya.Rigidbody3D); 报错 [ 55%]

...点被添加到舞台后     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

67. [LayaAirIDE3]3.3 新版ui 元素处于滚动区域内,localToGlobal坐标转换异常,没有加上滚动值 [ 55%]

...用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

68. 挂载物体的3D变换问题 [ 54%]

...riteTransform, avatarWorldMatrix, avatarWorldMatrix); Matrix4x4.multiply((_owner as Sprite3D)._transform.worldMatrix, avatarWorldMatrix, spriteWorldMatrix); 138*****175 • 2017-09-06 11:38 @我觉得挂空节点是可以省的吧?如果可以省,少了一层,也算是优化吧? 183*****755 ...

来源: Laya_社区 发布时间: 20170904

69. 2D寻路 · LayaAir3.3 · 引擎文档 · LAYABOX [ 54%]

...建完毕,此方法只执行一次 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

70. [LayaAir3]调用renderTexture.getDataAsync且同时勾选camera的hdr或msaa,webgl必报错 [ 53%]

...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