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

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

341. 资源加载清除问题 [ 72%]

资源加载清除问题 Laya.loader.load(mapBit, Handler.create(this, onLoadCom)); 加载成功一个纹理后,用一个Sprite  graphics.drawTexture(e); 在加载成功方法里面写Loader.clearRes(mapBit, true); 会立刻清掉了纹理,Sprite上面也没有了。 如果在加载成功后...

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

342. 有没有Loader预加载 相关的注意事项或者文档 在手机上问题有点多 [ 72%]

...装到手机上 有时会发生异常 Laya.loader.load(skins, Laya.Handler.create(this, fGameLoad), Laya.Handler.create(this, onLoading, null, false), null, 1, true, sGameMark, false); Laya.loader.on(Event.ERROR, this, onError); 预加载资源添加了完成 进度 和失败监听  在手机上有...

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

343. UI-Tab [ 72%]

...ya.stage.bgColor = "#232628"; Stat.show(); Laya.loader.load(skins, Handler.create(this, this.onSkinLoaded)); } onSkinLoaded() { let tabA = this.createTab(skins[0]); tabA.pos(40, 120); tabA.labelColors = "#000000,#d3d3d3,#333333"; let tabB =this. createTab(skins[1]); tabB.pos(40, 220); tabB.labelColo...

来源: Laya2.0_示例 发布时间: 20251209

344. Sprite-切换纹理 [ 72%]

... this.flag = true; Laya.loader.load([monkey1Str, monkey2Str], Laya.Handler.create(this, this.onAssetsLoaded)); } onAssetsLoaded() { monkey1Res = Laya.loader.getRes(monkey1Str), monkey2Res = Laya.loader.getRes(monkey2Str); this.ape = new Laya.Sprite(); Laya.stage.addChild(this.ape); this.ape.pivot(55...

来源: Laya2.0_示例 发布时间: 20251209

345. version.json版本文件会加载缓存的,看了源码也没有忽略缓存 [ 72%]

...ion.type = type;             ILaya.loader.load(manifestFile, Handler.create(null, ResourceVersion.onManifestLoaded, [callback]), null, Loader.JSON);         } load没有设置忽略缓存   应该 static enable(manifestFile, callback, type = 2) {             ResourceVersion.type = t...

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

346. 1.6.2打包的图集不能使用 [ 72%]

...oader.load([{url: "res/atlas/longCard.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); 在onLoaded var textrue = Laya.loader.getRes(longcard/xxx.png)总是undedined。。。求解。。。 相关链接 : http://ask.layabox.com/question/486 图集打包出来没有prefix。。。get...

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

347. 关于ASTC使用问题和建议 [ 72%]

...是 let tex = new Laya.Texture(); tex.load("ui/guide01.png", Laya.Handler.create(this, ()=>{   this.img.texture = tex; }));   但是如果使用ASTC纹理时就会报错,需要使用异步的方式来处理         Laya.loader.load("ui/guide01.ktx", Laya.Handler.create(this, (res)=>{ ...

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

348. Sprite3D的克隆(JavaScript-3D基础(JS)-LayaAir3D之精灵) [ 72%]

...e3D&name=Sprite3DClone)) ```typescript { ...... //加载模型 Laya.loader.create("res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh", Laya.Handler.create(this, this.onComplete)); } //完成回调 onComplete() { //获取资源 var layaMonkey = this.scene.addChild(Laya.Loader.getRes("res/threeDimen/s...

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

349. app 的预加载问题 [ 72%]

...s/common.json","type":Loader.ATLAS}, ]; Laya.loader.load(resarray, Handler.create(this, this.preloadLoaded), Handler.create(this, this.onProgress,null,false)); 这个时候这个资源是通过app本地加载还是网上加载的? 2.dcc 有之前安装到手机上的app (a版本),后面服...

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

350. 设置cacheAs = bitmap时, drawCanvas 的一个bug [ 72%]

...src._targets上 /* this._submits[this._submits._length++] = SubmitCanvas.create(src, 0, null); _curSubmit = SubmitBase.RENDERBASE; //画出src._targets //drawTexture(src._targets.target.getTexture(), x, y, width, height, 0, 0); */ //应用并清空canvas中的指令。如果内容需要重画,Rend...

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