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

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

31. 多线程worker(JavaScript-2D进阶篇(JS)-游戏加载策略) [ 80%]

...e.currentTarget.response; self.postMessage(data); } xmlreq.open("get","res/atlas/comp.json"); xmlreq.send() }, false); ``` 这个例子是在worker中进行加载文件,加载完毕传给主进程,运行这个例子可以在浏览器控制台看到数据输出来。 `var myWorker = new Worker("m...

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

32. 多线程worker(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 79%]

...e.currentTarget.response; self.postMessage(data); } xmlreq.open("get","res/atlas/comp.json"); xmlreq.send() }, false); ``` 这个例子是在worker中进行加载文件,加载完毕传给主进程,运行这个例子可以在浏览器控制台看到数据输出来。 `var myWorker = new Worker("m...

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

33. 微信小游戏图片加载不出来 [ 79%]

...r.IMAGE }, { url: "ui/BG/load.png", type: Laya.Loader.IMAGE }, { url: "res/atlas/comp.atlas", type: Laya.Loader.ATLAS }, { url: "res/atlas/ui.atlas", type: Laya.Loader.ATLAS }, ]; Laya.loader.load(resArray, Laya.Handler.create(this, this.onLoaded)); Laya.loader.create("ui/BG/play-bg.png", Laya.Handl...

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

34. 隐藏默认的虚拟键、屏蔽APP窗口弹出脚本错误信息 的问题 [ 79%]

... or false return false; } function LoadRes() { var resArray = [ {url: "res/atlas/comp.json",type: Laya.Loader.ATLAS}, {url: "res/atlas/newhfh.json",type: Laya.Loader.ATLAS}, {url: "res/atlas/newhfh2.json",type: Laya.Loader.ATLAS}, ]; Laya.loader.load(resArray, Laya.Handler.create(null, LoadResComple...

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

35. 游戏资源加载问题! [ 79%]

...a - 知识达人 赞同来自: 改下这行代码: Laya.loader.load("res/atlas/Skill/Skill_1001.json",Handler.create(this,onAssetLoaded),null,Laya.Loader.ATLAS); 你没有给资源加载完成的回调,资源的后缀也错了,应该是Loader.ATLAS,你少了一个Loader   多个图集的话...

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

36. 微信小游戏 支持热更新吗? [ 79%]

...coding:encoding}中readyUrl用的是绝对路径(如http://10.10.10.69/res/atlas.comp.png),而不是相对于项目根目录的相对路径(如res/atlas/comp.png),导致的结果就是在查找缓存文件中有数据时(MiniFileMgr.getFileInfo(url)),部分地方用的绝对路径(MiniImage中)...

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

37. 火狐浏览器上webgl异常 [ 79%]

...享 微博 QZONE 微信 阿龙 赞同来自: [error]Failed to load: res/atlas/comp.atlas myLayaPricticeAll.max.js:16597:5 lose skin comp/button.png  Error: WebGL warning: texSubImage2D: Texture has not been initialized prior to a partial upload, forcing the browser to clear it. This may be slow....

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

38. 多线程worker(ActionScript-2D进阶篇(AS3)-游戏加载策略) [ 78%]

...e.currentTarget.response; self.postMessage(data); } xmlreq.open("get","res/atlas/comp.json"); xmlreq.send() }, false); ``` ​ 这个例子是在worker中进行加载文件,加载完毕传给主进程,运行这个例子可以在浏览器控制台看到数据输出来。 `var myWorker = new Worke...

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

39. 图片放在assets根目录下无法被引用成功,必须放到一个文件夹中 [ 78%]

... 肯定对这个图集做了预加载了 var resArray = [ {url:"res/atlas/comp.json", type: Laya.Loader.ATLAS}, {url:"res/atlas/assets.json", type: Laya.Loader.ATLAS} ]; Laya.loader.load(resArray, Laya.Handler.create(null,LoadResComplete)); cuixueying • 2017-03-21 16:15 好的...

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

40. 关于stage的size问题 [ 77%]

...ALE_NOSCALE; // Laya.stage.size(6000, 6000); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Laya.Handler.create(this, this.onLoaded)); function onLoaded(): void { var sprite = new Laya.Sprite(); sprite.loadImage('comp/bg.png'); Laya.stage.addChild(sprite); } 上面这段代...

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