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

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

361. 资源加载(TypeScript-3D基础(TS)-LayaAir3D之资源加载) [ 85%]

...我们可以用加载器预加载。 ​ 2D游戏资源我们是用**Laya.loader.load()**方法预加载,而3D资源必须用Laya.loader.create()这个方法。在加载完成后,我们就可以直接使用**Laya.loader.getRes()**这个方法来获取加载完成的资源。请参考的相关的...

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

362. 【紧急】clearRes清理缓存后,再加载图片会有延时显示问题 [ 85%]

...缓存后,再加载图片会有延时显示问题 我想咨询一下: loader.clearRes()清理指定资源地址的缓存后,用loader.load 加载不回来了吗?为何再次加载同一图片显示时有延迟?   http://m.infinistudio.cn/test/nestle/ 点击1,再点击2, 再点击1...

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

363. 求一个downloadfile的使用教程 [ 85%]

...e这个接口是从远端下载文件到手机磁盘,然后你使用Laya.loader.load加载你下载的文件存到引擎的资源对象里,然后你在调用Loader.getRes来获取即可。 2018-09-04 0 1 分享 微博 QZONE 微信 幽默的黑色 赞同来自: 下载后,Laya.loader.load加载...

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

364. 性能测试-虫子(慎入) [ 85%]

...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

365. 滤镜-发光滤镜 [ 85%]

...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

366. Sprite-显示图片 [ 85%]

...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

367. layaAir支持xml加载和使用吗 [ 85%]

...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

368. LayaAir 如何读取资源中的txt文件中的内容 [ 85%]

...的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

369. 使用IDE制作的动画在pc模拟器播放OK在手机端不显示 [ 85%]

...画在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

370. Texture引用计数不为0的时候执行销毁纹理destroy方法后再加载这个资源会导致重复加载 [ 85%]

...      }             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