@loaders.gl/textures 4.0.0-alpha.22 → 4.0.0-alpha.24
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/basis-worker-node.js +2 -2
- package/dist/basis-worker.js +2 -2
- package/dist/compressed-texture-loader.d.ts +2 -35
- package/dist/compressed-texture-loader.d.ts.map +1 -1
- package/dist/compressed-texture-worker.js +11 -11
- package/dist/crunch-loader.d.ts +9 -17
- package/dist/crunch-loader.d.ts.map +1 -1
- package/dist/crunch-worker.js +2 -2
- package/dist/dist.min.js +10 -10
- package/dist/es5/compressed-texture-loader.js +15 -17
- package/dist/es5/compressed-texture-loader.js.map +1 -1
- package/dist/es5/crunch-loader.js +1 -3
- package/dist/es5/crunch-loader.js.map +1 -1
- package/dist/es5/lib/utils/version.js +1 -1
- package/dist/es5/workers/compressed-texture-worker.js.map +1 -1
- package/dist/esm/compressed-texture-loader.js +10 -11
- package/dist/esm/compressed-texture-loader.js.map +1 -1
- package/dist/esm/crunch-loader.js +0 -1
- package/dist/esm/crunch-loader.js.map +1 -1
- package/dist/esm/lib/utils/version.js +1 -1
- package/dist/esm/workers/compressed-texture-worker.js.map +1 -1
- package/dist/ktx2-basis-writer-worker-node.js +2 -2
- package/dist/ktx2-basis-writer-worker.js +2 -2
- package/dist/npy-worker.js +1 -1
- package/dist/workers/crunch-worker.d.ts +13 -9
- package/dist/workers/crunch-worker.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/compressed-texture-loader.ts +14 -17
- package/src/crunch-loader.ts +10 -7
- package/src/workers/compressed-texture-worker.ts +1 -0
- package/dist/basis-loader.js +0 -37
- package/dist/bundle.js +0 -5
- package/dist/compressed-texture-loader.js +0 -64
- package/dist/compressed-texture-writer.js +0 -34
- package/dist/crunch-loader.js +0 -25
- package/dist/index.js +0 -57
- package/dist/ktx2-basis-writer.js +0 -28
- package/dist/lib/encoders/encode-ktx.js +0 -10
- package/dist/lib/encoders/encode-ktx2-basis-texture.js +0 -41
- package/dist/lib/encoders/encode-texture.js +0 -27
- package/dist/lib/gl-extensions.js +0 -72
- package/dist/lib/parsers/basis-module-loader.js +0 -118
- package/dist/lib/parsers/crunch-module-loader.js +0 -39
- package/dist/lib/parsers/parse-basis.js +0 -245
- package/dist/lib/parsers/parse-compressed-texture.js +0 -26
- package/dist/lib/parsers/parse-crunch.js +0 -106
- package/dist/lib/parsers/parse-dds.js +0 -108
- package/dist/lib/parsers/parse-ktx.js +0 -46
- package/dist/lib/parsers/parse-npy.js +0 -81
- package/dist/lib/parsers/parse-pvr.js +0 -250
- package/dist/lib/texture-api/async-deep-map.js +0 -41
- package/dist/lib/texture-api/deep-load.js +0 -15
- package/dist/lib/texture-api/generate-url.js +0 -17
- package/dist/lib/texture-api/load-image-array.js +0 -21
- package/dist/lib/texture-api/load-image-cube.js +0 -47
- package/dist/lib/texture-api/load-image.js +0 -43
- package/dist/lib/texture-api/texture-api-types.js +0 -3
- package/dist/lib/utils/extract-mipmap-images.js +0 -50
- package/dist/lib/utils/ktx-format-helper.js +0 -125
- package/dist/lib/utils/texture-formats.js +0 -51
- package/dist/lib/utils/version.js +0 -8
- package/dist/npy-loader.js +0 -31
- package/dist/types.js +0 -1
- package/dist/workers/basis-worker-node.js +0 -7
- package/dist/workers/basis-worker.js +0 -5
- package/dist/workers/compressed-texture-worker.js +0 -5
- package/dist/workers/crunch-worker.js +0 -14
- package/dist/workers/ktx2-basis-writer-worker-node.js +0 -28
- package/dist/workers/ktx2-basis-writer-worker.js +0 -26
- package/dist/workers/npy-worker.js +0 -5
|
@@ -10,17 +10,10 @@ export type TextureLoaderOptions = {
|
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
const DEFAULT_TEXTURE_LOADER_OPTIONS = {
|
|
14
|
-
'compressed-texture': {
|
|
15
|
-
libraryPath: 'libs/',
|
|
16
|
-
useBasis: false
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
|
|
20
13
|
/**
|
|
21
14
|
* Worker Loader for KTX, DDS, and PVR texture container formats
|
|
22
15
|
*/
|
|
23
|
-
export const CompressedTextureWorkerLoader = {
|
|
16
|
+
export const CompressedTextureWorkerLoader: Loader<any, never, TextureLoaderOptions> = {
|
|
24
17
|
name: 'Texture Containers',
|
|
25
18
|
id: 'compressed-texture',
|
|
26
19
|
module: 'textures',
|
|
@@ -40,31 +33,35 @@ export const CompressedTextureWorkerLoader = {
|
|
|
40
33
|
'application/octet-stream'
|
|
41
34
|
],
|
|
42
35
|
binary: true,
|
|
43
|
-
options:
|
|
36
|
+
options: {
|
|
37
|
+
'compressed-texture': {
|
|
38
|
+
libraryPath: 'libs/',
|
|
39
|
+
useBasis: false
|
|
40
|
+
}
|
|
41
|
+
}
|
|
44
42
|
};
|
|
45
43
|
|
|
46
44
|
/**
|
|
47
45
|
* Loader for KTX, DDS, and PVR texture container formats
|
|
48
46
|
*/
|
|
49
|
-
export const CompressedTextureLoader = {
|
|
47
|
+
export const CompressedTextureLoader: LoaderWithParser<any, never, TextureLoaderOptions> = {
|
|
50
48
|
...CompressedTextureWorkerLoader,
|
|
51
|
-
parse: async (arrayBuffer, options) => {
|
|
52
|
-
if (options['compressed-texture']
|
|
49
|
+
parse: async (arrayBuffer: ArrayBuffer, options?: TextureLoaderOptions) => {
|
|
50
|
+
if (options?.['compressed-texture']?.useBasis) {
|
|
51
|
+
// @ts-expect-error TODO not allowed to modify inputs
|
|
53
52
|
options.basis = {
|
|
54
53
|
format: {
|
|
55
54
|
alpha: 'BC3',
|
|
56
55
|
noAlpha: 'BC1'
|
|
57
56
|
},
|
|
57
|
+
// @ts-expect-error TODO not allowed to modify inputs
|
|
58
58
|
...options.basis,
|
|
59
59
|
containerFormat: 'ktx2',
|
|
60
60
|
module: 'encoder'
|
|
61
61
|
};
|
|
62
|
-
|
|
62
|
+
const result = await parseBasis(arrayBuffer, options);
|
|
63
|
+
return result[0];
|
|
63
64
|
}
|
|
64
65
|
return parseCompressedTexture(arrayBuffer);
|
|
65
66
|
}
|
|
66
67
|
};
|
|
67
|
-
|
|
68
|
-
// TYPE TESTS - TODO find a better way than exporting junk
|
|
69
|
-
export const _TypecheckCompressedTextureWorkerLoader: Loader = CompressedTextureWorkerLoader;
|
|
70
|
-
export const _TypecheckCompressedTextureLoader: LoaderWithParser = CompressedTextureLoader;
|
package/src/crunch-loader.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import type {Loader} from '@loaders.gl/loader-utils';
|
|
1
|
+
import type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';
|
|
2
|
+
import type {TextureLevel} from '@loaders.gl/schema';
|
|
2
3
|
import {VERSION} from './lib/utils/version';
|
|
3
4
|
|
|
5
|
+
export type CrunchLoaderOptions = LoaderOptions & {
|
|
6
|
+
crunch?: {
|
|
7
|
+
libraryPath?: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
|
|
4
11
|
/**
|
|
5
12
|
* Worker loader for the Crunch compressed texture container format
|
|
13
|
+
* @note We avoid bundling crunch - it is a rare format and large lib, so we only offer worker loader
|
|
6
14
|
*/
|
|
7
|
-
export const CrunchLoader = {
|
|
15
|
+
export const CrunchLoader: Loader<TextureLevel[], never, CrunchLoaderOptions> = {
|
|
8
16
|
id: 'crunch',
|
|
9
17
|
name: 'Crunch',
|
|
10
18
|
module: 'textures',
|
|
@@ -19,8 +27,3 @@ export const CrunchLoader = {
|
|
|
19
27
|
}
|
|
20
28
|
}
|
|
21
29
|
};
|
|
22
|
-
|
|
23
|
-
// We avoid bundling crunch - rare format, only offer worker loader
|
|
24
|
-
|
|
25
|
-
// TYPE TESTS - TODO find a better way than exporting junk
|
|
26
|
-
export const _TypecheckCrunchLoader: Loader = CrunchLoader;
|
package/dist/basis-loader.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.BasisLoader = exports.BasisWorkerLoader = void 0;
|
|
7
|
-
const version_1 = require("./lib/utils/version");
|
|
8
|
-
const parse_basis_1 = __importDefault(require("./lib/parsers/parse-basis"));
|
|
9
|
-
/**
|
|
10
|
-
* Worker loader for Basis super compressed textures
|
|
11
|
-
*/
|
|
12
|
-
exports.BasisWorkerLoader = {
|
|
13
|
-
name: 'Basis',
|
|
14
|
-
id: 'basis',
|
|
15
|
-
module: 'textures',
|
|
16
|
-
version: version_1.VERSION,
|
|
17
|
-
worker: true,
|
|
18
|
-
extensions: ['basis', 'ktx2'],
|
|
19
|
-
mimeTypes: ['application/octet-stream', 'image/ktx2'],
|
|
20
|
-
tests: ['sB'],
|
|
21
|
-
binary: true,
|
|
22
|
-
options: {
|
|
23
|
-
basis: {
|
|
24
|
-
format: 'auto',
|
|
25
|
-
libraryPath: 'libs/',
|
|
26
|
-
containerFormat: 'auto',
|
|
27
|
-
module: 'transcoder' // 'transcoder' || 'encoder'
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Loader for Basis super compressed textures
|
|
33
|
-
*/
|
|
34
|
-
exports.BasisLoader = {
|
|
35
|
-
...exports.BasisWorkerLoader,
|
|
36
|
-
parse: parse_basis_1.default
|
|
37
|
-
};
|
package/dist/bundle.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports._TypecheckCompressedTextureLoader = exports._TypecheckCompressedTextureWorkerLoader = exports.CompressedTextureLoader = exports.CompressedTextureWorkerLoader = void 0;
|
|
7
|
-
const version_1 = require("./lib/utils/version");
|
|
8
|
-
const parse_compressed_texture_1 = require("./lib/parsers/parse-compressed-texture");
|
|
9
|
-
const parse_basis_1 = __importDefault(require("./lib/parsers/parse-basis"));
|
|
10
|
-
const DEFAULT_TEXTURE_LOADER_OPTIONS = {
|
|
11
|
-
'compressed-texture': {
|
|
12
|
-
libraryPath: 'libs/',
|
|
13
|
-
useBasis: false
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Worker Loader for KTX, DDS, and PVR texture container formats
|
|
18
|
-
*/
|
|
19
|
-
exports.CompressedTextureWorkerLoader = {
|
|
20
|
-
name: 'Texture Containers',
|
|
21
|
-
id: 'compressed-texture',
|
|
22
|
-
module: 'textures',
|
|
23
|
-
version: version_1.VERSION,
|
|
24
|
-
worker: true,
|
|
25
|
-
extensions: [
|
|
26
|
-
'ktx',
|
|
27
|
-
'ktx2',
|
|
28
|
-
'dds',
|
|
29
|
-
'pvr' // WEBGL_compressed_texture_pvrtc
|
|
30
|
-
],
|
|
31
|
-
mimeTypes: [
|
|
32
|
-
'image/ktx2',
|
|
33
|
-
'image/ktx',
|
|
34
|
-
'image/vnd-ms.dds',
|
|
35
|
-
'image/x-dds',
|
|
36
|
-
'application/octet-stream'
|
|
37
|
-
],
|
|
38
|
-
binary: true,
|
|
39
|
-
options: DEFAULT_TEXTURE_LOADER_OPTIONS
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Loader for KTX, DDS, and PVR texture container formats
|
|
43
|
-
*/
|
|
44
|
-
exports.CompressedTextureLoader = {
|
|
45
|
-
...exports.CompressedTextureWorkerLoader,
|
|
46
|
-
parse: async (arrayBuffer, options) => {
|
|
47
|
-
if (options['compressed-texture'].useBasis) {
|
|
48
|
-
options.basis = {
|
|
49
|
-
format: {
|
|
50
|
-
alpha: 'BC3',
|
|
51
|
-
noAlpha: 'BC1'
|
|
52
|
-
},
|
|
53
|
-
...options.basis,
|
|
54
|
-
containerFormat: 'ktx2',
|
|
55
|
-
module: 'encoder'
|
|
56
|
-
};
|
|
57
|
-
return (await (0, parse_basis_1.default)(arrayBuffer, options))[0];
|
|
58
|
-
}
|
|
59
|
-
return (0, parse_compressed_texture_1.parseCompressedTexture)(arrayBuffer);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
// TYPE TESTS - TODO find a better way than exporting junk
|
|
63
|
-
exports._TypecheckCompressedTextureWorkerLoader = exports.CompressedTextureWorkerLoader;
|
|
64
|
-
exports._TypecheckCompressedTextureLoader = exports.CompressedTextureLoader;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CompressedTextureWriter = void 0;
|
|
4
|
-
const version_1 = require("./lib/utils/version");
|
|
5
|
-
const encode_texture_1 = require("./lib/encoders/encode-texture");
|
|
6
|
-
/**
|
|
7
|
-
* DDS Texture Container Exporter
|
|
8
|
-
*/
|
|
9
|
-
exports.CompressedTextureWriter = {
|
|
10
|
-
name: 'DDS Texture Container',
|
|
11
|
-
id: 'dds',
|
|
12
|
-
module: 'textures',
|
|
13
|
-
version: version_1.VERSION,
|
|
14
|
-
extensions: ['dds'],
|
|
15
|
-
options: {
|
|
16
|
-
texture: {
|
|
17
|
-
format: 'auto',
|
|
18
|
-
compression: 'auto',
|
|
19
|
-
quality: 'auto',
|
|
20
|
-
mipmap: false,
|
|
21
|
-
flipY: false,
|
|
22
|
-
toolFlags: ''
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
encodeURLtoURL: encode_texture_1.encodeImageURLToCompressedTextureURL
|
|
26
|
-
};
|
|
27
|
-
// TYPE TESTS - TODO find a better way than exporting junk
|
|
28
|
-
// export const _TypecheckCompressedTextureWriter: typeof CompressedTextureWriter & {
|
|
29
|
-
// encodeURLtoURL: (
|
|
30
|
-
// inputUrl: string,
|
|
31
|
-
// outputUrl: string,
|
|
32
|
-
// options?: CompressedTextureWriterOptions
|
|
33
|
-
// ) => Promise<string>;
|
|
34
|
-
// } = CompressedTextureWriter;
|
package/dist/crunch-loader.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._TypecheckCrunchLoader = exports.CrunchLoader = void 0;
|
|
4
|
-
const version_1 = require("./lib/utils/version");
|
|
5
|
-
/**
|
|
6
|
-
* Worker loader for the Crunch compressed texture container format
|
|
7
|
-
*/
|
|
8
|
-
exports.CrunchLoader = {
|
|
9
|
-
id: 'crunch',
|
|
10
|
-
name: 'Crunch',
|
|
11
|
-
module: 'textures',
|
|
12
|
-
version: version_1.VERSION,
|
|
13
|
-
worker: true,
|
|
14
|
-
extensions: ['crn'],
|
|
15
|
-
mimeTypes: ['image/crn', 'image/x-crn', 'application/octet-stream'],
|
|
16
|
-
binary: true,
|
|
17
|
-
options: {
|
|
18
|
-
crunch: {
|
|
19
|
-
libraryPath: 'libs/'
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
// We avoid bundling crunch - rare format, only offer worker loader
|
|
24
|
-
// TYPE TESTS - TODO find a better way than exporting junk
|
|
25
|
-
exports._TypecheckCrunchLoader = exports.CrunchLoader;
|
package/dist/index.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CrunchWorkerLoader = exports.getSupportedGPUTextureFormats = exports.selectSupportedBasisFormat = exports.GL_EXTENSIONS_CONSTANTS = exports.loadImageTextureCube = exports.loadImageTextureArray = exports.loadImageTexture = exports.KTX2BasisWriterWorker = exports.KTX2BasisWriter = exports.CompressedTextureWriter = exports.CRUNCH_EXTERNAL_LIBRARIES = exports.BASIS_EXTERNAL_LIBRARIES = exports.NPYWorkerLoader = exports.NPYLoader = exports.CrunchLoader = exports.CompressedTextureWorkerLoader = exports.CompressedTextureLoader = exports.BasisWorkerLoader = exports.BasisLoader = void 0;
|
|
4
|
-
const version_1 = require("./lib/utils/version");
|
|
5
|
-
// Loaders
|
|
6
|
-
var basis_loader_1 = require("./basis-loader");
|
|
7
|
-
Object.defineProperty(exports, "BasisLoader", { enumerable: true, get: function () { return basis_loader_1.BasisLoader; } });
|
|
8
|
-
Object.defineProperty(exports, "BasisWorkerLoader", { enumerable: true, get: function () { return basis_loader_1.BasisWorkerLoader; } });
|
|
9
|
-
var compressed_texture_loader_1 = require("./compressed-texture-loader");
|
|
10
|
-
Object.defineProperty(exports, "CompressedTextureLoader", { enumerable: true, get: function () { return compressed_texture_loader_1.CompressedTextureLoader; } });
|
|
11
|
-
Object.defineProperty(exports, "CompressedTextureWorkerLoader", { enumerable: true, get: function () { return compressed_texture_loader_1.CompressedTextureWorkerLoader; } });
|
|
12
|
-
var crunch_loader_1 = require("./crunch-loader");
|
|
13
|
-
Object.defineProperty(exports, "CrunchLoader", { enumerable: true, get: function () { return crunch_loader_1.CrunchLoader; } });
|
|
14
|
-
var npy_loader_1 = require("./npy-loader");
|
|
15
|
-
Object.defineProperty(exports, "NPYLoader", { enumerable: true, get: function () { return npy_loader_1.NPYLoader; } });
|
|
16
|
-
Object.defineProperty(exports, "NPYWorkerLoader", { enumerable: true, get: function () { return npy_loader_1.NPYWorkerLoader; } });
|
|
17
|
-
// Module constants
|
|
18
|
-
var basis_module_loader_1 = require("./lib/parsers/basis-module-loader");
|
|
19
|
-
Object.defineProperty(exports, "BASIS_EXTERNAL_LIBRARIES", { enumerable: true, get: function () { return basis_module_loader_1.BASIS_EXTERNAL_LIBRARIES; } });
|
|
20
|
-
var crunch_module_loader_1 = require("./lib/parsers/crunch-module-loader");
|
|
21
|
-
Object.defineProperty(exports, "CRUNCH_EXTERNAL_LIBRARIES", { enumerable: true, get: function () { return crunch_module_loader_1.CRUNCH_EXTERNAL_LIBRARIES; } });
|
|
22
|
-
// Writers
|
|
23
|
-
var compressed_texture_writer_1 = require("./compressed-texture-writer");
|
|
24
|
-
Object.defineProperty(exports, "CompressedTextureWriter", { enumerable: true, get: function () { return compressed_texture_writer_1.CompressedTextureWriter; } });
|
|
25
|
-
var ktx2_basis_writer_1 = require("./ktx2-basis-writer");
|
|
26
|
-
Object.defineProperty(exports, "KTX2BasisWriter", { enumerable: true, get: function () { return ktx2_basis_writer_1.KTX2BasisWriter; } });
|
|
27
|
-
exports.KTX2BasisWriterWorker = {
|
|
28
|
-
name: 'Basis Universal Supercompressed GPU Texture',
|
|
29
|
-
id: 'ktx2-basis-writer',
|
|
30
|
-
module: 'textures',
|
|
31
|
-
version: version_1.VERSION,
|
|
32
|
-
extensions: ['ktx2'],
|
|
33
|
-
worker: true,
|
|
34
|
-
options: {
|
|
35
|
-
useSRGB: false,
|
|
36
|
-
qualityLevel: 10,
|
|
37
|
-
encodeUASTC: false,
|
|
38
|
-
mipmaps: false
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
// Texture Loading API
|
|
42
|
-
var load_image_1 = require("./lib/texture-api/load-image");
|
|
43
|
-
Object.defineProperty(exports, "loadImageTexture", { enumerable: true, get: function () { return load_image_1.loadImageTexture; } });
|
|
44
|
-
var load_image_array_1 = require("./lib/texture-api/load-image-array");
|
|
45
|
-
Object.defineProperty(exports, "loadImageTextureArray", { enumerable: true, get: function () { return load_image_array_1.loadImageTextureArray; } });
|
|
46
|
-
var load_image_cube_1 = require("./lib/texture-api/load-image-cube");
|
|
47
|
-
Object.defineProperty(exports, "loadImageTextureCube", { enumerable: true, get: function () { return load_image_cube_1.loadImageTextureCube; } });
|
|
48
|
-
// Utilities
|
|
49
|
-
var gl_extensions_1 = require("./lib/gl-extensions");
|
|
50
|
-
Object.defineProperty(exports, "GL_EXTENSIONS_CONSTANTS", { enumerable: true, get: function () { return gl_extensions_1.GL_EXTENSIONS_CONSTANTS; } });
|
|
51
|
-
var parse_basis_1 = require("./lib/parsers/parse-basis");
|
|
52
|
-
Object.defineProperty(exports, "selectSupportedBasisFormat", { enumerable: true, get: function () { return parse_basis_1.selectSupportedBasisFormat; } });
|
|
53
|
-
var texture_formats_1 = require("./lib/utils/texture-formats");
|
|
54
|
-
Object.defineProperty(exports, "getSupportedGPUTextureFormats", { enumerable: true, get: function () { return texture_formats_1.getSupportedGPUTextureFormats; } });
|
|
55
|
-
// DEPRECATED
|
|
56
|
-
var crunch_loader_2 = require("./crunch-loader");
|
|
57
|
-
Object.defineProperty(exports, "CrunchWorkerLoader", { enumerable: true, get: function () { return crunch_loader_2.CrunchLoader; } });
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// loaders.gl, MIT license
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports._TypecheckKTX2TextureWriter = exports.KTX2BasisWriter = void 0;
|
|
5
|
-
const version_1 = require("./lib/utils/version");
|
|
6
|
-
const encode_ktx2_basis_texture_1 = require("./lib/encoders/encode-ktx2-basis-texture");
|
|
7
|
-
/**
|
|
8
|
-
* Basis Universal Supercompressed GPU Texture.
|
|
9
|
-
* Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/textureSetDefinitionFormat.cmn.md
|
|
10
|
-
*/
|
|
11
|
-
exports.KTX2BasisWriter = {
|
|
12
|
-
name: 'Basis Universal Supercompressed GPU Texture',
|
|
13
|
-
id: 'ktx2-basis-writer',
|
|
14
|
-
module: 'textures',
|
|
15
|
-
version: version_1.VERSION,
|
|
16
|
-
extensions: ['ktx2'],
|
|
17
|
-
options: {
|
|
18
|
-
['ktx2-basis-writer']: {
|
|
19
|
-
useSRGB: false,
|
|
20
|
-
qualityLevel: 10,
|
|
21
|
-
encodeUASTC: false,
|
|
22
|
-
mipmaps: false
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
encode: encode_ktx2_basis_texture_1.encodeKTX2BasisTexture
|
|
26
|
-
};
|
|
27
|
-
// TYPE TESTS - TODO find a better way than exporting junk
|
|
28
|
-
exports._TypecheckKTX2TextureWriter = exports.KTX2BasisWriter;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.encodeKTX = void 0;
|
|
4
|
-
const ktx_parse_1 = require("ktx-parse");
|
|
5
|
-
function encodeKTX(texture) {
|
|
6
|
-
const ktx = (0, ktx_parse_1.read)(texture);
|
|
7
|
-
// post process
|
|
8
|
-
return ktx;
|
|
9
|
-
}
|
|
10
|
-
exports.encodeKTX = encodeKTX;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.encodeKTX2BasisTexture = void 0;
|
|
4
|
-
const basis_module_loader_1 = require("../parsers/basis-module-loader");
|
|
5
|
-
/**
|
|
6
|
-
* Encodes image to Basis Universal Supercompressed GPU Texture.
|
|
7
|
-
* Code example is taken from here - https://github.com/BinomialLLC/basis_universal/blob/master/webgl/ktx2_encode_test/index.html#L279
|
|
8
|
-
* BasisEncoder API - https://github.com/BinomialLLC/basis_universal/blob/master/webgl/transcoder/basis_wrappers.cpp#L1712
|
|
9
|
-
* @param image
|
|
10
|
-
* @param options
|
|
11
|
-
*/
|
|
12
|
-
async function encodeKTX2BasisTexture(image, options = {}) {
|
|
13
|
-
// TODO remove default values after writer options will be normalized like it done in load module.
|
|
14
|
-
const { useSRGB = false, qualityLevel = 10, encodeUASTC = false, mipmaps = false } = options?.['ktx2-basis-writer'] || {};
|
|
15
|
-
const { BasisEncoder } = await (0, basis_module_loader_1.loadBasisEncoderModule)(options);
|
|
16
|
-
const basisEncoder = new BasisEncoder();
|
|
17
|
-
try {
|
|
18
|
-
const basisFileData = new Uint8Array(image.width * image.height * 4);
|
|
19
|
-
basisEncoder.setCreateKTX2File(true);
|
|
20
|
-
basisEncoder.setKTX2UASTCSupercompression(true);
|
|
21
|
-
basisEncoder.setKTX2SRGBTransferFunc(true);
|
|
22
|
-
basisEncoder.setSliceSourceImage(0, image.data, image.width, image.height, false);
|
|
23
|
-
basisEncoder.setPerceptual(useSRGB);
|
|
24
|
-
basisEncoder.setMipSRGB(useSRGB);
|
|
25
|
-
basisEncoder.setQualityLevel(qualityLevel);
|
|
26
|
-
basisEncoder.setUASTC(encodeUASTC);
|
|
27
|
-
basisEncoder.setMipGen(mipmaps);
|
|
28
|
-
const numOutputBytes = basisEncoder.encode(basisFileData);
|
|
29
|
-
const actualKTX2FileData = basisFileData.subarray(0, numOutputBytes).buffer;
|
|
30
|
-
return actualKTX2FileData;
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
// eslint-disable-next-line no-console
|
|
34
|
-
console.error('Basis Universal Supercompressed GPU Texture encoder Error: ', error);
|
|
35
|
-
throw error;
|
|
36
|
-
}
|
|
37
|
-
finally {
|
|
38
|
-
basisEncoder.delete();
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.encodeKTX2BasisTexture = encodeKTX2BasisTexture;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.encodeImageURLToCompressedTextureURL = void 0;
|
|
4
|
-
const worker_utils_1 = require("@loaders.gl/worker-utils");
|
|
5
|
-
/*
|
|
6
|
-
* @see https://github.com/TimvanScherpenzeel/texture-compressor
|
|
7
|
-
*/
|
|
8
|
-
async function encodeImageURLToCompressedTextureURL(inputUrl, outputUrl, options) {
|
|
9
|
-
// prettier-ignore
|
|
10
|
-
const args = [
|
|
11
|
-
// Note: our actual executable is `npx`, so `texture-compressor` is an argument
|
|
12
|
-
'texture-compressor',
|
|
13
|
-
'--type', 's3tc',
|
|
14
|
-
'--compression', 'DXT1',
|
|
15
|
-
'--quality', 'normal',
|
|
16
|
-
'--input', inputUrl,
|
|
17
|
-
'--output', outputUrl
|
|
18
|
-
];
|
|
19
|
-
const childProcess = new worker_utils_1.ChildProcessProxy();
|
|
20
|
-
await childProcess.start({
|
|
21
|
-
command: 'npx',
|
|
22
|
-
arguments: args,
|
|
23
|
-
spawn: options
|
|
24
|
-
});
|
|
25
|
-
return outputUrl;
|
|
26
|
-
}
|
|
27
|
-
exports.encodeImageURLToCompressedTextureURL = encodeImageURLToCompressedTextureURL;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GL_EXTENSIONS_CONSTANTS = void 0;
|
|
4
|
-
/* eslint-disable camelcase */
|
|
5
|
-
exports.GL_EXTENSIONS_CONSTANTS = {
|
|
6
|
-
// WEBGL_compressed_texture_s3tc
|
|
7
|
-
COMPRESSED_RGB_S3TC_DXT1_EXT: 0x83f0,
|
|
8
|
-
COMPRESSED_RGBA_S3TC_DXT1_EXT: 0x83f1,
|
|
9
|
-
COMPRESSED_RGBA_S3TC_DXT3_EXT: 0x83f2,
|
|
10
|
-
COMPRESSED_RGBA_S3TC_DXT5_EXT: 0x83f3,
|
|
11
|
-
// WEBGL_compressed_texture_es3
|
|
12
|
-
COMPRESSED_R11_EAC: 0x9270,
|
|
13
|
-
COMPRESSED_SIGNED_R11_EAC: 0x9271,
|
|
14
|
-
COMPRESSED_RG11_EAC: 0x9272,
|
|
15
|
-
COMPRESSED_SIGNED_RG11_EAC: 0x9273,
|
|
16
|
-
COMPRESSED_RGB8_ETC2: 0x9274,
|
|
17
|
-
COMPRESSED_RGBA8_ETC2_EAC: 0x9275,
|
|
18
|
-
COMPRESSED_SRGB8_ETC2: 0x9276,
|
|
19
|
-
COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: 0x9277,
|
|
20
|
-
COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: 0x9278,
|
|
21
|
-
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: 0x9279,
|
|
22
|
-
// WEBGL_compressed_texture_pvrtc
|
|
23
|
-
COMPRESSED_RGB_PVRTC_4BPPV1_IMG: 0x8c00,
|
|
24
|
-
COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: 0x8c02,
|
|
25
|
-
COMPRESSED_RGB_PVRTC_2BPPV1_IMG: 0x8c01,
|
|
26
|
-
COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: 0x8c03,
|
|
27
|
-
// WEBGL_compressed_texture_etc1
|
|
28
|
-
COMPRESSED_RGB_ETC1_WEBGL: 0x8d64,
|
|
29
|
-
// WEBGL_compressed_texture_atc
|
|
30
|
-
COMPRESSED_RGB_ATC_WEBGL: 0x8c92,
|
|
31
|
-
COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL: 0x8c93,
|
|
32
|
-
COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL: 0x87ee,
|
|
33
|
-
// WEBGL_compressed_texture_astc
|
|
34
|
-
COMPRESSED_RGBA_ASTC_4X4_KHR: 0x93b0,
|
|
35
|
-
COMPRESSED_RGBA_ASTC_5X4_KHR: 0x93b1,
|
|
36
|
-
COMPRESSED_RGBA_ASTC_5X5_KHR: 0x93b2,
|
|
37
|
-
COMPRESSED_RGBA_ASTC_6X5_KHR: 0x93b3,
|
|
38
|
-
COMPRESSED_RGBA_ASTC_6X6_KHR: 0x93b4,
|
|
39
|
-
COMPRESSED_RGBA_ASTC_8X5_KHR: 0x93b5,
|
|
40
|
-
COMPRESSED_RGBA_ASTC_8X6_KHR: 0x93b6,
|
|
41
|
-
COMPRESSED_RGBA_ASTC_8X8_KHR: 0x93b7,
|
|
42
|
-
COMPRESSED_RGBA_ASTC_10X5_KHR: 0x93b8,
|
|
43
|
-
COMPRESSED_RGBA_ASTC_10X6_KHR: 0x93b9,
|
|
44
|
-
COMPRESSED_RGBA_ASTC_10X8_KHR: 0x93ba,
|
|
45
|
-
COMPRESSED_RGBA_ASTC_10X10_KHR: 0x93bb,
|
|
46
|
-
COMPRESSED_RGBA_ASTC_12X10_KHR: 0x93bc,
|
|
47
|
-
COMPRESSED_RGBA_ASTC_12X12_KHR: 0x93bd,
|
|
48
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR: 0x93d0,
|
|
49
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR: 0x93d1,
|
|
50
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR: 0x93d2,
|
|
51
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR: 0x93d3,
|
|
52
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR: 0x93d4,
|
|
53
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR: 0x93d5,
|
|
54
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR: 0x93d6,
|
|
55
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR: 0x93d7,
|
|
56
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR: 0x93d8,
|
|
57
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR: 0x93d9,
|
|
58
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR: 0x93da,
|
|
59
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR: 0x93db,
|
|
60
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR: 0x93dc,
|
|
61
|
-
COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR: 0x93dd,
|
|
62
|
-
// EXT_texture_compression_rgtc
|
|
63
|
-
COMPRESSED_RED_RGTC1_EXT: 0x8dbb,
|
|
64
|
-
COMPRESSED_SIGNED_RED_RGTC1_EXT: 0x8dbc,
|
|
65
|
-
COMPRESSED_RED_GREEN_RGTC2_EXT: 0x8dbd,
|
|
66
|
-
COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT: 0x8dbe,
|
|
67
|
-
// WEBGL_compressed_texture_s3tc_srgb
|
|
68
|
-
COMPRESSED_SRGB_S3TC_DXT1_EXT: 0x8c4c,
|
|
69
|
-
COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: 0x8c4d,
|
|
70
|
-
COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: 0x8c4e,
|
|
71
|
-
COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: 0x8c4f
|
|
72
|
-
};
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadBasisEncoderModule = exports.loadBasisTranscoderModule = exports.BASIS_EXTERNAL_LIBRARIES = void 0;
|
|
4
|
-
const worker_utils_1 = require("@loaders.gl/worker-utils");
|
|
5
|
-
exports.BASIS_EXTERNAL_LIBRARIES = {
|
|
6
|
-
/** Basis transcoder, javascript wrapper part */
|
|
7
|
-
TRANSCODER: 'basis_transcoder.js',
|
|
8
|
-
/** Basis transcoder, compiled web assembly part */
|
|
9
|
-
TRANSCODER_WASM: 'basis_transcoder.wasm',
|
|
10
|
-
/** Basis encoder, javascript wrapper part */
|
|
11
|
-
ENCODER: 'basis_encoder.js',
|
|
12
|
-
/** Basis encoder, compiled web assembly part */
|
|
13
|
-
ENCODER_WASM: 'basis_encoder.wasm'
|
|
14
|
-
};
|
|
15
|
-
let loadBasisTranscoderPromise;
|
|
16
|
-
/**
|
|
17
|
-
* Loads wasm transcoder module
|
|
18
|
-
* @param options
|
|
19
|
-
* @returns {BasisFile} promise
|
|
20
|
-
*/
|
|
21
|
-
async function loadBasisTranscoderModule(options) {
|
|
22
|
-
const modules = options.modules || {};
|
|
23
|
-
if (modules.basis) {
|
|
24
|
-
return modules.basis;
|
|
25
|
-
}
|
|
26
|
-
loadBasisTranscoderPromise = loadBasisTranscoderPromise || loadBasisTranscoder(options);
|
|
27
|
-
return await loadBasisTranscoderPromise;
|
|
28
|
-
}
|
|
29
|
-
exports.loadBasisTranscoderModule = loadBasisTranscoderModule;
|
|
30
|
-
/**
|
|
31
|
-
* Loads wasm transcoder module
|
|
32
|
-
* @param options
|
|
33
|
-
* @returns {BasisFile} promise
|
|
34
|
-
*/
|
|
35
|
-
async function loadBasisTranscoder(options) {
|
|
36
|
-
let BASIS = null;
|
|
37
|
-
let wasmBinary = null;
|
|
38
|
-
[BASIS, wasmBinary] = await Promise.all([
|
|
39
|
-
await (0, worker_utils_1.loadLibrary)(exports.BASIS_EXTERNAL_LIBRARIES.TRANSCODER, 'textures', options),
|
|
40
|
-
await (0, worker_utils_1.loadLibrary)(exports.BASIS_EXTERNAL_LIBRARIES.TRANSCODER_WASM, 'textures', options)
|
|
41
|
-
]);
|
|
42
|
-
// Depends on how import happened...
|
|
43
|
-
// @ts-ignore TS2339: Property does not exist on type
|
|
44
|
-
BASIS = BASIS || globalThis.BASIS;
|
|
45
|
-
return await initializeBasisTranscoderModule(BASIS, wasmBinary);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Initialize wasm transcoder module
|
|
49
|
-
* @param BasisModule - js part of the module
|
|
50
|
-
* @param wasmBinary - wasm part of the module
|
|
51
|
-
* @returns {BasisFile} promise
|
|
52
|
-
*/
|
|
53
|
-
function initializeBasisTranscoderModule(BasisModule, wasmBinary) {
|
|
54
|
-
const options = {};
|
|
55
|
-
if (wasmBinary) {
|
|
56
|
-
options.wasmBinary = wasmBinary;
|
|
57
|
-
}
|
|
58
|
-
return new Promise((resolve) => {
|
|
59
|
-
// if you try to return BasisModule the browser crashes!
|
|
60
|
-
BasisModule(options).then((module) => {
|
|
61
|
-
const { BasisFile, initializeBasis } = module;
|
|
62
|
-
initializeBasis();
|
|
63
|
-
resolve({ BasisFile });
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
let loadBasisEncoderPromise;
|
|
68
|
-
/**
|
|
69
|
-
* Loads wasm encoder module
|
|
70
|
-
* @param options
|
|
71
|
-
* @returns {BasisFile, KTX2File} promise
|
|
72
|
-
*/
|
|
73
|
-
async function loadBasisEncoderModule(options) {
|
|
74
|
-
const modules = options.modules || {};
|
|
75
|
-
if (modules.basisEncoder) {
|
|
76
|
-
return modules.basisEncoder;
|
|
77
|
-
}
|
|
78
|
-
loadBasisEncoderPromise = loadBasisEncoderPromise || loadBasisEncoder(options);
|
|
79
|
-
return await loadBasisEncoderPromise;
|
|
80
|
-
}
|
|
81
|
-
exports.loadBasisEncoderModule = loadBasisEncoderModule;
|
|
82
|
-
/**
|
|
83
|
-
* Loads wasm encoder module
|
|
84
|
-
* @param options
|
|
85
|
-
* @returns {BasisFile, KTX2File} promise
|
|
86
|
-
*/
|
|
87
|
-
async function loadBasisEncoder(options) {
|
|
88
|
-
let BASIS_ENCODER = null;
|
|
89
|
-
let wasmBinary = null;
|
|
90
|
-
[BASIS_ENCODER, wasmBinary] = await Promise.all([
|
|
91
|
-
await (0, worker_utils_1.loadLibrary)(exports.BASIS_EXTERNAL_LIBRARIES.ENCODER, 'textures', options),
|
|
92
|
-
await (0, worker_utils_1.loadLibrary)(exports.BASIS_EXTERNAL_LIBRARIES.ENCODER_WASM, 'textures', options)
|
|
93
|
-
]);
|
|
94
|
-
// Depends on how import happened...
|
|
95
|
-
// @ts-ignore TS2339: Property does not exist on type
|
|
96
|
-
BASIS_ENCODER = BASIS_ENCODER || globalThis.BASIS;
|
|
97
|
-
return await initializeBasisEncoderModule(BASIS_ENCODER, wasmBinary);
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Initialize wasm transcoder module
|
|
101
|
-
* @param BasisEncoderModule - js part of the module
|
|
102
|
-
* @param wasmBinary - wasm part of the module
|
|
103
|
-
* @returns {BasisFile, KTX2File} promise
|
|
104
|
-
*/
|
|
105
|
-
function initializeBasisEncoderModule(BasisEncoderModule, wasmBinary) {
|
|
106
|
-
const options = {};
|
|
107
|
-
if (wasmBinary) {
|
|
108
|
-
options.wasmBinary = wasmBinary;
|
|
109
|
-
}
|
|
110
|
-
return new Promise((resolve) => {
|
|
111
|
-
// if you try to return BasisModule the browser crashes!
|
|
112
|
-
BasisEncoderModule(options).then((module) => {
|
|
113
|
-
const { BasisFile, KTX2File, initializeBasis, BasisEncoder } = module;
|
|
114
|
-
initializeBasis();
|
|
115
|
-
resolve({ BasisFile, KTX2File, BasisEncoder });
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadCrunchModule = exports.CRUNCH_EXTERNAL_LIBRARIES = void 0;
|
|
4
|
-
// @ts-nocheck
|
|
5
|
-
const worker_utils_1 = require("@loaders.gl/worker-utils");
|
|
6
|
-
exports.CRUNCH_EXTERNAL_LIBRARIES = {
|
|
7
|
-
/** Crunch decoder library. It is used as dynamically imported script */
|
|
8
|
-
DECODER: 'crunch.js'
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Load crunch decoder module
|
|
12
|
-
* @param options - loader options
|
|
13
|
-
* @returns Promise of module object
|
|
14
|
-
*/
|
|
15
|
-
async function loadCrunchModule(options) {
|
|
16
|
-
const modules = options.modules || {};
|
|
17
|
-
if (modules.crunch) {
|
|
18
|
-
return modules.crunch;
|
|
19
|
-
}
|
|
20
|
-
return loadCrunch(options);
|
|
21
|
-
}
|
|
22
|
-
exports.loadCrunchModule = loadCrunchModule;
|
|
23
|
-
let crunchModule;
|
|
24
|
-
/**
|
|
25
|
-
* Load crunch decoder module
|
|
26
|
-
* @param {any} options - Loader options
|
|
27
|
-
* @returns {Promise<any>} Promise of Module object
|
|
28
|
-
*/
|
|
29
|
-
async function loadCrunch(options) {
|
|
30
|
-
if (crunchModule) {
|
|
31
|
-
return crunchModule;
|
|
32
|
-
}
|
|
33
|
-
let loadCrunchDecoder = await (0, worker_utils_1.loadLibrary)(exports.CRUNCH_EXTERNAL_LIBRARIES.DECODER, 'textures', options);
|
|
34
|
-
// Depends on how import happened...
|
|
35
|
-
// @ts-ignore TS2339: Property does not exist on type
|
|
36
|
-
loadCrunchDecoder = loadCrunchDecoder || globalThis.LoadCrunchDecoder;
|
|
37
|
-
crunchModule = loadCrunchDecoder();
|
|
38
|
-
return crunchModule;
|
|
39
|
-
}
|