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

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

1. 二进制图片(JavaScript-2D进阶篇(JS)-游戏加载策略) [ 100%]

...prite(); sp.loadImage(url); Laya.stage.addChild(sp);//添加到舞台 //用loader来加载url Laya.loader.load(url,Laya.Handler.create(this,showImg,[url]),null,Laya.Loader.IMAGE); } function errorHandler(url){ var t = new Laya.loader.getRes(url); var ape = new Laya.Sprite(); ape.graphics.drawTexture...

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

2. 二进制图片(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 98%]

...a.Browser.window.URL.createObjectURL(blob);//创建一个url对象; //用loader来加载url Laya.loader.load(url,Laya.Handler.create(this,this.showImg,[url]),null,Laya.Loader.IMAGE); } private showImg(url:string):void{ var t:Laya.Texture = Laya.loader.getRes(url); var ape:Laya.Sprite = new Laya.Sp...

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

3. 二进制图片(ActionScript-2D进阶篇(AS3)-游戏加载策略) [ 98%]

...= Browser.window.URL.createObjectURL(blob);//创建一个url对象; //用loader来加载url Laya.loader.load(url, Handler.create(this,showImg,[url]),null,Loader.IMAGE); } private function showImg(url:String):void { var t:Texture = Laya.loader.getRes(url); var ape:Sprite = new Sprite(); ape.graphic...

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

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

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

5. 设置遮罩(ActionScript-LayaAir基础篇(AS3)-位图) [ 92%]

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

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

6. 设置滤镜(TypeScript-LayaAir基础篇(TS)-位图) [ 92%]

...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(this.ApePath, Handler.create(this, this.setup)); } private setup(): void { this.normalizeApe(); this.makeRedApe(); this.grayingApe(); } private normalizeApe(): void { var originalApe: Sprite = this.createApe(); th...

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

7. 内存优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 90%]

...源的进度进行显示,下面的编码为就是错误的。 1. `Laya.loader.load(urls, Laya.Handler.create(this, onAssetLoaded), Laya.Handler.create(this, onLoading));` 在上面的代码中,使用`Laya.Handler.create(this,onLoading)`返回的回调方法,是要处理progress加载进度事...

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

8. 内存优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 89%]

...源的进度进行显示,下面的编码为就是错误的。 1. `Laya.loader.load(urls, Laya.Handler.create(this, this.onAssetLoaded), Laya.Handler.create(this, this.onLoading));` 在上面的代码中,使用`Laya.Handler.create(this,this.onLoading)`返回的回调方法,是要处理progress...

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

9. 内存优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 89%]

...度进行显示,下面的编码为就是错误的。 ```javascript Laya.loader.load(urls, Handler.create(this, onAssetLoaded), Handler.create(this, onLoading)); ``` 在上面的代码中,使用`Handler.create(this, onLoading)`返回的回调方法,是要处理progress加载进度事件,...

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

10. 设置滤镜(ActionScript-LayaAir基础篇(AS3)-位图) [ 86%]

...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(this, setup)); } private function setup(e:*=null):void { normalizeApe(); makeRedApe(); grayingApe(); } private function normalizeApe():void { var originalApe:Sprite = createApe(); apeTextur...

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