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

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

1. 关于laya图片资源缓存的问题 增量更新文件缓存 [ 100%]

...icPrefix = (url:string) :string => { if (staticHash[`images/${url}`]) { return staticHash[`images/${url}`] } return `images/${url}` }然后资源导出的时候使用gulp生成文件hash 这样增量更新方式比整个替换文件夹要来的舒服const gulp = require('gulp') const hash = requi...

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

2. 二次开发(TypeScript-LayaNative原生服务-LayaNative进阶) [ 98%]

...tic String testString(String value) { Log.d("JSBridge", "java: " + value); return "LayaBox"; } public static double testNumber(double value) { Log.d("JSBridge", "java: " + value); return 512; } public static boolean testBool(boolean value) { Log.d("JSBridge", "java: " + value); return value ? false ...

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

3. 二次开发 · LayaAir3.3 · 引擎文档 · LAYABOX [ 96%]

...tic String testString(String value) { Log.d("JSBridge", "java: " + value); return "LayaBox"; } public static double testNumber(double value) { Log.d("JSBridge", "java: " + value); return 512; } public static boolean testBool(boolean value) { Log.d("JSBridge", "java: " + value); return value ? false ...

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

4. 2.3.0beta 各种bug [ 93%]

... this._style = SpriteStyle.create()             }             return this._style;         }     core.js vivo下getJSON报错兼容 static getJSON(key) {                         if(Storage.support){                 var obj = Storage.items.getItem(key);       ...

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

5. socket大型项目回调 [ 88%]

...= {}; } else { msg = msg || {}; } route = route || msg.route; if(!route) { return; } this.reqId++; if(this.reqId>127){ this.reqId = 1; } var reqId = this.reqId; console.log("request"+msg); if(Pomelo.DEBUG){ console.group("REQUEST:"); console.info("Route:",route); console.log("Id:",reqId); console...

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

6. 微信小游戏,又是json编码的问题 [ 86%]

...]/, "");//替换一个看不见的特殊字符                 return JSON.parse(data);         } 但是这个方法也只是暂时的,这个也不知道是引擎的bug还是微信的bug 2018-01-04 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...

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

7. Laya.loader加载BUG [ 85%]

...url){             this.onLoaded(null);             return;         }   而type 是 atlas   __proto.onLoaded=function(data){         //add by yeyq, 检查是否正在下载,避免网页reload         this.event("progress",0);          var t...

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

8. 读本地文件必须是ASCII编码 [ 85%]

...ter.getUrlEncode=function(url,type){ if(url.indexOf(".fnt")!=-1) return "utf8"; else if(type=="arraybuffer") return ""; return "utf8"; // return "ascii"; } 现在Json转ASCII是有问题,但如果把这个函数重写,改为return utf8...

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

9. 【经验分享】如何让ts项目支持装饰器语法,以及自动化发布相关的一些东西 [ 82%]

...Location(err, pos, curSource, id); err.id = id; err.hook = 'transform'; // return pluginContext.error(err); },该方法虽然可以解决 tslib 找不到的问题,并且编译后输出的文件可以正常运行,但是也屏蔽了其他错误,如果代码中有其他错误,最终输出的文...

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

10. 发布微信小游戏json格式问题 [ 82%]

...String { if (url.indexOf(".fnt") != -1 || url.indexOf("xxx.json") != -1) { return "utf8"; } else if (type == "arraybuffer") { return ""; } return "ascii"; } 2018-02-05 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起...

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