大约有 114 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0032 秒)
...rLoader.enable = true; //加载引擎需要的资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, () => { alert("onLoaded!"); }), null, Laya.Loader.ATLAS, 1, true, null, false, true); useWorkerLoader参数设为true后,文件加载不成功? 附件 : --> Demo.zip 2019...
来源: Laya_社区 发布时间: 20190111
...ed(null); return; } 而type 是 atlas __proto.onLoaded=function(data){ //add by yeyq, 检查是否正在下载,避免网页reload this.event("progress",0); var type=this._type; if (type=...
来源: Laya_社区 发布时间: 20200427
请问如何释放atlas和他的png资源 很头疼 得不到名字啊! 请问这个有什么规律吗 坐等! private function clickFun():void { url = "res/CH/atlas/MORNUI_Z_Gongneng.atlas"; Laya.loader.load(url,new Handler(this,hh)); //trace( Laya.loader.getRes(url) ); } private function hh()...
来源: Laya_社区 发布时间: 20171206
...AssetList = Loader.getRes("file_list.json") Laya.loader.load("res/ui/share@atlas0.png", Handler.create(this, this.onLoaded), null, Loader.IMAGE, 1, true, null, true) } static onLoaded(res){ console.log("public assets inited !!!!") console.log(Laya.loader.getRes("res/ui/share@atlas0.png"))//此处会...
来源: Laya_社区 发布时间: 20180609
...引擎 Laya.init(800,600); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas",Handler.create(this,onLoaded)); } private function onLoaded():void { //实例化Panel组件 var panel:Panel = new Panel(); //给panel添加背景色 panel.graphics.drawRect(0,0,100,100,"#ffcccc"); //给panel...
来源: Laya2.0_文档 发布时间: 20210715
...引擎 Laya.init(800, 600); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, this.onLoaded)); } private onLoaded(): void { //实例化Panel组件 var panel: Laya.Panel = new Laya.Panel(); //给panel添加背景色 panel.graphics.drawRect(0, 0, 100, 100, "#ff...
来源: Laya2.0_文档 发布时间: 20210715
...引擎 Laya.init(800, 600); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { //实例化Panel组件 var panel = new Laya.Panel(); //给panel添加背景色 panel.graphics.drawRect(0, 0, 100, 100, "#ffcccc"); //给panel设置...
来源: Laya2.0_文档 发布时间: 20210715
... 我先加载一个图集,然后执行销毁 Laya.loader.clearRes("res/atlas/mainTown.json"); 但内存并没回收,查看代码也执行了销毁过程,但内存就没没减下来。 还有个问题: 如果只是加载资源,不添加到显示对象上,内存是不是不好增加呀 ...
来源: Laya_社区 发布时间: 20170415
...ive = new Array(); alive.push({url:"res/FGUIMain/Common_atlas0.png", type:Laya.Loader.IMAGE}); Laya.loader.load(alive, Laya.Handler.create(this, this.LoadFinish)); } private LoadFinish(success:boolean):void { if(suc...
来源: Laya_社区 发布时间: 20210618
...作。代码如下: var xhr = new XMLHttpRequest(); xhr.open("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload =...
来源: Laya3.0_文档 发布时间: 20230303