@loaders.gl/i3s 4.0.0-alpha.24 → 4.0.0-alpha.26

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.
@@ -65,11 +65,37 @@
65
65
  var matches = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
66
66
  var nodeVersion = matches && parseFloat(matches[1]) || 0;
67
67
 
68
+ // ../loader-utils/src/lib/option-utils/merge-loader-options.ts
69
+ function mergeLoaderOptions(baseOptions, newOptions) {
70
+ return mergeOptionsRecursively(baseOptions || {}, newOptions);
71
+ }
72
+ function mergeOptionsRecursively(baseOptions, newOptions) {
73
+ const options = { ...baseOptions };
74
+ for (const [key, newValue] of Object.entries(newOptions)) {
75
+ if (newValue && typeof newValue === "object" && !Array.isArray(newValue)) {
76
+ options[key] = mergeOptionsRecursively(options[key] || {}, newOptions[key]);
77
+ } else {
78
+ options[key] = newOptions[key];
79
+ }
80
+ }
81
+ return options;
82
+ }
83
+
68
84
  // ../worker-utils/src/lib/env-utils/version.ts
69
- var VERSION = true ? "4.0.0-alpha.24" : DEFAULT_VERSION;
70
- if (false) {
71
- console.error("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
85
+ var NPM_TAG = "beta";
86
+ function getVersion() {
87
+ if (!globalThis._loadersgl_?.version) {
88
+ globalThis._loadersgl_ = globalThis._loadersgl_ || {};
89
+ if (false) {
90
+ console.error("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
91
+ globalThis._loadersgl_.version = NPM_TAG;
92
+ } else {
93
+ globalThis._loadersgl_.version = "4.0.0-alpha.26";
94
+ }
95
+ }
96
+ return globalThis._loadersgl_.version;
72
97
  }
98
+ var VERSION = getVersion();
73
99
 
74
100
  // ../worker-utils/src/lib/env-utils/assert.ts
75
101
  function assert2(condition, message) {
@@ -531,7 +557,6 @@
531
557
  }
532
558
 
533
559
  // ../worker-utils/src/lib/worker-api/get-worker-url.ts
534
- var NPM_TAG = "beta";
535
560
  function getWorkerURL(worker, options = {}) {
536
561
  const workerOptions = options[worker.id] || {};
537
562
  const workerFile = isBrowser2 ? `${worker.id}-worker.js` : `${worker.id}-worker-node.js`;
@@ -566,8 +591,6 @@
566
591
 
567
592
  // ../worker-utils/src/lib/library-utils/library-utils.ts
568
593
  var node = __toModule(require_require_utils());
569
- var LATEST = "beta";
570
- var VERSION2 = typeof VERSION !== "undefined" ? VERSION : LATEST;
571
594
  var loadLibraryPromises = {};
572
595
  async function loadLibrary(libraryUrl, moduleName = null, options = {}, libraryName = null) {
573
596
  if (moduleName) {
@@ -590,7 +613,7 @@
590
613
  }
591
614
  if (options.CDN) {
592
615
  assert2(options.CDN.startsWith("http"));
593
- return `${options.CDN}/${moduleName}@${VERSION2}/dist/libs/${libraryName}`;
616
+ return `${options.CDN}/${moduleName}@${VERSION}/dist/libs/${libraryName}`;
594
617
  }
595
618
  if (isWorker) {
596
619
  return `../src/libs/${libraryName}`;
@@ -1272,7 +1295,7 @@
1272
1295
  var navigator_ = globalThis.navigator || {};
1273
1296
 
1274
1297
  // ../../node_modules/@probe.gl/log/node_modules/@probe.gl/env/dist/utils/globals.js
1275
- var VERSION3 = true ? "4.0.0-alpha.24" : "untranspiled source";
1298
+ var VERSION2 = true ? "4.0.0-alpha.26" : "untranspiled source";
1276
1299
  var isBrowser4 = isBrowser3();
1277
1300
 
1278
1301
  // ../../node_modules/@probe.gl/log/dist/utils/local-storage.js
@@ -1457,7 +1480,7 @@
1457
1480
  id: ""
1458
1481
  };
1459
1482
  _defineProperty(this, "id", void 0);
1460
- _defineProperty(this, "VERSION", VERSION3);
1483
+ _defineProperty(this, "VERSION", VERSION2);
1461
1484
  _defineProperty(this, "_startTs", getHiResTimestamp());
1462
1485
  _defineProperty(this, "_deltaTs", getHiResTimestamp());
1463
1486
  _defineProperty(this, "_storage", void 0);
@@ -1660,7 +1683,7 @@
1660
1683
  return noop;
1661
1684
  }
1662
1685
  };
1663
- _defineProperty(Log, "VERSION", VERSION3);
1686
+ _defineProperty(Log, "VERSION", VERSION2);
1664
1687
  function normalizeLogLevel(logLevel) {
1665
1688
  if (!logLevel) {
1666
1689
  return 0;
@@ -2390,6 +2413,7 @@
2390
2413
  }
2391
2414
  async function parseWithLoader(loader, data, options, context) {
2392
2415
  validateWorkerVersion(loader);
2416
+ options = mergeLoaderOptions(loader.options, options);
2393
2417
  if (isResponse(data)) {
2394
2418
  const response = data;
2395
2419
  const { ok, redirected, status, statusText, type, url } = response;
@@ -4622,7 +4646,7 @@
4622
4646
  _defineProperty(Ellipsoid, "WGS84", new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z));
4623
4647
 
4624
4648
  // ../images/src/lib/utils/version.ts
4625
- var VERSION4 = true ? "4.0.0-alpha.24" : "latest";
4649
+ var VERSION3 = true ? "4.0.0-alpha.26" : "latest";
4626
4650
 
4627
4651
  // ../images/src/lib/category-api/image-type.ts
4628
4652
  var { _parseImageNode } = globalThis;
@@ -5010,7 +5034,7 @@
5010
5034
  id: "image",
5011
5035
  module: "images",
5012
5036
  name: "Images",
5013
- version: VERSION4,
5037
+ version: VERSION3,
5014
5038
  mimeTypes: MIME_TYPES,
5015
5039
  extensions: EXTENSIONS,
5016
5040
  parse: parseImage,
@@ -5019,7 +5043,7 @@
5019
5043
  };
5020
5044
 
5021
5045
  // ../draco/src/lib/utils/version.ts
5022
- var VERSION5 = true ? "4.0.0-alpha.24" : "latest";
5046
+ var VERSION4 = true ? "4.0.0-alpha.26" : "latest";
5023
5047
 
5024
5048
  // ../draco/src/draco-loader.ts
5025
5049
  var DEFAULT_DRACO_OPTIONS = {
@@ -5034,7 +5058,7 @@
5034
5058
  name: "Draco",
5035
5059
  id: "draco",
5036
5060
  module: "draco",
5037
- version: VERSION5,
5061
+ version: VERSION4,
5038
5062
  worker: true,
5039
5063
  extensions: ["drc"],
5040
5064
  mimeTypes: ["application/octet-stream"],
@@ -5572,7 +5596,7 @@
5572
5596
  }
5573
5597
 
5574
5598
  // ../textures/src/lib/utils/version.ts
5575
- var VERSION6 = true ? "4.0.0-alpha.24" : "beta";
5599
+ var VERSION5 = true ? "4.0.0-alpha.26" : "beta";
5576
5600
 
5577
5601
  // ../textures/src/lib/parsers/basis-module-loader.ts
5578
5602
  var BASIS_EXTERNAL_LIBRARIES = {
@@ -6170,7 +6194,7 @@
6170
6194
  name: "Basis",
6171
6195
  id: "basis",
6172
6196
  module: "textures",
6173
- version: VERSION6,
6197
+ version: VERSION5,
6174
6198
  worker: true,
6175
6199
  extensions: ["basis", "ktx2"],
6176
6200
  mimeTypes: ["application/octet-stream", "image/ktx2"],
@@ -6477,7 +6501,7 @@
6477
6501
  name: "Texture Containers",
6478
6502
  id: "compressed-texture",
6479
6503
  module: "textures",
6480
- version: VERSION6,
6504
+ version: VERSION5,
6481
6505
  worker: true,
6482
6506
  extensions: [
6483
6507
  "ktx",
@@ -7264,12 +7288,12 @@
7264
7288
  }
7265
7289
 
7266
7290
  // src/i3s-attribute-loader.ts
7267
- var VERSION7 = true ? "4.0.0-alpha.24" : "latest";
7291
+ var VERSION6 = true ? "4.0.0-alpha.26" : "latest";
7268
7292
  var I3SAttributeLoader = {
7269
7293
  name: "I3S Attribute",
7270
7294
  id: "i3s-attribute",
7271
7295
  module: "i3s",
7272
- version: VERSION7,
7296
+ version: VERSION6,
7273
7297
  mimeTypes: ["application/binary"],
7274
7298
  parse: async (arrayBuffer, options) => parseI3STileAttribute(arrayBuffer, options),
7275
7299
  extensions: ["bin"],
@@ -7729,13 +7753,13 @@
7729
7753
  }
7730
7754
 
7731
7755
  // src/i3s-content-loader.ts
7732
- var VERSION8 = true ? "4.0.0-alpha.24" : "beta";
7756
+ var VERSION7 = true ? "4.0.0-alpha.26" : "beta";
7733
7757
  var I3SContentLoader = {
7734
7758
  name: "I3S Content (Indexed Scene Layers)",
7735
7759
  id: "i3s-content",
7736
7760
  module: "i3s",
7737
7761
  worker: true,
7738
- version: VERSION8,
7762
+ version: VERSION7,
7739
7763
  mimeTypes: ["application/octet-stream"],
7740
7764
  parse: parse3,
7741
7765
  extensions: ["bin"],