feat(web): preload completed wasm and load debug modules on demand
This commit is contained in:
@@ -961,7 +961,7 @@ async function initialize(): Promise<WebEngineStatus> {
|
||||
await wasmModuleLoader.preloadCompleted();
|
||||
const imported = await import("../vendor/blender/web_engine.js") as unknown as { default: WasmFactory };
|
||||
const factory = imported.default;
|
||||
const binary = await wasmModuleLoader.load("core-completed");
|
||||
const binary = await wasmModuleLoader.loadDebug("debug-incremental");
|
||||
const initializedModule = await factory({ wasmBinary: binary });
|
||||
const initializedHandle = initializedModule._web_engine_create();
|
||||
if (initializedHandle <= 0) throw new Error("WebEngine handle creation failed");
|
||||
|
||||
Reference in New Issue
Block a user