@galacean/engine-loader 0.0.0-experimental-double11.7 → 0.0.0-experimental-double11.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +22 -0
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +22 -0
- package/dist/module.js +22 -0
- package/dist/module.js.map +1 -1
- package/package.json +5 -5
package/dist/main.js
CHANGED
|
@@ -2441,6 +2441,28 @@ var AbstractTranscoder = /*#__PURE__*/ function() {
|
|
|
2441
2441
|
/** @internal */ function TranscodeWorkerCode$1() {
|
|
2442
2442
|
self.onmessage = function onmessage(event) {
|
|
2443
2443
|
var message = event.data;
|
|
2444
|
+
var _init = function _init() {
|
|
2445
|
+
var initPromise;
|
|
2446
|
+
return function(wasmBinary) {
|
|
2447
|
+
if (!initPromise) {
|
|
2448
|
+
initPromise = new Promise(function(resolve, reject) {
|
|
2449
|
+
var BasisModule = {
|
|
2450
|
+
wasmBinary: wasmBinary,
|
|
2451
|
+
onRuntimeInitialized: function() {
|
|
2452
|
+
return resolve(BasisModule);
|
|
2453
|
+
},
|
|
2454
|
+
onAbort: reject
|
|
2455
|
+
};
|
|
2456
|
+
self["BASIS"](BasisModule);
|
|
2457
|
+
}).then(function(BasisModule) {
|
|
2458
|
+
BasisModule.initializeBasis();
|
|
2459
|
+
return BasisModule.KTX2File;
|
|
2460
|
+
});
|
|
2461
|
+
}
|
|
2462
|
+
return initPromise;
|
|
2463
|
+
};
|
|
2464
|
+
};
|
|
2465
|
+
var init = _init();
|
|
2444
2466
|
switch(message.type){
|
|
2445
2467
|
case "init":
|
|
2446
2468
|
init(message.transcoderWasm).then(function() {
|