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

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

11. 教你微信小游戏使用服务端gzip数据。 [ 82%]

...             str  +=  String.fromCharCode(arr[i]);       }   return toType === 'json' ? JSON.parse(decodeURIComponent(escape(str))) : decodeURIComponent(escape(str)); } //转换成byte  function fromCharCode(pakoData,toType = 'json'){   let converted = [], uintArray = new Uint16Array...

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

12. TS版本的官方示例,导出到玩一玩,在读写文件时能存不能读,读不出来,甚至直接读取会显示字符串里边有乱码。。。。 [ 81%]

...Data=function(){ if (!BK.FileUtil.isFileExist(LocalStorageAdpt.dataPath)){ return null; } try{ var dataO=BK.FileUtil.readFile(LocalStorageAdpt.dataPath); var jsonStr; jsonStr=dataO.readAsString(); console.log("jsonStr = " + jsonStr); return JSON.parse(jsonStr); }catch (e){ return null; } return null...

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

13. laya2.0 localStorage语法错误 [ 81%]

laya2.0 localStorage语法错误 Storage.getItem=function(key){ return Storage.support ? Storage.items.getItem(key):null; } Storage.getJSON=function(key){ return JSON.parse(Storage.support ? Storage.items.getItem(key):null); }?:不是js的写法吧... 2018-11-22 添加评论 免费帖 --> 分享 ...

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

14. 小游戏项目 加载有中文的json文件 报错 [ 80%]

...String { if (url.indexOf(".fnt") != -1 || url.indexOf("xxx.json") != -1) { return "utf8"; } else if (type == "arraybuffer") { return ""; } return "ascii"; }   2018-06-21 1 1 分享 微博 QZONE 微信 熊猫大侠 赞同来自: 好像中文有问题 英文没问题 2018-01-08 0 1 分享 微博 QZON...

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

15. Spine动画资源加载时不能同时使用"版本管理"和"URL.basePath" [ 76%]

...roto.onComplete=function(content){ if (this._isDestroyed){ this.destroy(); return; }; var tSkBuffer=Loader.getRes(this._skBufferUrl); if (!tSkBuffer){ this.event(/*laya.events.Event.ERROR*/"error","load failed:"+this._skBufferUrl); return; } //MODIFIED:使用formatPath进行路径过滤 this._path=t...

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

16. ts项目,微信小游戏3D, 加载3D模型,报错,pc端是正常的 [ 74%]

...(MiniAdpter,'laya.wx.mini.MiniAdpter'); MiniAdpter.getJson=function(data){ return JSON.parse(data); } 这里json解析报错,,麻烦看一下是什么问题,,, 附件里是个demo工程,可以重现的,, 1111.rar 3D模型fbx.rar   附件 : --> 2018-09-20 添加评论 免费帖 --> ...

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

17. [0]laya-zip让你的游戏加载速度提升350%!! [ 73%]

...在资源遍历的时候 直接过滤 if(rawPath.indexOf("__MACOSX")!=-1){return;};     2022-03-08 0 1 分享 微博 QZONE 微信 李尔 赞同来自: 1.0.8版本更新 laya-zip1.0.8 兼容了2d项目 另外增加了用例demo: https://github.com/lear315/layazip-demo 2022-04-14 0 1 分享 微...

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

18. 2.0.2发布的提取本地包不支持相对路径 [ 73%]

... if (config.packfile) { // 提取本地包(文件列表形式)         return gulp.src(config.packfileFullValue, { base: releaseDir })             .pipe(gulp.dest(workSpaceDir + "/" + config.packfileTargetValue || releaseDir + "_pack"));     } }); 2019-04-28 0 1 分享 微博 QZONE 微...

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

19. uglify压缩后的错误堆栈解析 [ 66%]

...ask("compressJs", ["compressJson"], function () { if (config.compressJs) { return gulp.src(config.compressJsFilter, { base: releaseDir }) .pipe(sourcemaps.init({loadMaps:true})) .pipe(uglify({ mangle: { keep_fnames:true } })) .pipe(sourcemaps.write(releaseDir + '/../sourcemaps')) .on('error', functi...

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

20. 关于laya无法缓存非图片、声音文件bug [ 66%]

...         if (fileObj == null)                 return null;             else                 return fileObj;             return null;         }   附件 : --> 2020-05-29 添加评论 免费帖 --> 分享 微博 QZONE 微...

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