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

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

151. 一个图集动画由多张图集组成这种图集动画怎么加载播放? [ 58%]

...Monica • 2017-10-13 10:44 @hypo_chen:那就加载多个json文件...Laya.loader.load第一个参数是数组类型

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

152. Handler.create回收问题 [ 58%]

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

153. 二次开发 异步回调没反应 [ 58%]

...何反应这么慢,附上demo求解答 Laya.Handler.create 回调 Laya.loader.create 进度回调函数执行两次 问题状态 最新活动: 2019-07-02 11:16 浏览: 1219 关注: 1 人 zpo • 2019-09-05 16:23 请问是怎么解决呢?我们写了个简单demo测异步回调是测通...

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

154. vivo小游戏 · LayaAir3.0文档 · LAYABOX [ 57%]

...此方法只执行一次 */ 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

155. 支付宝小游戏 · LayaAir3.0文档 · LAYABOX [ 56%]

...毕,此方法只执行一次 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

156. 多线程worker(ActionScript-2D进阶篇(AS3)-游戏加载策略) [ 55%]

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

157. 帮忙看看Texture类getPixels内存泄漏问题。 [ 53%]

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

158. 插件开发说明 · LayaAir3.0文档 · LAYABOX [ 53%]

...内容并返回。如果不需要支持热重载,则忽略。 @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

159. 3D场景环境设置 · LayaAir3.0文档 · LAYABOX [ 52%]

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

160. 通用发布 · LayaAir3.0文档 · LAYABOX [ 52%]

...方法只执行一次 */ 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