大约有 56 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0049 秒)
...y convention, only resource files in the level-1 directory are loaded Laya.loader.create([{ url: "xx.zip", type:"ZIP"}]) [/size][/code] 如果只需要加载zip包中的部分资源,或者资源路径在多级目录下。可以在constructParams中进行配置,来加载指定文件资源。[size...
来源: Laya_社区 发布时间: 20211227
...载Spine动画数据资源(json文件),注意一定要设置为Laya.Loader.SPINE类型,否则不会把json认为是SPINE资源 Laya.loader.load("girl2/mix-and-match-pro.json", Laya.Loader.SPINE).then(() => { // 添加Spine渲染器组件到精灵节点上 this.spine = this.owner.addCompon...
来源: Laya3.0_文档 发布时间: 20251128
Laya.loader.clearTextureRes引起的内存泄露以及恢复图片显示闪烁 1、引擎和ide版本都是2.1.2 2、点击屏幕会绘制一个光圈特效 3、点击第1次加载资源使用后释放调用Laya.loader.clearTextureRes 4、再点第2次 1、图片代码中指示出必然会...
来源: Laya_社区 发布时间: 20200317
...源的进度进行显示,下面的编码为就是错误的。 1. `Laya.loader.load(urls, Laya.Handler.create(this, onAssetLoaded), Laya.Handler.create(this, onLoading));` 在上面的代码中,使用`Laya.Handler.create(this,onLoading)`返回的回调方法,是要处理progress加载进度事...
来源: Laya2.0_文档 发布时间: 20210715
...00631用户 赞同来自: //加载IDE指定的场景 Laya.loader.load([{url:"minastc.config.json",type:Laya.Loader.JSON}],new Laya.Handler(this,function(){ this.astcconfig = Laya.loader.getRes("minastc.config.json"); for(var key in this.astcconfig...
来源: Laya_社区 发布时间: 20221013
...源的进度进行显示,下面的编码为就是错误的。 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
...度进行显示,下面的编码为就是错误的。 ```javascript Laya.loader.load(urls, Handler.create(this, onAssetLoaded), Handler.create(this, onLoading)); ``` 在上面的代码中,使用`Handler.create(this, onLoading)`返回的回调方法,是要处理progress加载进度事件,...
来源: Laya2.0_文档 发布时间: 20210715
...析xml,将项目放入微信小游戏后会报错 代码如下: Laya.loader.load([{url: "lang.xml", type: Loader.XML}]); 错误如下: gameThirdScriptError undefined;at api readFile success callback function undefined 经调试,原因就是加载了xml,去掉该行就不会报错。 同时...
来源: Laya_社区 发布时间: 20180103
... constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let label: Laya.Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label ); } ); } } 运行效果如图3-6所示 (图3-...
来源: Laya3.0_文档 发布时间: 20241014
... constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let label: Laya.Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label ); } ); } } 运行效果如图3-6所示 (图3-...
来源: Laya3.0_文档 发布时间: 20251105