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

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

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

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

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

62. Error: 代码包大小为 5533 kb,上限为 4096 kb,请删除文件后重试? [ 75%]

...一个测试代码,压根就没有功能。 class Main { constructor() { console.log(Laya.Browser.width, Laya.Browser.height); this.current = { x: 0, y: Laya.Browser.height }; // Laya.stage.bgColor = "#3F51B5"; this.sp = new Laya.Sprite(); Laya.stage.addChild(this.sp); } render() { console.log("re...

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

63. hitTestPoint对象父容器rotation旋转之后检测不了碰撞 [ 75%]

...ish.y = 200 this.addChild(_fish); Laya.timer.loop(100, this, function () { console.log(_fish.x, _fish.y, _fish.width, _fish.height, _fish.rotation); if (_fish.hitTestPoint(_fish.x, _fish.y)) { console.log("hittttttt"); } }); } } //程序入口 Laya.init(600, 400); this.onLoaded() function onLoaded()...

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

64. 摄像机的viewportPointToRay报错 [ 75%]

...计产生射线方法,通过2D坐标获取与屏幕垂直的一条射线 console.log( PanelMgr.mainCamera); PanelMgr.mainCamera.viewportPointToRay(this.pointRay, this.ray); (this.owner as Laya.Scene3D).physicsSimulation.rayCast(this.ray,this.hitresult); console.log(Laya.MouseManager.instance.mouse...

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

65. 截屏文件没有保存 [ 75%]

...程是:https://ldc.layabox.com/doc/?nav=zh-js-7-2-7 if( window.conch ) { console.log("i'm here 1"); window.conch.captureScreen(function(arrayBuff,width,height){ conch.saveAsPng(arrayBuff,width,height,conch.getCachePath()+"/test.png" ); console.log("i'm here 2:" + arrayBuff.byteLength + " " + width +...

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

66. 小游戏环境下 声音的缓存机制导致更换声音文件失败 [ 74%]

...        return;             }             console.log(url);             if (MiniAdpter.autoCacheFile && MiniFileMgr.getFileInfo(url)) {                 console.log('from cacheFile');                 this.onDownLoadCa...

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

67. tiledmap有时尺寸不正确 [ 74%]

...ewPort(this._mViewPortX, this._mViewPortY, Browser.width, Browser.height); console.log(`ViewPort=${this._mViewPortX},${this._mViewPortY},${Browser.width},${Browser.height}`); console.log(`Map=${this._mTiledMap.width},${this._mTiledMap.height}`); if(++this._mTest === 2){ console.log("the second call....

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

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

69. 微信授权,获取用户信息的接口实现方法,wx.createUserInfoButton [ 74%]

...                   code= res.code;                     console.log("登陆成功,获取到code")                 }                 var button = wx.createUserInfoButton(                 {                     type: 'text',                  ...

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

70. 当使用代码创建打开场景时,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_社区 发布时间: 20190218