大约有 620 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0041 秒)
Laya_社区(477) Laya2.0_文档(51) Laya3.0_api(50) Laya2.0_示例(16) Laya_示例(12) Laya3.0_文档(10) laya_api(2) Laya2.0_api(2)
...() { ape = new Sprite(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.x = (Laya.stage.width - texture.width) / 2; ape.y = (Laya.stage.height - texture.height) / 2; Laya.stage.addChild(ape); } function applayFilter() { //创建一个发光滤镜 var glowFilter = new GlowFilt...
来源: Laya_示例 发布时间: 20251130
...reLoaded)); })(); function onTextureLoaded() { maggotTexture = Laya.loader.getRes(texturePath); initMaggots(); Laya.timer.frameLoop(1, this, animate); } function initMaggots() { var maggotContainer; for (var i = 0; i wb.x + wb.width) x -= wb.width; if (y wb.y + wb.height) y -= wb.height; maggot.pos(...
来源: Laya_示例 发布时间: 20251130
...e = new Sprite(); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(apePath); this.ape.graphics.drawTexture(texture); this.ape.x = (Laya.stage.width - texture.width) / 2; this.ape.y = (Laya.stage.height - texture.height) / 2; } applayFilter() { // 创建一个发光滤镜 const GlowFil...
来源: Laya2.0_示例 发布时间: 20251130
...ey2Path, Laya.Handler.create(this, function () { let monkey2 = Laya.loader.getRes(monkey2Path); let ape2 = new Laya.Sprite(); Laya.stage.addChild(ape2); ape2.graphics.drawTexture(monkey2, 100, 0); })); } } new Sprite_DisplayImage();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage...
来源: Laya2.0_示例 发布时间: 20251130
...d界面的实现原理么? 我二进制资源load之后,为什么通过getRes获取不到。 Uncaught TypeError: Cannot read property 'load' of null 子域加载资源的时候报错什么原因?laya的load 已经加载完成了 但是微信还是报错。在子域工程 微信小游戏downLoa...
来源: Laya_社区 发布时间: 20180129
...s; //查看log,清理前资源一直在内存中 console.log(Laya.loader.getRes(asset)); //调用清理方法 Laya.loader.clearRes(asset); //查看log,清理后,资源被卸载 console.log(Laya.loader.getRes(asset)); sp.destroy(); 这些都测试过,没有消减 curmem。 图片 506*900 ...
来源: Laya_社区 发布时间: 20180622
...方可有解决方案,以下为示例代码: var sprite= Laya.loader.getRes(this._stlurl) as Laya.Sprite3D; this.skill = Laya.Sprite3D.instantiate(sprite); target.addChild(this.skill); this.Play(); 这种卡顿在PC谷歌浏览器上不明显,但手机上就很明显了,另外在IDE的lay...
来源: Laya_社区 发布时间: 20180425
...,, 加载一张图片,然后获取texture var texture = Laya.loader.getRes(url); 然后texture调用texture.destroy(true); 销毁图片, 那下次要使用该图片的时候,还需要重新加载吗,, 是不是我下次使用的时候,我可以直接去调用加载load( load里面...
来源: Laya_社区 发布时间: 20171226
...ape.graphics.clear(); ape.loadImage(textureUrl); var texture = Laya.loader.getRes(textureUrl); } })(); ``` 运行代码效果如动图2-2所示:  (动图2-2) ## 2 、用drawTexture方法显示与切换图片 ### 2.1 drawTexture API 概述 在API文档中搜索laya.display....
来源: Laya2.0_文档 发布时间: 20210715
...不是一开始调用的function里的一句 var tmpitem_t = Laya.loader.getRes('./comp/custom_assets/group0_0.png',);无论我把url改成什么,把这段代码放到哪里,安卓就会白屏,我甚至删掉了一些其他一些Laya.getloader.getRes,还是会白屏,而且不报错,PC...
来源: Laya_社区 发布时间: 20180709