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

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

121. 视频 · LayaAir3.3 · 引擎文档 · LAYABOX [ 64%]

...频纹理 */ @regClass() export class Script extends Laya.Script { declare owner: Laya.Sprite3D; @property(Laya.Scene3D) private scene: Laya.Scene3D; private videoPlane: Laya.Sprite3D; private videoTexture = new Laya.VideoTexture(); onAwake(): void { //获取场景中要添加视频纹理的3D节点...

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

122. [LayaAir3]3D场景里面鼠标感应区域 3.2.1跟3.3不同 [ 63%]

....spRole.texture.sourceHeight = Laya.stage.height; //添加2D精灵, this.owner.addChild(this.spRole); this.spRole.pos(0, 0); this.spRole.size(Laya.stage.width, Laya.stage.height); }); 2025-01-09 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定,...

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

123. 动画加载完成的监听是怎样写? [ 63%]

...样写? let fly = Laya.Pool.getItemByCreateFun("fly", this.fly, this); owner.addChild(fly); fly.play(0, true, "ani1");   fly() { let ani = new Laya.Animation(); ani.loadAnimation("plaen4.ani"); return ani; }   这样写是可以正常播放,但是会有这个警告 ani not found: plaen4.ani#an...

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

124. [LayaAir3]clickHandler只会执行一次,之后点击不再触发 laya.3.0.9 [ 63%]

...                let btn:Laya.Button = LayaUtil.GetChildByPath(this.owner, "CreatePanel/BtnCreate");                 btn.clickHandler = Laya.Handler.create(this, this.onClickCreate)                 this.drawGrid();     }      onClickCreate()     {         // ()=>...

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

125. [LayaAir3]给box设置filters,里面的spine无效或者无法显示 [ 63%]

...updateWorldTransform(); this.spineItem.render(this._currentPlayTime); this.owner.repaint(); } layabox • 2024-11-09 14:19 @136*****142:我们是用你的示例工程实测没问题的,可能是你不太会弄,给搞错了。那你联系右下角的引擎客服微信,要一个内部的安装...

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

126. Shader预编译解决方案 [ 63%]

...= Shader3D._debugShaderVariantInfo;     var debugSubShader = this._owner;     var debugShader = debugSubShader._owner;     var deugDefines = ShaderPass._debugDefineString;     //将defineDatas抓换成宏定义数组     Shader3D._getNamesByDefineData(compileDefine, de...

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

127. 如何通过代码控制prefab上面的时间轴动画animation? [ 63%]

...作。 ... ani_show:Laya.FrameAnimation; onAwake(){ this.ani_show = this.owner["play"] as Laya.FrameAnimation; // 在onAwake中添加播放完成事件,基于某些原因,可能在onDisable的时候被移除,如果发现异常,可以选择在onEnable里面添加事件 this.ani_show.on(Laya.E...

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

128. 设置后box2d 的 worldRoot 后平移场景 物理世界原地不动 [ 63%]

...能吗,这样可以 onAwake() { const self = this; self.gameObj = self.owner as Laya.Sprite; Laya.Physics.I.worldRoot = self.gameObj; this.cameraRect = new Laya.Rectangle(0, 0, 2000, 1000); this.gameObj.scrollRect = this.cameraRect; } onUpdate() { this.cameraRect.x = this.target.x - 400; this.came...

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

129. bug,ChainCollider.points第二次设置,会报错! [ 63%]

...s._started) { this._started = true; this.enabled = true; } var ground=this.owner.getChildByName("ground");            //****新增代码*****, ground.addComponent(Laya.ChainCollider);                       //****新增代码*****, this._chains=ground.getComponent(Laya.ChainCo...

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

130. 进度条组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 63%]

...is.progressBar.changeHandler = new Laya.Handler(this, this.onChange); this.owner.addChild(this.progressBar); Laya.timer.loop(100, this, this.changeValue); }); } // 模拟进度条加载 private changeValue(): void { if (this.progressBar.value >= 1) this.progressBar.value = 0; this.progressBar.val...

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