mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2024-12-26 03:38:29 +00:00
[adapters] 更改 Worker Handlers 初始化的时机;使用另一种 Audio 模块是否存在的判断方式
This commit is contained in:
parent
6c720d359d
commit
d28997bcbb
@ -3,7 +3,9 @@ if (CC_WORKER_ASSET_PIPELINE) {
|
||||
ipcMain.registerHandler("assetManager", assetManagerWorkerAdapter);
|
||||
}
|
||||
|
||||
if (CC_WORKER_AUDIO_SYSTEM && cc._Audio) {
|
||||
if (CC_WORKER_AUDIO_SYSTEM) {
|
||||
const audioWorkerAdapter = require("./audio.js");
|
||||
if (audioWorkerAdapter.create != null) {
|
||||
ipcMain.registerHandler("audioAdapter", audioWorkerAdapter);
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
require("./macro");
|
||||
require("./ipc-main.js");
|
||||
require("./handlers.js");
|
||||
|
||||
module.exports = {
|
||||
init(callback) {
|
||||
if (CC_USE_WORKER) {
|
||||
var t = Date.now();
|
||||
require("./handlers.js");
|
||||
ipcMain.init(() => {
|
||||
console.log("worker init cost:", Date.now() - t);
|
||||
console.log("worker settings:", {
|
||||
|
Loading…
Reference in New Issue
Block a user