[LayaAir 2.0]worker如何使用
Laya.WorkerLoader.workerPath = "libs/worker.js";
//开启worker线程
Laya.WorkerLoader.enable = true;
//加载引擎需要的资源
Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, () => {
alert("onLoaded!");
}), null, Laya.Loader.ATLAS, 1, true, null, false, true);
useWorkerLoader参数设为true后,文件加载不成功?
//开启worker线程
Laya.WorkerLoader.enable = true;
//加载引擎需要的资源
Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, () => {
alert("onLoaded!");
}), null, Laya.Loader.ATLAS, 1, true, null, false, true);
useWorkerLoader参数设为true后,文件加载不成功?
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
180*****998
赞同来自:
可能是浏览器不支持的原因吧