@loaders.gl/textures 3.1.3 → 3.1.7

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.
@@ -28,9 +28,8 @@
28
28
  });
29
29
 
30
30
  // ../worker-utils/src/lib/env-utils/version.ts
31
- var DEFAULT_VERSION = "latest";
32
- var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : DEFAULT_VERSION;
33
- if (typeof __VERSION__ === "undefined") {
31
+ var VERSION = true ? "3.1.7" : DEFAULT_VERSION;
32
+ if (false) {
34
33
  console.error("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
35
34
  }
36
35
 
@@ -281,10 +280,10 @@
281
280
  }
282
281
 
283
282
  // src/lib/utils/version.ts
284
- var VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
283
+ var VERSION3 = true ? "3.1.7" : "latest";
285
284
 
286
285
  // src/lib/parsers/basis-module-loader.ts
287
- var VERSION4 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
286
+ var VERSION4 = true ? "3.1.7" : "latest";
288
287
  var BASIS_CDN_ENCODER_WASM = `https://unpkg.com/@loaders.gl/textures@${VERSION4}/dist/libs/basis_encoder.wasm`;
289
288
  var BASIS_CDN_ENCODER_JS = `https://unpkg.com/@loaders.gl/textures@${VERSION4}/dist/libs/basis_encoder.js`;
290
289
  var loadBasisTranscoderPromise;
@@ -35,9 +35,8 @@
35
35
  }
36
36
 
37
37
  // ../worker-utils/src/lib/env-utils/version.ts
38
- var DEFAULT_VERSION = "latest";
39
- var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : DEFAULT_VERSION;
40
- if (typeof __VERSION__ === "undefined") {
38
+ var VERSION = true ? "3.1.7" : DEFAULT_VERSION;
39
+ if (false) {
41
40
  console.error("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
42
41
  }
43
42
 
@@ -288,7 +287,7 @@
288
287
  }
289
288
 
290
289
  // src/lib/utils/version.ts
291
- var VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
290
+ var VERSION3 = true ? "3.1.7" : "latest";
292
291
 
293
292
  // ../../node_modules/ktx-parse/dist/ktx-parse.modern.js
294
293
  var t = new Uint8Array([0]);
@@ -876,7 +875,7 @@
876
875
  }
877
876
 
878
877
  // src/lib/parsers/basis-module-loader.ts
879
- var VERSION4 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
878
+ var VERSION4 = true ? "3.1.7" : "latest";
880
879
  var BASIS_CDN_ENCODER_WASM = `https://unpkg.com/@loaders.gl/textures@${VERSION4}/dist/libs/basis_encoder.wasm`;
881
880
  var BASIS_CDN_ENCODER_JS = `https://unpkg.com/@loaders.gl/textures@${VERSION4}/dist/libs/basis_encoder.js`;
882
881
  var loadBasisTranscoderPromise;
@@ -35,9 +35,8 @@
35
35
  }
36
36
 
37
37
  // ../worker-utils/src/lib/env-utils/version.ts
38
- var DEFAULT_VERSION = "latest";
39
- var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : DEFAULT_VERSION;
40
- if (typeof __VERSION__ === "undefined") {
38
+ var VERSION = true ? "3.1.7" : DEFAULT_VERSION;
39
+ if (false) {
41
40
  console.error("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
42
41
  }
43
42
 
@@ -288,7 +287,7 @@
288
287
  }
289
288
 
290
289
  // src/lib/utils/version.ts
291
- var VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
290
+ var VERSION3 = true ? "3.1.7" : "latest";
292
291
 
293
292
  // src/crunch-loader.ts
294
293
  var CrunchLoader = {
@@ -321,7 +320,7 @@
321
320
  return crunchModule;
322
321
  }
323
322
  let loadCrunchDecoder = await loadLibrary("crunch.js", "textures", options);
324
- loadCrunchDecoder = loadCrunchDecoder || globalThis.loadCrunchDecoder;
323
+ loadCrunchDecoder = loadCrunchDecoder || globalThis.LoadCrunchDecoder;
325
324
  crunchModule = loadCrunchDecoder();
326
325
  return crunchModule;
327
326
  }
@@ -16,7 +16,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
16
16
 
17
17
  var _workerUtils = require("@loaders.gl/worker-utils");
18
18
 
19
- var VERSION = typeof "3.1.3" !== 'undefined' ? "3.1.3" : 'latest';
19
+ var VERSION = typeof "3.1.7" !== 'undefined' ? "3.1.7" : 'latest';
20
20
  var BASIS_CDN_ENCODER_WASM = "https://unpkg.com/@loaders.gl/textures@".concat(VERSION, "/dist/libs/basis_encoder.wasm");
21
21
  var BASIS_CDN_ENCODER_JS = "https://unpkg.com/@loaders.gl/textures@".concat(VERSION, "/dist/libs/basis_encoder.js");
22
22
  var loadBasisTranscoderPromise;
@@ -72,7 +72,7 @@ function _loadCrunch() {
72
72
 
73
73
  case 4:
74
74
  loadCrunchDecoder = _context2.sent;
75
- loadCrunchDecoder = loadCrunchDecoder || globalThis.loadCrunchDecoder;
75
+ loadCrunchDecoder = loadCrunchDecoder || globalThis.LoadCrunchDecoder;
76
76
  crunchModule = loadCrunchDecoder();
77
77
  return _context2.abrupt("return", crunchModule);
78
78
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/parsers/crunch-module-loader.ts"],"names":["loadCrunchModule","options","modules","crunch","loadCrunch","crunchModule","loadCrunchDecoder","globalThis"],"mappings":";;;;;;;;;;;;;AACA;;SAOsBA,gB;;;;;gFAAf,iBAAgCC,OAAhC;AAAA;AAAA;AAAA;AAAA;AAAA;AACCC,YAAAA,OADD,GACWD,OAAO,CAACC,OAAR,IAAmB,EAD9B;;AAAA,iBAEDA,OAAO,CAACC,MAFP;AAAA;AAAA;AAAA;;AAAA,6CAGID,OAAO,CAACC,MAHZ;;AAAA;AAAA,6CAMEC,UAAU,CAACH,OAAD,CANZ;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AASP,IAAII,YAAJ;;SAOeD,U;;;;;0EAAf,kBAA0BH,OAA1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBACMI,YADN;AAAA;AAAA;AAAA;;AAAA,8CAEWA,YAFX;;AAAA;AAAA;AAAA,mBAKgC,8BAAY,WAAZ,EAAyB,UAAzB,EAAqCJ,OAArC,CALhC;;AAAA;AAKMK,YAAAA,iBALN;AASEA,YAAAA,iBAAiB,GAAGA,iBAAiB,IAAIC,UAAU,CAACD,iBAApD;AACAD,YAAAA,YAAY,GAAGC,iBAAiB,EAAhC;AAVF,8CAWSD,YAXT;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G","sourcesContent":["// @ts-nocheck\nimport {loadLibrary} from '@loaders.gl/worker-utils';\n\n/**\n * Load crunch decoder module\n * @param options - loader options\n * @returns Promise of module object\n */\nexport async function loadCrunchModule(options): Promise<any> {\n const modules = options.modules || {};\n if (modules.crunch) {\n return modules.crunch;\n }\n\n return loadCrunch(options);\n}\n\nlet crunchModule;\n\n/**\n * Load crunch decoder module\n * @param {any} options - Loader options\n * @returns {Promise<any>} Promise of Module object\n */\nasync function loadCrunch(options) {\n if (crunchModule) {\n return crunchModule;\n }\n\n let loadCrunchDecoder = await loadLibrary('crunch.js', 'textures', options);\n\n // Depends on how import happened...\n // @ts-ignore TS2339: Property does not exist on type\n loadCrunchDecoder = loadCrunchDecoder || globalThis.loadCrunchDecoder;\n crunchModule = loadCrunchDecoder();\n return crunchModule;\n}\n"],"file":"crunch-module-loader.js"}
1
+ {"version":3,"sources":["../../../../src/lib/parsers/crunch-module-loader.ts"],"names":["loadCrunchModule","options","modules","crunch","loadCrunch","crunchModule","loadCrunchDecoder","globalThis","LoadCrunchDecoder"],"mappings":";;;;;;;;;;;;;AACA;;SAOsBA,gB;;;;;gFAAf,iBAAgCC,OAAhC;AAAA;AAAA;AAAA;AAAA;AAAA;AACCC,YAAAA,OADD,GACWD,OAAO,CAACC,OAAR,IAAmB,EAD9B;;AAAA,iBAEDA,OAAO,CAACC,MAFP;AAAA;AAAA;AAAA;;AAAA,6CAGID,OAAO,CAACC,MAHZ;;AAAA;AAAA,6CAMEC,UAAU,CAACH,OAAD,CANZ;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AASP,IAAII,YAAJ;;SAOeD,U;;;;;0EAAf,kBAA0BH,OAA1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBACMI,YADN;AAAA;AAAA;AAAA;;AAAA,8CAEWA,YAFX;;AAAA;AAAA;AAAA,mBAKgC,8BAAY,WAAZ,EAAyB,UAAzB,EAAqCJ,OAArC,CALhC;;AAAA;AAKMK,YAAAA,iBALN;AASEA,YAAAA,iBAAiB,GAAGA,iBAAiB,IAAIC,UAAU,CAACC,iBAApD;AACAH,YAAAA,YAAY,GAAGC,iBAAiB,EAAhC;AAVF,8CAWSD,YAXT;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G","sourcesContent":["// @ts-nocheck\nimport {loadLibrary} from '@loaders.gl/worker-utils';\n\n/**\n * Load crunch decoder module\n * @param options - loader options\n * @returns Promise of module object\n */\nexport async function loadCrunchModule(options): Promise<any> {\n const modules = options.modules || {};\n if (modules.crunch) {\n return modules.crunch;\n }\n\n return loadCrunch(options);\n}\n\nlet crunchModule;\n\n/**\n * Load crunch decoder module\n * @param {any} options - Loader options\n * @returns {Promise<any>} Promise of Module object\n */\nasync function loadCrunch(options) {\n if (crunchModule) {\n return crunchModule;\n }\n\n let loadCrunchDecoder = await loadLibrary('crunch.js', 'textures', options);\n\n // Depends on how import happened...\n // @ts-ignore TS2339: Property does not exist on type\n loadCrunchDecoder = loadCrunchDecoder || globalThis.LoadCrunchDecoder;\n crunchModule = loadCrunchDecoder();\n return crunchModule;\n}\n"],"file":"crunch-module-loader.js"}
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.VERSION = void 0;
7
- var VERSION = typeof "3.1.3" !== 'undefined' ? "3.1.3" : 'latest';
7
+ var VERSION = typeof "3.1.7" !== 'undefined' ? "3.1.7" : 'latest';
8
8
  exports.VERSION = VERSION;
9
9
  //# sourceMappingURL=version.js.map
@@ -1,4 +1,4 @@
1
- const VERSION = typeof "3.1.3" !== 'undefined' ? "3.1.3" : 'latest';
1
+ const VERSION = typeof "3.1.7" !== 'undefined' ? "3.1.7" : 'latest';
2
2
  import { loadLibrary } from '@loaders.gl/worker-utils';
3
3
  const BASIS_CDN_ENCODER_WASM = "https://unpkg.com/@loaders.gl/textures@".concat(VERSION, "/dist/libs/basis_encoder.wasm");
4
4
  const BASIS_CDN_ENCODER_JS = "https://unpkg.com/@loaders.gl/textures@".concat(VERSION, "/dist/libs/basis_encoder.js");
@@ -16,7 +16,7 @@ async function loadCrunch(options) {
16
16
  }
17
17
 
18
18
  let loadCrunchDecoder = await loadLibrary('crunch.js', 'textures', options);
19
- loadCrunchDecoder = loadCrunchDecoder || globalThis.loadCrunchDecoder;
19
+ loadCrunchDecoder = loadCrunchDecoder || globalThis.LoadCrunchDecoder;
20
20
  crunchModule = loadCrunchDecoder();
21
21
  return crunchModule;
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/parsers/crunch-module-loader.ts"],"names":["loadLibrary","loadCrunchModule","options","modules","crunch","loadCrunch","crunchModule","loadCrunchDecoder","globalThis"],"mappings":"AACA,SAAQA,WAAR,QAA0B,0BAA1B;AAOA,OAAO,eAAeC,gBAAf,CAAgCC,OAAhC,EAAuD;AAC5D,QAAMC,OAAO,GAAGD,OAAO,CAACC,OAAR,IAAmB,EAAnC;;AACA,MAAIA,OAAO,CAACC,MAAZ,EAAoB;AAClB,WAAOD,OAAO,CAACC,MAAf;AACD;;AAED,SAAOC,UAAU,CAACH,OAAD,CAAjB;AACD;AAED,IAAII,YAAJ;;AAOA,eAAeD,UAAf,CAA0BH,OAA1B,EAAmC;AACjC,MAAII,YAAJ,EAAkB;AAChB,WAAOA,YAAP;AACD;;AAED,MAAIC,iBAAiB,GAAG,MAAMP,WAAW,CAAC,WAAD,EAAc,UAAd,EAA0BE,OAA1B,CAAzC;AAIAK,EAAAA,iBAAiB,GAAGA,iBAAiB,IAAIC,UAAU,CAACD,iBAApD;AACAD,EAAAA,YAAY,GAAGC,iBAAiB,EAAhC;AACA,SAAOD,YAAP;AACD","sourcesContent":["// @ts-nocheck\nimport {loadLibrary} from '@loaders.gl/worker-utils';\n\n/**\n * Load crunch decoder module\n * @param options - loader options\n * @returns Promise of module object\n */\nexport async function loadCrunchModule(options): Promise<any> {\n const modules = options.modules || {};\n if (modules.crunch) {\n return modules.crunch;\n }\n\n return loadCrunch(options);\n}\n\nlet crunchModule;\n\n/**\n * Load crunch decoder module\n * @param {any} options - Loader options\n * @returns {Promise<any>} Promise of Module object\n */\nasync function loadCrunch(options) {\n if (crunchModule) {\n return crunchModule;\n }\n\n let loadCrunchDecoder = await loadLibrary('crunch.js', 'textures', options);\n\n // Depends on how import happened...\n // @ts-ignore TS2339: Property does not exist on type\n loadCrunchDecoder = loadCrunchDecoder || globalThis.loadCrunchDecoder;\n crunchModule = loadCrunchDecoder();\n return crunchModule;\n}\n"],"file":"crunch-module-loader.js"}
1
+ {"version":3,"sources":["../../../../src/lib/parsers/crunch-module-loader.ts"],"names":["loadLibrary","loadCrunchModule","options","modules","crunch","loadCrunch","crunchModule","loadCrunchDecoder","globalThis","LoadCrunchDecoder"],"mappings":"AACA,SAAQA,WAAR,QAA0B,0BAA1B;AAOA,OAAO,eAAeC,gBAAf,CAAgCC,OAAhC,EAAuD;AAC5D,QAAMC,OAAO,GAAGD,OAAO,CAACC,OAAR,IAAmB,EAAnC;;AACA,MAAIA,OAAO,CAACC,MAAZ,EAAoB;AAClB,WAAOD,OAAO,CAACC,MAAf;AACD;;AAED,SAAOC,UAAU,CAACH,OAAD,CAAjB;AACD;AAED,IAAII,YAAJ;;AAOA,eAAeD,UAAf,CAA0BH,OAA1B,EAAmC;AACjC,MAAII,YAAJ,EAAkB;AAChB,WAAOA,YAAP;AACD;;AAED,MAAIC,iBAAiB,GAAG,MAAMP,WAAW,CAAC,WAAD,EAAc,UAAd,EAA0BE,OAA1B,CAAzC;AAIAK,EAAAA,iBAAiB,GAAGA,iBAAiB,IAAIC,UAAU,CAACC,iBAApD;AACAH,EAAAA,YAAY,GAAGC,iBAAiB,EAAhC;AACA,SAAOD,YAAP;AACD","sourcesContent":["// @ts-nocheck\nimport {loadLibrary} from '@loaders.gl/worker-utils';\n\n/**\n * Load crunch decoder module\n * @param options - loader options\n * @returns Promise of module object\n */\nexport async function loadCrunchModule(options): Promise<any> {\n const modules = options.modules || {};\n if (modules.crunch) {\n return modules.crunch;\n }\n\n return loadCrunch(options);\n}\n\nlet crunchModule;\n\n/**\n * Load crunch decoder module\n * @param {any} options - Loader options\n * @returns {Promise<any>} Promise of Module object\n */\nasync function loadCrunch(options) {\n if (crunchModule) {\n return crunchModule;\n }\n\n let loadCrunchDecoder = await loadLibrary('crunch.js', 'textures', options);\n\n // Depends on how import happened...\n // @ts-ignore TS2339: Property does not exist on type\n loadCrunchDecoder = loadCrunchDecoder || globalThis.LoadCrunchDecoder;\n crunchModule = loadCrunchDecoder();\n return crunchModule;\n}\n"],"file":"crunch-module-loader.js"}
@@ -1,2 +1,2 @@
1
- export const VERSION = typeof "3.1.3" !== 'undefined' ? "3.1.3" : 'latest';
1
+ export const VERSION = typeof "3.1.7" !== 'undefined' ? "3.1.7" : 'latest';
2
2
  //# sourceMappingURL=version.js.map
@@ -29,7 +29,7 @@ async function loadCrunch(options) {
29
29
  let loadCrunchDecoder = await (0, worker_utils_1.loadLibrary)('crunch.js', 'textures', options);
30
30
  // Depends on how import happened...
31
31
  // @ts-ignore TS2339: Property does not exist on type
32
- loadCrunchDecoder = loadCrunchDecoder || globalThis.loadCrunchDecoder;
32
+ loadCrunchDecoder = loadCrunchDecoder || globalThis.LoadCrunchDecoder;
33
33
  crunchModule = loadCrunchDecoder();
34
34
  return crunchModule;
35
35
  }
@@ -1,6 +1,6 @@
1
1
  (() => {
2
2
  // src/lib/utils/version.ts
3
- var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
3
+ var VERSION = true ? "3.1.7" : "latest";
4
4
 
5
5
  // src/lib/parsers/parse-npy.ts
6
6
  function systemIsLittleEndian() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/textures",
3
- "version": "3.1.3",
3
+ "version": "3.1.7",
4
4
  "description": "Framework-independent loaders for compressed and super compressed (basis) textures ",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -36,17 +36,17 @@
36
36
  "copy-libs": "cp -rf ./src/libs ./dist/libs",
37
37
  "build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/dist.min.js",
38
38
  "build-worker": "npm run build-basis-worker && npm run build-npy-worker && npm run build-compressed-texture-worker && npm run build-crunch-worker",
39
- "build-basis-worker": "esbuild src/workers/basis-worker.ts --bundle --outfile=dist/basis-worker.js",
40
- "build-npy-worker": "esbuild src/workers/npy-worker.ts --bundle --outfile=dist/npy-worker.js",
41
- "build-compressed-texture-worker": "esbuild src/workers/compressed-texture-worker.ts --bundle --outfile=dist/compressed-texture-worker.js",
42
- "build-crunch-worker": "esbuild src/workers/crunch-worker.ts --bundle --outfile=dist/crunch-worker.js"
39
+ "build-basis-worker": "esbuild src/workers/basis-worker.ts --bundle --outfile=dist/basis-worker.js --define:__VERSION__=\\\"$npm_package_version\\\"",
40
+ "build-npy-worker": "esbuild src/workers/npy-worker.ts --bundle --outfile=dist/npy-worker.js --define:__VERSION__=\\\"$npm_package_version\\\"",
41
+ "build-compressed-texture-worker": "esbuild src/workers/compressed-texture-worker.ts --bundle --outfile=dist/compressed-texture-worker.js --define:__VERSION__=\\\"$npm_package_version\\\"",
42
+ "build-crunch-worker": "esbuild src/workers/crunch-worker.ts --bundle --outfile=dist/crunch-worker.js --define:__VERSION__=\\\"$npm_package_version\\\""
43
43
  },
44
44
  "dependencies": {
45
- "@loaders.gl/images": "3.1.3",
46
- "@loaders.gl/loader-utils": "3.1.3",
47
- "@loaders.gl/worker-utils": "3.1.3",
45
+ "@loaders.gl/images": "3.1.7",
46
+ "@loaders.gl/loader-utils": "3.1.7",
47
+ "@loaders.gl/worker-utils": "3.1.7",
48
48
  "ktx-parse": "^0.0.4",
49
49
  "texture-compressor": "^1.0.2"
50
50
  },
51
- "gitHead": "4a690c369779346d73c9a27395d1c08d77d279a4"
51
+ "gitHead": "e48d29e426e9f23879875763e73efc5c58345be1"
52
52
  }
@@ -31,7 +31,7 @@ async function loadCrunch(options) {
31
31
 
32
32
  // Depends on how import happened...
33
33
  // @ts-ignore TS2339: Property does not exist on type
34
- loadCrunchDecoder = loadCrunchDecoder || globalThis.loadCrunchDecoder;
34
+ loadCrunchDecoder = loadCrunchDecoder || globalThis.LoadCrunchDecoder;
35
35
  crunchModule = loadCrunchDecoder();
36
36
  return crunchModule;
37
37
  }