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

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

161. Laya.SoundManager.playSound 无法播放出音效 [ 75%]

...不能正常播放,也没有任何错误提示 然后尝试先调用Laya.loader.load("sfx/hit01.mp3",new Laya.Handler(this,this.onBgmComplete),null,Laya.Loader.SOUND);然后在onBgmComplete的回调里面再调用播放,就会提示 [warn]Retry to load: sfx/hit01.mp3 [error]Failed to load: sfx/h...

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

162. clearUnLoaded的bug LayaAirIDE1.7.9 [ 75%]

... arr = [res.popup.atlas("loadingUI"), res.download.bg("bg5")]     Laya.loader.load(arr, Laya.Handler.create(this, onComplete))     Laya.loader.clearUnLoaded()     Laya.loader.load(arr, Laya.Handler.create(this, onComplete)) }  function onComplete(){     trace("complete") } Resources...

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

163. 显存优化:纹理压缩的使用(TypeScript-2D进阶篇(TS)-性能优化) [ 75%]

...载纹理资源,如果要使用纹理压缩格式,则需要使用`Laya.loader.load()`来加载纹理资源。 示例代码如下所示: ```typescript //检测安卓平台 if (Laya.Browser.onAndroid) { //注意这里的加载 Laya.loader.load("res/layabox.ktx", Laya.Handler.create(null, functio...

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

164. 设置遮罩(TypeScript-LayaAir基础篇(TS)-位图) [ 75%]

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

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

165. 不带格式后缀的图片无法成功加载 [ 75%]

...lstatp-toutiao.com/obj/ad.union.api/e285dd263aee2e8f7b302fa8d139de4c' Laya.loader.load(url, Laya.Handler.create(this, () => { let picTemp = Laya.Loader.getRes(url); console.log(picTemp.width) // undefined let nodee = new Laya.Sprite() nodee.texture = picTemp nodee.width = 500 nodee.height = 250 n...

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

166. 小游戏内 个别手机出现图片花了 像马赛克一样的东西,很多图片不显示 [ 75%]

...dData = [ { "url": 'res/atlas/main.atlas', "type":Laya.loader.ATLAS }, { "url": 'res/atlas/newUser.atlas', "type":Laya.loader.ATLAS }, { 'url': "res/atlas/role_skin.atlas", "type":Laya.loader.ATLAS }, { 'url': "res/atlas/number.atlas&q...

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

167. Loader.BUFFER的问题 [ 75%]

Loader.BUFFER的问题 我现在要下载一个解压包进行解压,采用的是以下语句: Laya.loader.load("config.zip", Laya.Handler.create(this, this.configLoaded,["config.zip"]), null, Laya.Loader.BUFFER, 1, true)   private configLoaded(url):void {     var data:Object = Laya.loader.get...

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

168. uuu提问也不会有人回答,撤 [ 75%]

...不是充值成为VIP后在论坛中的提问官方才会有人回复 Laya.loader.create 不会反馈失败状态跟描述不符合 菜鸟提问:请问使用LayaAir的话,AS3原生类以及一些第三方库完全不能用是吗? 调用 Laya.MiniAdpter.downLoadFile缓存文件之后。再调...

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

169. laya底层的加载为什么可以new两次 [ 74%]

laya底层的加载为什么可以new两次 laya.net.Loader.as  第222行 new HTMLImage.create(url, {onload: onload, onerror: onerror, onCreate: function(img:*):void { image = img; //增加引用,防止垃圾回收 imgCache[url] = img; }}); 这里的调用create本身就是返回一个对象了...

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

170. [LayaAir3]自定义字体在移动浏览器不起作用 [ 74%]

...在移动浏览器就显示不了。我在项目启动之初使用了Laya.loader.load预加载字体,PC浏览器日志显示字体被加载了,移动浏览器有报错。     Laya.loader.load({ url: respath.font_SemiBold, type: Laya.Loader.TTF }, Laya.Handler.create(this, (obj: object) => {...

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