大约有 212 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0084 秒)
Laya_社区(134) Laya2.0_文档(34) Laya3.0_api(21) Laya3.0_文档(16) Laya2.0_示例(3) laya_api(2) Laya2.0_api(2)
...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
...代码: 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
..., 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_文档 发布时间: 20251010
...正确获取宽高。 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
....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_文档 发布时间: 20251010
... ```javascript //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/ui.atlas", Laya.Handler.create(this, onLoaded)); ``` 第二步:创建Animation实例,加载动画文件 ```javascript //创建一个Animation实例 var tl = new Laya.Animation(); //加载动画文件 ...
来源: Laya2.0_文档 发布时间: 20210715
...4、开始调用你分包后的js文件,参考上图1所示,使用laya.loader.load对js进行加载,加载完成后,如2所示,使用__JS__('window.eval(data)');翻译成h5后,将json的data数据在window下进行加载。并进行调用。 Desktop2.rar 2016-08-11 1 0 分享 微博 QZON...
来源: Laya_社区 发布时间: 20160514
... ```typescript //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/ui.atlas",Laya.Handler.create(this,this.onLoaded)); ``` 第二步:创建Animation实例,加载动画文件 ```typescript //创建一个Animation实例 var tl:Laya.Animation = new Laya.Animation(); //...
来源: Laya2.0_文档 发布时间: 20210715
...图集。 ```java //加载图集成功后,执行onLoad回调方法 Laya.loader.load("res/atlas/ui.atlas", Handler.create(this, onLoaded)); ``` 第二步:创建Animation实例,加载动画文件 ```java //创建一个Animation实例 var tl:Animation = new Animation(); //加载动画文件 tl.lo...
来源: Laya2.0_文档 发布时间: 20210715
...载建筑图片 private loadBuildingImage(): void { Laya.loader.load( "res/building.png", // 你的建筑图片路径 Laya.Handler.create(this, () => { // 加载完成后绘制到building Sprite上 ...
来源: Laya_社区 发布时间: 20251125