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

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

71. 问一下这个问题要怎么改啊? [ 73%]

... addPic(str:String, x:int, y:int) { picUrl = str; picX = x; picY = y; Laya.loader.load(picUrl, Handler.create(this, showBgImg)); } private function showBgImg():void { pic = new Image(); pic.graphics.drawTexture(Laya.loader.getRes(picUrl), picX, picY); Laya.stage.addChild(pic); } } }   Main.as packa...

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

72. laya.net.Loader [ 73%]

...I DocumentationAll Packages | All Classes | Index | Frames No Frames LoaderProperties | Methods | Events | Constants Packagelaya.netClasspublic class LoaderInheritanceLoader EventDispatcher Object Loader 类可用来加载文本、JSON、XML、二进制、图像等资源。 Public Properti...

来源: Laya2.0_api 发布时间: 20190513

73. 设置滤镜(JavaScript-LayaAir基础篇(JS)-位图) [ 72%]

...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(this, setup)); })(); function setup() { normalizeApe(); makeRedApe(); grayingApe(); } function normalizeApe() { var originalApe = createApe(); apeTexture = Laya.loader.getRes(ApePath); orig...

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

74. 使用UrlLoader加载图片,flash获取data为byteArray,翻译成h5后data为image? [ 72%]

使用UrlLoader加载图片,flash获取data为byteArray,翻译成h5后data为image? package { import flash.display.Bitmap; import flash.display.Loader; import flash.display.Sprite; import flash.events.Event; import flash.net.URLLoader; import flash.net.URLLoaderDataFormat; import flash.net.UR...

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

75. Laya.loader.create 进度回调函数执行两次 [ 72%]

Laya.loader.create 进度回调函数执行两次 Laya.loader.create(["Main/SMain.ls","Role/Role.lh"],Laya.Handler.create(this,this.on3DComplete),Laya.Handler.create(this,this.onProgress,null,false)); Manager.prototype.onProgress = function(value) { console.log("value=="+Math.floor(value*100)+"%");...

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

76. 分享个资源加载方法,类似白鹭加载方式 [ 72%]

...ing = "onLoadedResJson"; // 资源配置文件加载出错 public static ONLOADERRORRESJSON: string = "onLoadError"; // 资源组加载完成 public static ONLOADGROUPCOMPLETE: string = "onLoadGroupConplete"; // 资源组加载出错 public static ONLOADGROUPERROR: string = "onLoadGroupError"; priva...

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

77. 加载图集会自动销毁 [ 72%]

加载图集会自动销毁 使用Laya.loader.load加载图集,cache参数为默认值true   加载后实例化界面正常使用该图集显示   经过一段其它加载逻辑后该图集丢失,通过Loader.getRes获取为undefined   实例化相关界面loseskin 代码中没有任...

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

78. clearRes好像没作用,或许我用法不对 [ 72%]

...         console.log("释放资源false")             Laya.loader.clearRes("res/atlas/comp.json", false);             Laya.loader.clearRes("res/atlas/comp.png", false);         }         if (e.keyCode == 66) {//B             console.log("释放资源 tru...

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

79. Texture自动恢复还是存在另外问题 [ 72%]

...itmap || this._bitmap.destroyed)&& url){             Laya.loader.load(url,Handler.create(this,function(bitmap){                 _$this._bitmap=bitmap;             }),null,"htmlimage",1,false,null,true);         }     }   Laya.loader.loadcache参数...

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

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

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

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