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

大约有 965 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0067 秒)

191. 当使用代码创建打开场景时,onOpened触发了,但场景active和activeInHierarchy还是处于false,请问纯代码怎么实现场景创建激活,谢谢 [ 74%]

...谢谢?   const scene = new Laya.Scene(); scene.onOpened = () => { console.log('scene onOpened'); }; scene.open(); console.log('scene', scene.active, scene.activeInHierarchy); Laya.timer.frameOnce(10, this, () => {   console.log('scene 2', scene.active, scene.activeInHierarchy); });   日...

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

192. setSubPixels画布擦除不掉 [ 74%]

...tSubPixels画布擦除不掉 this.btn.label = Math.random().toString(); // console.log(Math.random()); let tex:Laya.Texture = Laya.Loader.getRes(this.bUrl); let x:number = this._testStatus == true ? 0:50;//Math.random()>0.5 ? 50 : 0; this._testStatus = !this._testStatus; // let canvasInfo = this....

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

193. [LayaAirIDE3]Laya.loader.on(Event.ERROR, this, this.onError) 无法侦听到加载资源失败 [ 74%]

...ate onAssetLoaded(): void     {         // 使用texture         console.log("加载结束");     }      // 加载进度侦听器     private onLoading(progress: number): void     {         console.log("加载进度: " + progress);     }      private onError(err: string):...

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

194. 请问老师为什么我按照官网的实例播放音频没反应呢? [ 74%]

...); Laya.stage.addChild(button); return button; } function onPlayMusic(e) { console.log("播放音乐"); SoundManager.playMusic("../../res/sounds/bgm.mp3", 1, new Handler(this, onComplete)); } function onPlaySound(e) { console.log("播放音效"); SoundManager.playSound("../../res/sounds/btn.mp3", 1,...

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

195. 二进制文件打包后,读取不到zip包内的文件 [ 74%]

...     let getres = Laya.loader.getRes(item)             console.log('getres',getres) //这个返回undefined          })) 附件 : --> testLaya3d.zip 2021-06-04 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的...

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

196. 关于裁剪的问题 [ 74%]

... 0, loginUI.bbbar.height) Game.timer.loop("progress", this, function() { //console.log("loginUI.bar.value = ", loginUI.bar.value); loginUI.bbbar.viewport.width = loginUI.bbbar.viewport.width + 0.2 //console.log("loginUI.bbbar.viewport.width = ", loginUI.bbbar.viewport.width); }, 1000, 100); 2017-09-...

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

197. 怎么对动画进行毎帧侦听? [ 74%]

...e);   function _OnComplete() {   var bounds = ani.getGraphicBounds();   console.log(bounds.width);   console.log(bounds.height); } 这样的话获取动画宽高  还是只会取到第一帧宽高  并没有办法取到毎帧的宽高 2017-07-04 添加评论 免费帖 --> 分享 微博 QZONE ...

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

198. Box绑定事件失效 [ 74%]

...23456123456 赞同来自: 代码部分: this.room_top1 = new Laya.Box(); console.log(this.room_top1) this.room_top1.on("click",this,function(){console.log("11111111111")});   2017-11-16 0 0 分享 微博 QZONE 微信 Monica - 知识达人 赞同来自: 你输出下box的宽高,看看是否有...

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

199. zip更新模式缓存是怎么读取的?? [ 74%]

... onEvent('downloadOK'); //let md5 = calcmd5(fs_readFileSync(localfile)); //console.log('md5='+md5); let zip = new ZipFile(); if(zip.setSrc(localfile)){ zip.forEach((id,name,dir,sz)=>{ if(!dir){ let buf = zip.readFile(id); //console.log("update "+name); let fid = window.appcache.hashstr('/'+name);...

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

200. 关于Laya.Quaternion.createFromAxisAngle旋转角度不正确的问题 [ 74%]

...,newdir2)          //结果不与向量dir2重合         console.log(dir2);         console.log(newdir1);         console.log(newdir2);     }     // 向量夹角     public Angle(ma, mb) {         var v1 = (ma.x * mb.x) + (ma.y * mb.y) + (ma.z * ...

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