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

大约有 205 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0058 秒)

161. 图集制作与使用详解(JavaScript-IDE篇(JS)-使用IDE创作) [ 51%]

...示例代码为: ```javascript //atlas方式图集使用示例 Laya.loader.load("./res/test/c1.atlas", Laya.Handler.create(this, onLoaded)); ```   `.json`是一种兼容第三方图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图...

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

162. 图集制作与使用详解(TypeScript-IDE篇(TS)-使用IDE创作) [ 51%]

...示例代码为: ```typescript //atlas方式图集使用示例 Laya.loader.load("./res/atlas/test.atlas", Laya.Handler.create(this, this.onLoaded)); ``` `.json`是一种兼容第三方图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为...

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

163. 图集制作与使用详解(ActionScript-IDE篇(AS3)-使用IDE创作) [ 51%]

...示例代码为: ```typescript //atlas方式图集使用示例 Laya.loader.load("./res/atlas/test.atlas", Handler.create(this, onLoaded)); ``` `.json`是一种兼容第三方图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图集配置...

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

164. CPU优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 50%]

...正确获取宽高。 3. **直接调用size设置:** ```javascript Laya.loader.load("res/apes/monkey2.png", Handler.create(this, function() {     var texture:Texture = Laya.loader.getRes("res/apes/monkey2.png");     var sp:Spirte = new Sprite();     sp.graphics.drawTexture(tex...

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

165. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 50%]

...正确获取宽高。 1. **直接调用size设置:** ```javascript Laya.loader.load("res/apes/monkey2.png",Handler.create(this,function() { var texture=Laya.loader.getRes("res/apes/monkey2.png"); var sp=new Laya.Sprite(); sp.graphics.drawTexture(texture,0,0); sp.size(texture.width,texture.height);...

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

166. Laya.MiniAdpter.downLoadFile缓存文件无法读取问题 [ 50%]

...e { this.DoLoadData(url); } } protected DoLoadData(url:string):void { Laya.loader.load(url, Laya.Handler.create(this, this.OnLoadDataCb)); } protected OnDownloadFileInWxOk(args:any, result:any, data:any):void { console.log("OnDownloadFileInWxOk"); console.log("" + result + ", data: " + data); if (re...

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

167. 微信小游戏利用开放域好友关系链做排行榜 [ 49%]

...代码: import Label = Laya.Label; import Handler = Laya.Handler; import Loader = Laya.Loader;  class GameBootstrap{      public constructor(){         this.init();     }      private init():void{         //初始化微信小游戏         Laya.MiniAdpter.ini...

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

168. 绘制图形 · LayaAir3.0文档 · LAYABOX [ 49%]

..., offset || Point.EMPTY, color)); else return null; } 代码示例: Laya.loader.load("resources/layaAir.png").then((res: Laya.Texture) => { let sp = new Laya.Sprite(); // 绘制填充纹理 sp.graphics.fillTexture(res, 0, 0, 500, 500, "repeat"); this.owner.addChild(sp); }); 运行效果: (...

来源: Laya3.0_文档 发布时间: 20231129

169. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 49%]

...正确获取宽高。 1. **直接调用size设置:** ```typescript Laya.loader.load("res/apes/monkey2.png",Laya.Handler.create(this,function() { var texture=Laya.loader.getRes("res/apes/monkey2.png"); var sp=new Laya.Sprite(); sp.graphics.drawTexture(texture,0,0); sp.size(texture.width,texture.hei...

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

170. 多线程Worker · LayaAir3.0文档 · LAYABOX [ 48%]

....init(600,400,Laya.WebGL); //设置Laya提供worker.js路径 Laya.WorkerLoader.workerPath = "libs/worker.js"; //开启worker线程 Laya.WorkerLoader.enable = true; //加载引擎需要资源 Laya.loader.load("../atlas/comp.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():v...

来源: Laya3.0_文档 发布时间: 20240528