大约有 205 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0090 秒)
Laya_社区(128) Laya2.0_文档(34) Laya3.0_api(21) Laya3.0_文档(15) Laya2.0_示例(3) laya_api(2) Laya2.0_api(2)
...Monica • 2017-10-13 10:44 @hypo_chen:那就加载多个json文件...Laya.loader.load第一个参数是数组类型的
来源: Laya_社区 发布时间: 20171012
...his.h1 = Laya.Handler.create(this, this.loadPicComplete, null, true); Laya.loader.load("res/img/1.png", this.h1); } private loadPicComplete(): void { Laya.timer.once(2000, this, this.actT); } private actT(): void { this.h2 = Laya.Handler.create(this, this.loadPicComplete, null, true); console.log(th...
来源: Laya_社区 发布时间: 20171221
...何反应这么慢,附上demo求解答 Laya.Handler.create 回调 Laya.loader.create 进度回调函数执行两次 问题状态 最新活动: 2019-07-02 11:16 浏览: 1219 关注: 1 人 zpo • 2019-09-05 16:23 请问是怎么解决的呢?我们写了个简单的demo测异步回调是测通的...
来源: Laya_社区 发布时间: 20190524
...此方法只执行一次 */ onAwake(): void { //小游戏加载分包 Laya.loader.loadPackage("sub1", this.printProgress).then(() => { Laya.loader.load("sub1/Cube.lh").then((res: Laya.PrefabImpl) => { let sp3: Laya.Sprite3D = res.create() as Laya.Sprite3D; this.scene3d.addChild(sp3); }); }) La...
来源: Laya3.0_文档 发布时间: 20240926
...毕,此方法只执行一次 onAwake(): void { //支付宝小游戏 Laya.loader.loadPackage("sub1", this.printProgress).then(() => { Laya.loader.load("sub1/Cube.lh").then((res: Laya.PrefabImpl) => { let sp3: Laya.Sprite3D = res.create() as Laya.Sprite3D; this.scene3d.addChild(sp3); }); }) La...
来源: Laya3.0_文档 发布时间: 20240528
...i项目。简单的调用接口如下: ```java package { import laya.net.Loader; import laya.utils.Handler; import view.TestView; import laya.net.WorkerLoader; import laya.webgl.WebGL; public class LayaUISample { public function LayaUISample() { //初始化引擎 Laya.init(600, 400,WebGL); //设...
来源: Laya2.0_文档 发布时间: 20210715
...init(1024, 768, WebGL); Stat.show(0, 0); Laya.stage.bgColor = "#fff"; Laya.loader.load("assets/images/color1.png", Handler.create(this, __loadImageHandler)); } private function __loadImageHandler():void { _colorSpr = new Sprite(); _colorTex = Laya.loader.getRes("assets/images/color1.png"); _colorSpr...
来源: Laya_社区 发布时间: 20180302
...内容并返回。如果不需要支持热重载,则忽略。 @Laya.regLoader(["abc"], null, true) export class DemoAssetLoader implements Laya.IResourceLoader { async load(task: Laya.ILoadTask): Promise<any> { let json = await task.loader.fetch(task.url, "json"); let res = task.obsoluteInst...
来源: Laya3.0_文档 发布时间: 20240918
....create(null, function (res:any){ Laya.stage.addChild(res); })); //用Laya.loader的方式加载,加载后根节点是Scene2D Laya.loader.load('scene/Game.ls', Laya.Handler.create(this, this.onLoaded), Laya.Handler.create(this, this.onLoading)).then( (res)=>{ let scene = res.create(); //scene.s...
来源: Laya3.0_文档 发布时间: 20231129
...方法只执行一次 */ onAwake(): void { //Web平台使用远程包 Laya.loader.loadPackage("sub1","http://192.168.56.1:2840/",this.printProgress).then(()=>{ Laya.loader.load("sub1/cube.lh").then((res:Laya.PrefabImpl) =>{ let sp3:Laya.Sprite3D =res.create() as Laya.Sprite3D; this.scene3d.add...
来源: Laya3.0_文档 发布时间: 20240926