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

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

521. 使用 loader.create 预加载模型后。必须要在回调 Laya.Event.HIERARCHY_LOADED 中获取子元素吗?预加载是预加载的什么部分? [ 73%]

使用 loader.create 预加载模型后。必须要在回调 Laya.Event.HIERARCHY_LOADED 中获取子元素吗?预加载是预加载的什么部分? 使用 loader.create 预加载模型后。必须要在回调 Laya.Event.HIERARCHY_LOADED 中获取子元素吗? 预加载是预加载的什么...

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

522. Laya2.2.0,官方demo,Iphone Xs Max 14.0 锁屏小游戏卡死 [ 73%]

...de里面停止掉引起bug的代码 window['wx'].onShow((res) => { this.event(AppEvent.onShow, res); this.appStatus = AppEvent.onShow; console.log(this.appStatus, '---------'); Laya.stage.renderingEnabled = true//恢复渲染 Laya.updateTimer.resume() //恢复onUpdate Laya.timer.resume(); //恢...

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

523. Layabox的event方法在云真机与脚本录制中会报错?(与微信官方联系过,觉得是引擎自身问题) [ 73%]

Layabox的event方法在云真机与脚本录制中会报错?(与微信官方联系过,觉得是引擎自身问题) this.resetBtn.event(Laya.Event.CLICK);   该代码会引发Layabox在云真机与脚本录制中出现以下两种报错,而在正常运行过程中,不会出现该错误...

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

524. on和off的bug [ 73%]

on和off的bug 是这样的,我写了类似这样的代码a.on(Laya.Event.MOUSE_DOWN, this, onStartDrag); 之后我想去掉拖动,就写了a.off(Laya.Event.MOUSE_DOWN, this, onStartDrag); 但发现不行,于是我改成a.offAll(); 就可以了。 需要说明的是onStartDrag是函数内定...

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

525. 纹理加载时,drawTexture方法报错 [ 73%]

...理加载时,drawTexture方法报错 if (!tex.loaded){ tex.once(/*laya.events.Event.LOADED*/"loaded",this,this._textureLoaded,[tex,args]); }drawTexture方法最下方有上面这一段代码,作用大概是第一加载失败时,再重新加载一遍。本来是挺好的,但是tex.once却会...

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

526. 摄像机捕捉目标(JavaScript-3D基础(JS)-LayaAir3D之Camera) [ 73%]

...0, 1, 0); ``` ```typescript //点击事件 this.changeActionButton.on(Laya.Event.CLICK, this, function(){ this.index++; if (this.index % 3 === 1 ){ //摄像机捕捉模型目标 this.camera.transform.lookAt(this.box.transform.position, this._up); } else if (this.index % 3 === 2){ //摄像机捕捉...

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

527. 改变位置后,点击区域不生效了 [ 73%]

...点击区域不生效了 package { import laya.display.Sprite; import laya.events.Event; import laya.renders.Render; public class MoveTest { public function MoveTest() { Laya.init(600,600); var sp:Sprite = new Sprite(); sp.autoSize=true; sp.graphics.drawRect(0,0,100,100,"#ff0000"); sp.on(Event.CLICK...

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

528. 陀螺仪与加速计 · LayaAir3.3 · 引擎文档 · LAYABOX [ 73%]

...e.height); Laya.stage.addChild(this.info); Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, this.onDeviceorientation); } private onDeviceorientation(absolute: Boolean, rotationInfo: Laya.RotationInfo): void { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta :" + Math.floo...

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

529. TS setExternalLinkEx問題 [ 73%]

...nimationFrame(render); } window.requestAnimationFrame(render); document.addEventListener('touchstart',()=>{ if(Browser.window.conch){ var l = 50; var t = 50; var w = window.innerWidth-l*2; var h = window.innerHeight-t*2; Browser.window.conch.setExternalLinkEx('http://www.layabox.com',l,t,w,h,true...

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

530. 陀螺仪与加速计(TypeScript-LayaAir基础篇(TS)-硬件设备相关) [ 73%]

...e.height); Laya.stage.addChild(this.info); Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, this.onDeviceorientation); } private  onDeviceorientation(absolute: Boolean, rotationInfo: Laya.RotationInfo): void { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta :" + Math.f...

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