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

大约有 2,782 项符合查询结果, 库内数据总量为 31,624 项。 (搜索耗时: 0.0068 秒)

431. 批量销毁释放内存(TypeScript-3D基础(TS)-LayaAir3D的内存管理) [ 83%]

...的销毁而一起销毁。这些残留下的资源需要分别使用`Laya.loader.getRes(url:String)`接口获取到资源(Resource)对象之后,再调用资源对象的`destroy()`方法进行销毁。但是这种方法是非常麻烦的。LayaAir2.0为了方便开发者,提供了`Resource.d...

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

432. 图层叠加的实现 [ 83%]

...叠加的实现 我用 var ape:Sprite = new Sprite(); var t:Texture = Laya.loader.getRes("res/bg.png"); ape.graphics.drawTexture(t,0,0); var t1:Texture = Laya.loader.getRes("res/wzq.png"); ape.graphics.drawTexture(t1,0,0); var t2:Texture = Laya.loader.getRes("res/rkfb.png"); ape.graphics.drawTexture...

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

433. web打包 [ 83%]

...   at Function._getSprite3DHierarchyInnerUrls (laya.d3.js:32159)     at Loader._onHierarchylhLoaded (laya.d3.js:32274)     at EventHandler.runWith (laya.core.js:1000)     at Loader.event (laya.core.js:1039)     at Loader.complete (laya.core.js:18862)     at Loader.onLoaded (laya.core.js:1...

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

434. 疑似clearRes内存泄漏问题 [ 83%]

...增。 【问题如下】: 问题1:clearRes释放资源之后,Laya.loader.load重新加载同一个资源为什么GPUMemory会不停的增加? 问题2:Laya.loader.clearRes之后,GPUMemory为什么不降低,如果clearRes不会释放内存,那这个接口的作用是什么? 【Demo...

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

435. 使用IDE生成图集后,无论使用图集下的某个小图 [ 82%]

...生成图集后,放到img/assets目录下 然后这样使用:   Laya.loader.load([{ url : 'http://localhost:3000/shoot/v2/img/assets/assets.json', type : Loader.ALTAS }], Handler.create(this, function () { var _getRes = Laya.loader.getRes('bg-toolbar.png'); console.log(_getRes); }));然后log...

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

436. 仅在Android微信小游戏下图片错乱 [ 82%]

...小游戏下图片错乱 static preLoadPublicAssets(){ this.sAssetList = 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....

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

437. 关于layaair中类的大小写规则有没有基本的说明文档 [ 82%]

...yaair中类的大小写规则有没有基本的说明文档 比如: Laya.loader.load("res/atlas/comp.json", Laya.Handler.create(null, onLoaded), null, Laya.Loader.ATLAS); Laya.loader.load(resArray, Laya.Handler.create(null,onLoaded)); loader与handler   2017-03-16 添加评论 免费帖 --> 分...

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

438. 显示与切换图片(JavaScript-LayaAir基础篇(JS)-位图) [ 82%]

...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load([texture1, texture2], Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { ape = new Sprite(); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.pos(200, 200); // 显示默认纹理 switchTextur...

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

439. 如何解析json文件并获取某对象值? [ 82%]

如何解析json文件并获取某对象值? private jsonParse() { Laya.loader.load("res/atlas/resTest0.json", Handler.create(this, this.onLoaded), null, Loader.JSON); } private onLoaded() { var json : JSON = Laya.Loader.getRes("res/atlas/resTest0.json"); var jsTx = JSON.stringify(json); } 已经...

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

440. 设置遮罩(ActionScript-LayaAir基础篇(AS3)-位图) [ 82%]

...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); } private function graphicsImg():void { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台...

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