大约有 2,781 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0065 秒)
Laya_社区(2462) Laya2.0_文档(107) Laya3.0_文档(58) Laya_示例(52) Laya3.0_api(51) Laya2.0_示例(43) laya_api(4) Laya2.0_api(4)
...我们可以用加载器预加载。 2D游戏资源我们是用**Laya.loader.load()**方法预加载,而3D资源必须用Laya.loader.create()这个方法。在加载完成后,我们就可以直接使用**Laya.loader.getRes()**这个方法来获取加载完成的资源。请参考的相关的...
来源: Laya2.0_文档 发布时间: 20210715
...缓存后,再加载图片会有延时显示问题 我想咨询一下: loader.clearRes()清理指定资源地址的缓存后,用loader.load 加载不回来了吗?为何再次加载同一图片显示时有延迟? http://m.infinistudio.cn/test/nestle/ 点击1,再点击2, 再点击1...
来源: Laya_社区 发布时间: 20190312
...e这个接口是从远端下载文件到手机磁盘,然后你使用Laya.loader.load加载你下载的文件存到引擎的资源对象里,然后你在调用Loader.getRes来获取即可。 2018-09-04 0 1 分享 微博 QZONE 微信 幽默的黑色 赞同来自: 下载后,Laya.loader.load加载...
来源: Laya_社区 发布时间: 20180904
...ng, Laya.stage.width + padding * 2, Laya.stage.height + padding * 2); Laya.loader.load(texturePath, Handler.create(this, onTextureLoaded)); })(); function onTextureLoaded() { maggotTexture = Laya.loader.getRes(texturePath); initMaggots(); Laya.timer.frameLoop(1, this, animate); } function initMaggot...
来源: Laya_示例 发布时间: 20251209
...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(apePath, Laya.Handler.create(this, this.setup)); } setup() { this.createApe(); this.applayFilter(); } createApe() { const Sprite = Laya.Sprite; this.ape = new Sprite(); Laya.stage.addChild(this.ape); let texture =...
来源: Laya2.0_示例 发布时间: 20251209
...hild(ape); ape.loadImage(monkey1Path); // 方法2:使用drawTexture Laya.loader.load(monkey2Path, 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...
来源: Laya2.0_示例 发布时间: 20251209
...1 个回复 cuixueying 赞同来自: 代码如下package { import laya.net.Loader; import laya.utils.Handler; public class XmlDemo { public function XmlDemo() { Laya.init(550,400); Laya.loader.load("data.xml",Handler.create(this,onLoaded),null,Loader.XML); } private function onLoaded():void { // TOD...
来源: Laya_社区 发布时间: 20160914
...的txt文件中的内容 var testPath ="res/Test.txt"; console.log( Laya.loader.load(testPath)); console.log(Laya.Loader.getRes(testPath)); 这里打印的是 LoaderManager {retryNum: 1, retryDelay: 0, maxLoader: 5, _loaders: Array(4), _loaderCount: 1…} undefined 并不是文本的内容,求支...
来源: Laya_社区 发布时间: 20171009
...画在pc模拟器播放OK在手机端不显示 loaded : function(){ this.loader = Laya.loader; this.loader.retryNum = 0;//无加载重试 this.urls = ['imgdebris/imgdebris.atlas','imgdebris/p1_slj.png',]; // this.loader.load(this.urls[0], Laya.Handler.create(this, this.onAssetloaded)); this.loader.l...
来源: Laya_社区 发布时间: 20190117
... } if (this.url && this===Laya.loader.getRes(this.url)) Laya.loader.clearRes(this.url); } } laya 2.0.2源码在Texture的 referenceCount不等于0的情况执行这个清理bitmap不会destroy但...
来源: Laya_社区 发布时间: 20190704