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

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

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

...ight);  Laya.stage.addChild(this.info);  Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, onDeviceorientation); function onDeviceorientation(absolute, rotationInfo) { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta :" + Math.floor(rotationInfo.beta) + '\n' + "gamma:" ...

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

522. 3D中的Animator如何从指定的某一帧开始播放动画 [ 73%]

...); animator.addClip(totalAnimationClip,"runShoot",startFrame); animator.on(Event.STOPPED, this, this.removeClip); animator.on(Event.COMPLETE, this, this.removeClip); animator.play("runShoot"); 2018-07-26 0 1 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 这个要在unity 里面进行切片,...

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

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

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

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

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

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

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

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

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

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

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

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

528. 摄像机捕捉目标(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

529. 陀螺仪与加速计 · LayaAir3.4 · 引擎文档 · 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

530. 改变位置后,点击区域不生效了 [ 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