@loaders.gl/splats 4.5.2 → 4.5.4
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/dist.dev.js +40 -2
- package/dist/dist.min.js +8 -8
- package/dist/index.cjs +5 -5
- package/dist/ksplat-loader-types.js +1 -1
- package/dist/rad-loader-types.js +1 -1
- package/dist/rad-source-loader.js +1 -1
- package/dist/splat-loader-types.js +1 -1
- package/dist/spz-loader-types.js +1 -1
- package/package.json +5 -5
package/dist/dist.dev.js
CHANGED
|
@@ -17818,6 +17818,36 @@ return true;`);
|
|
|
17818
17818
|
return loadOptions;
|
|
17819
17819
|
}
|
|
17820
17820
|
|
|
17821
|
+
// ../loader-utils/src/lib/module-utils/initialize-wasm-module.ts
|
|
17822
|
+
function initializeWasmModule(initialize, extractExports) {
|
|
17823
|
+
return new Promise((resolve, reject) => {
|
|
17824
|
+
let isSettled = false;
|
|
17825
|
+
function rejectInitialization(error51) {
|
|
17826
|
+
if (!isSettled) {
|
|
17827
|
+
isSettled = true;
|
|
17828
|
+
reject(error51);
|
|
17829
|
+
}
|
|
17830
|
+
}
|
|
17831
|
+
function resolveInitialization(module) {
|
|
17832
|
+
if (isSettled) {
|
|
17833
|
+
return;
|
|
17834
|
+
}
|
|
17835
|
+
isSettled = true;
|
|
17836
|
+
try {
|
|
17837
|
+
resolve(extractExports(module));
|
|
17838
|
+
} catch (error51) {
|
|
17839
|
+
reject(error51);
|
|
17840
|
+
}
|
|
17841
|
+
}
|
|
17842
|
+
try {
|
|
17843
|
+
const modulePromise = initialize(resolveInitialization, rejectInitialization);
|
|
17844
|
+
modulePromise?.then(resolveInitialization, rejectInitialization);
|
|
17845
|
+
} catch (error51) {
|
|
17846
|
+
rejectInitialization(error51);
|
|
17847
|
+
}
|
|
17848
|
+
});
|
|
17849
|
+
}
|
|
17850
|
+
|
|
17821
17851
|
// ../compression/src/lib/compression.ts
|
|
17822
17852
|
var Compression = class {
|
|
17823
17853
|
constructor(options) {
|
|
@@ -18008,8 +18038,16 @@ return true;`);
|
|
|
18008
18038
|
registerJSModules(modules);
|
|
18009
18039
|
checkJSModule("zstd-codec", this.name);
|
|
18010
18040
|
const ZstdCodec = getJSModuleOrNull("zstd-codec");
|
|
18011
|
-
if (
|
|
18012
|
-
zstdPromise =
|
|
18041
|
+
if (zstdPromise === void 0 && ZstdCodec) {
|
|
18042
|
+
zstdPromise = initializeWasmModule(
|
|
18043
|
+
(onInitialized) => ZstdCodec.run(onInitialized),
|
|
18044
|
+
(module) => {
|
|
18045
|
+
const { Generic, Simple, Streaming, Dict } = module;
|
|
18046
|
+
return { Generic, Simple, Streaming, Dict };
|
|
18047
|
+
}
|
|
18048
|
+
);
|
|
18049
|
+
}
|
|
18050
|
+
if (zstdPromise !== void 0) {
|
|
18013
18051
|
zstd = await zstdPromise;
|
|
18014
18052
|
}
|
|
18015
18053
|
}
|