@loaders.gl/i3s 3.3.0-alpha.7 → 3.3.0

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.
Files changed (50) hide show
  1. package/dist/dist.min.js +111 -141
  2. package/dist/es5/arcgis-webscene-loader.js +1 -1
  3. package/dist/es5/arcgis-webscene-loader.js.map +1 -1
  4. package/dist/es5/i3s-attribute-loader.js +1 -1
  5. package/dist/es5/i3s-attribute-loader.js.map +1 -1
  6. package/dist/es5/i3s-building-scene-layer-loader.js +1 -1
  7. package/dist/es5/i3s-building-scene-layer-loader.js.map +1 -1
  8. package/dist/es5/i3s-content-loader.js +1 -1
  9. package/dist/es5/i3s-content-loader.js.map +1 -1
  10. package/dist/es5/i3s-loader.js +11 -4
  11. package/dist/es5/i3s-loader.js.map +1 -1
  12. package/dist/es5/i3s-node-page-loader.js +1 -1
  13. package/dist/es5/i3s-node-page-loader.js.map +1 -1
  14. package/dist/es5/lib/parsers/constants.js +1 -1
  15. package/dist/es5/lib/parsers/constants.js.map +1 -1
  16. package/dist/es5/lib/parsers/parse-i3s-tile-content.js +1 -1
  17. package/dist/es5/lib/parsers/parse-i3s-tile-content.js.map +1 -1
  18. package/dist/es5/types.js.map +1 -1
  19. package/dist/esm/arcgis-webscene-loader.js +1 -1
  20. package/dist/esm/arcgis-webscene-loader.js.map +1 -1
  21. package/dist/esm/i3s-attribute-loader.js +1 -1
  22. package/dist/esm/i3s-attribute-loader.js.map +1 -1
  23. package/dist/esm/i3s-building-scene-layer-loader.js +1 -1
  24. package/dist/esm/i3s-building-scene-layer-loader.js.map +1 -1
  25. package/dist/esm/i3s-content-loader.js +1 -1
  26. package/dist/esm/i3s-content-loader.js.map +1 -1
  27. package/dist/esm/i3s-loader.js +5 -1
  28. package/dist/esm/i3s-loader.js.map +1 -1
  29. package/dist/esm/i3s-node-page-loader.js +1 -1
  30. package/dist/esm/i3s-node-page-loader.js.map +1 -1
  31. package/dist/esm/lib/parsers/constants.js +1 -1
  32. package/dist/esm/lib/parsers/constants.js.map +1 -1
  33. package/dist/esm/lib/parsers/parse-i3s-tile-content.js +1 -1
  34. package/dist/esm/lib/parsers/parse-i3s-tile-content.js.map +1 -1
  35. package/dist/esm/types.js.map +1 -1
  36. package/dist/i3s-content-nodejs-worker.js +58 -58
  37. package/dist/i3s-content-nodejs-worker.js.map +3 -3
  38. package/dist/i3s-content-worker.js +58 -60
  39. package/dist/i3s-loader.d.ts +1 -1
  40. package/dist/i3s-loader.d.ts.map +1 -1
  41. package/dist/i3s-loader.js +4 -0
  42. package/dist/lib/parsers/constants.js +1 -1
  43. package/dist/lib/parsers/parse-i3s-tile-content.js +1 -1
  44. package/dist/types.d.ts +178 -91
  45. package/dist/types.d.ts.map +1 -1
  46. package/package.json +9 -10
  47. package/src/i3s-loader.ts +5 -0
  48. package/src/lib/parsers/constants.ts +1 -1
  49. package/src/lib/parsers/parse-i3s-tile-content.ts +1 -1
  50. package/src/types.ts +95 -2
package/dist/dist.min.js CHANGED
@@ -145,11 +145,13 @@
145
145
  }
146
146
  });
147
147
 
148
- // ../worker-utils/src/lib/node/worker_threads-browser.js
148
+ // ../worker-utils/src/lib/node/worker_threads-browser.ts
149
149
  var Worker2;
150
150
  var init_worker_threads_browser = __esm({
151
- "../worker-utils/src/lib/node/worker_threads-browser.js"() {
151
+ "../worker-utils/src/lib/node/worker_threads-browser.ts"() {
152
152
  Worker2 = class {
153
+ terminate() {
154
+ }
153
155
  };
154
156
  }
155
157
  });
@@ -707,46 +709,7 @@
707
709
  }
708
710
  });
709
711
 
710
- // ../loader-utils/src/lib/binary-utils/buffer-utils.ts
711
- function isBuffer(value) {
712
- return value && typeof value === "object" && value.isBuffer;
713
- }
714
- function bufferToArrayBuffer(buffer) {
715
- if (isBuffer(buffer)) {
716
- const typedArray = new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.length);
717
- return typedArray.slice().buffer;
718
- }
719
- return buffer;
720
- }
721
- var init_buffer_utils = __esm({
722
- "../loader-utils/src/lib/binary-utils/buffer-utils.ts"() {
723
- }
724
- });
725
-
726
712
  // ../loader-utils/src/lib/binary-utils/array-buffer-utils.ts
727
- function toArrayBuffer(data) {
728
- if (isBuffer(data)) {
729
- return bufferToArrayBuffer(data);
730
- }
731
- if (data instanceof ArrayBuffer) {
732
- return data;
733
- }
734
- if (ArrayBuffer.isView(data)) {
735
- if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
736
- return data.buffer;
737
- }
738
- return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
739
- }
740
- if (typeof data === "string") {
741
- const text = data;
742
- const uint8Array = new TextEncoder().encode(text);
743
- return uint8Array.buffer;
744
- }
745
- if (data && typeof data === "object" && data._toArrayBuffer) {
746
- return data._toArrayBuffer();
747
- }
748
- throw new Error("toArrayBuffer");
749
- }
750
713
  function compareArrayBuffers(arrayBuffer1, arrayBuffer2, byteLength) {
751
714
  byteLength = byteLength || arrayBuffer1.byteLength;
752
715
  if (arrayBuffer1.byteLength < byteLength || arrayBuffer2.byteLength < byteLength) {
@@ -774,7 +737,6 @@
774
737
  }
775
738
  var init_array_buffer_utils = __esm({
776
739
  "../loader-utils/src/lib/binary-utils/array-buffer-utils.ts"() {
777
- init_buffer_utils();
778
740
  }
779
741
  });
780
742
 
@@ -811,37 +773,6 @@
811
773
  }
812
774
  });
813
775
 
814
- // ../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js
815
- var init_hi_res_timestamp = __esm({
816
- "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js"() {
817
- }
818
- });
819
-
820
- // ../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js
821
- var init_stat = __esm({
822
- "../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js"() {
823
- init_defineProperty();
824
- init_hi_res_timestamp();
825
- }
826
- });
827
-
828
- // ../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js
829
- var init_stats = __esm({
830
- "../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js"() {
831
- init_defineProperty();
832
- init_stat();
833
- }
834
- });
835
-
836
- // ../../node_modules/@probe.gl/stats/dist/esm/index.js
837
- var init_esm = __esm({
838
- "../../node_modules/@probe.gl/stats/dist/esm/index.js"() {
839
- init_stats();
840
- init_stat();
841
- init_hi_res_timestamp();
842
- }
843
- });
844
-
845
776
  // ../loader-utils/src/lib/path-utils/file-aliases.ts
846
777
  function resolvePath(filename2) {
847
778
  for (const alias in fileAliases) {
@@ -887,6 +818,45 @@
887
818
  }
888
819
  });
889
820
 
821
+ // (disabled):../loader-utils/src/lib/node/buffer
822
+ var init_buffer = __esm({
823
+ "(disabled):../loader-utils/src/lib/node/buffer"() {
824
+ }
825
+ });
826
+
827
+ // ../loader-utils/src/lib/binary-utils/memory-conversion-utils.ts
828
+ function isBuffer(value) {
829
+ return value && typeof value === "object" && value.isBuffer;
830
+ }
831
+ function toArrayBuffer2(data) {
832
+ if (isBuffer(data)) {
833
+ return node2.toArrayBuffer(data);
834
+ }
835
+ if (data instanceof ArrayBuffer) {
836
+ return data;
837
+ }
838
+ if (ArrayBuffer.isView(data)) {
839
+ if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
840
+ return data.buffer;
841
+ }
842
+ return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
843
+ }
844
+ if (typeof data === "string") {
845
+ const text = data;
846
+ const uint8Array = new TextEncoder().encode(text);
847
+ return uint8Array.buffer;
848
+ }
849
+ if (data && typeof data === "object" && data._toArrayBuffer) {
850
+ return data._toArrayBuffer();
851
+ }
852
+ throw new Error("toArrayBuffer");
853
+ }
854
+ var init_memory_conversion_utils = __esm({
855
+ "../loader-utils/src/lib/binary-utils/memory-conversion-utils.ts"() {
856
+ init_buffer();
857
+ }
858
+ });
859
+
890
860
  // ../loader-utils/src/lib/path-utils/path.ts
891
861
  var path_exports = {};
892
862
  __export(path_exports, {
@@ -930,6 +900,7 @@
930
900
  init_async_iteration();
931
901
  init_file_aliases();
932
902
  init_json_loader();
903
+ init_memory_conversion_utils();
933
904
  init_path();
934
905
  }
935
906
  });
@@ -1192,7 +1163,7 @@
1192
1163
  });
1193
1164
 
1194
1165
  // ../../node_modules/@probe.gl/env/dist/esm/index.js
1195
- var init_esm2 = __esm({
1166
+ var init_esm = __esm({
1196
1167
  "../../node_modules/@probe.gl/env/dist/esm/index.js"() {
1197
1168
  init_globals4();
1198
1169
  init_globals3();
@@ -1312,7 +1283,7 @@
1312
1283
  var COLOR;
1313
1284
  var init_color = __esm({
1314
1285
  "../../node_modules/@probe.gl/log/dist/esm/utils/color.js"() {
1315
- init_esm2();
1286
+ init_esm();
1316
1287
  (function(COLOR2) {
1317
1288
  COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
1318
1289
  COLOR2[COLOR2["RED"] = 31] = "RED";
@@ -1364,7 +1335,7 @@
1364
1335
  });
1365
1336
 
1366
1337
  // ../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js
1367
- function getHiResTimestamp2() {
1338
+ function getHiResTimestamp() {
1368
1339
  let timestamp;
1369
1340
  if (isBrowser3 && "performance" in window_3) {
1370
1341
  var _window$performance, _window$performance$n;
@@ -1378,9 +1349,9 @@
1378
1349
  }
1379
1350
  return timestamp;
1380
1351
  }
1381
- var init_hi_res_timestamp2 = __esm({
1352
+ var init_hi_res_timestamp = __esm({
1382
1353
  "../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js"() {
1383
- init_esm2();
1354
+ init_esm();
1384
1355
  }
1385
1356
  });
1386
1357
 
@@ -1503,13 +1474,13 @@
1503
1474
  var init_log = __esm({
1504
1475
  "../../node_modules/@probe.gl/log/dist/esm/log.js"() {
1505
1476
  init_defineProperty();
1506
- init_esm2();
1477
+ init_esm();
1507
1478
  init_local_storage();
1508
1479
  init_formatters();
1509
1480
  init_color();
1510
1481
  init_autobind();
1511
1482
  init_assert3();
1512
- init_hi_res_timestamp2();
1483
+ init_hi_res_timestamp();
1513
1484
  init_node_asciify_image();
1514
1485
  originalConsole = {
1515
1486
  debug: isBrowser3 ? console.debug || console.log : console.log,
@@ -1535,8 +1506,8 @@
1535
1506
  };
1536
1507
  _defineProperty(this, "id", void 0);
1537
1508
  _defineProperty(this, "VERSION", VERSION4);
1538
- _defineProperty(this, "_startTs", getHiResTimestamp2());
1539
- _defineProperty(this, "_deltaTs", getHiResTimestamp2());
1509
+ _defineProperty(this, "_startTs", getHiResTimestamp());
1510
+ _defineProperty(this, "_deltaTs", getHiResTimestamp());
1540
1511
  _defineProperty(this, "_storage", void 0);
1541
1512
  _defineProperty(this, "userData", {});
1542
1513
  _defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
@@ -1560,10 +1531,10 @@
1560
1531
  return this._storage.config.level;
1561
1532
  }
1562
1533
  getTotal() {
1563
- return Number((getHiResTimestamp2() - this._startTs).toPrecision(10));
1534
+ return Number((getHiResTimestamp() - this._startTs).toPrecision(10));
1564
1535
  }
1565
1536
  getDelta() {
1566
- return Number((getHiResTimestamp2() - this._deltaTs).toPrecision(10));
1537
+ return Number((getHiResTimestamp() - this._deltaTs).toPrecision(10));
1567
1538
  }
1568
1539
  set priority(newPriority) {
1569
1540
  this.level = newPriority;
@@ -1725,11 +1696,11 @@
1725
1696
  assert3(method);
1726
1697
  opts.total = this.getTotal();
1727
1698
  opts.delta = this.getDelta();
1728
- this._deltaTs = getHiResTimestamp2();
1699
+ this._deltaTs = getHiResTimestamp();
1729
1700
  const tag = opts.tag || opts.message;
1730
1701
  if (opts.once) {
1731
1702
  if (!cache[tag]) {
1732
- cache[tag] = getHiResTimestamp2();
1703
+ cache[tag] = getHiResTimestamp();
1733
1704
  } else {
1734
1705
  return noop;
1735
1706
  }
@@ -1746,7 +1717,7 @@
1746
1717
 
1747
1718
  // ../../node_modules/@probe.gl/log/dist/esm/index.js
1748
1719
  var esm_default;
1749
- var init_esm3 = __esm({
1720
+ var init_esm2 = __esm({
1750
1721
  "../../node_modules/@probe.gl/log/dist/esm/index.js"() {
1751
1722
  init_log();
1752
1723
  init_log();
@@ -1756,19 +1727,11 @@
1756
1727
  }
1757
1728
  });
1758
1729
 
1759
- // ../../node_modules/probe.gl/dist/esm/index.js
1760
- var init_esm4 = __esm({
1761
- "../../node_modules/probe.gl/dist/esm/index.js"() {
1762
- init_esm3();
1763
- init_esm();
1764
- }
1765
- });
1766
-
1767
1730
  // ../core/src/lib/loader-utils/loggers.ts
1768
1731
  var probeLog, NullLog, ConsoleLog;
1769
1732
  var init_loggers = __esm({
1770
1733
  "../core/src/lib/loader-utils/loggers.ts"() {
1771
- init_esm4();
1734
+ init_esm2();
1772
1735
  probeLog = new Log({ id: "loaders.gl" });
1773
1736
  NullLog = class {
1774
1737
  log() {
@@ -2026,7 +1989,7 @@
2026
1989
  var log;
2027
1990
  var init_log2 = __esm({
2028
1991
  "../core/src/lib/utils/log.ts"() {
2029
- init_esm3();
1992
+ init_esm2();
2030
1993
  log = new Log({ id: "loaders.gl" });
2031
1994
  }
2032
1995
  });
@@ -2299,7 +2262,7 @@
2299
2262
  if (done) {
2300
2263
  return;
2301
2264
  }
2302
- yield toArrayBuffer(value);
2265
+ yield toArrayBuffer2(value);
2303
2266
  }
2304
2267
  } catch (error) {
2305
2268
  reader.releaseLock();
@@ -2307,7 +2270,7 @@
2307
2270
  }
2308
2271
  async function* makeNodeStreamIterator(stream, options) {
2309
2272
  for await (const chunk of stream) {
2310
- yield toArrayBuffer(chunk);
2273
+ yield toArrayBuffer2(chunk);
2311
2274
  }
2312
2275
  }
2313
2276
  var init_make_stream_iterator = __esm({
@@ -5441,7 +5404,7 @@
5441
5404
  });
5442
5405
 
5443
5406
  // ../../node_modules/@math.gl/core/dist/esm/index.js
5444
- var init_esm5 = __esm({
5407
+ var init_esm3 = __esm({
5445
5408
  "../../node_modules/@math.gl/core/dist/esm/index.js"() {
5446
5409
  init_vector3();
5447
5410
  init_matrix3();
@@ -5516,7 +5479,7 @@
5516
5479
  var scratchVector;
5517
5480
  var init_type_utils = __esm({
5518
5481
  "../../node_modules/@math.gl/geospatial/dist/esm/type-utils.js"() {
5519
- init_esm5();
5482
+ init_esm3();
5520
5483
  init_constants();
5521
5484
  scratchVector = new Vector3();
5522
5485
  }
@@ -5581,7 +5544,7 @@
5581
5544
  var scratchVector2, scaleToGeodeticSurfaceIntersection, scaleToGeodeticSurfaceGradient;
5582
5545
  var init_scale_to_geodetic_surface = __esm({
5583
5546
  "../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/helpers/scale-to-geodetic-surface.js"() {
5584
- init_esm5();
5547
+ init_esm3();
5585
5548
  scratchVector2 = new Vector3();
5586
5549
  scaleToGeodeticSurfaceIntersection = new Vector3();
5587
5550
  scaleToGeodeticSurfaceGradient = new Vector3();
@@ -5653,7 +5616,7 @@
5653
5616
  var EPSILON14, scratchOrigin, VECTOR_PRODUCT_LOCAL_FRAME, degeneratePositionLocalFrame, scratchAxisVectors, scratchVector1, scratchVector22, scratchVector3;
5654
5617
  var init_ellipsoid_transform = __esm({
5655
5618
  "../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/helpers/ellipsoid-transform.js"() {
5656
- init_esm5();
5619
+ init_esm3();
5657
5620
  EPSILON14 = 1e-14;
5658
5621
  scratchOrigin = new Vector3();
5659
5622
  VECTOR_PRODUCT_LOCAL_FRAME = {
@@ -5721,7 +5684,7 @@
5721
5684
  var init_ellipsoid = __esm({
5722
5685
  "../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/ellipsoid.js"() {
5723
5686
  init_defineProperty();
5724
- init_esm5();
5687
+ init_esm3();
5725
5688
  init_vec3();
5726
5689
  init_constants();
5727
5690
  init_type_utils();
@@ -5845,7 +5808,7 @@
5845
5808
  });
5846
5809
 
5847
5810
  // ../../node_modules/@math.gl/geospatial/dist/esm/index.js
5848
- var init_esm6 = __esm({
5811
+ var init_esm4 = __esm({
5849
5812
  "../../node_modules/@math.gl/geospatial/dist/esm/index.js"() {
5850
5813
  init_ellipsoid();
5851
5814
  init_type_utils();
@@ -7313,15 +7276,17 @@
7313
7276
  });
7314
7277
  });
7315
7278
  }
7316
- var DRACO_VERSION, DRACO_JS_DECODER_URL, DRACO_WASM_WRAPPER_URL, DRACO_WASM_DECODER_URL, DRACO_ENCODER_URL, loadDecoderPromise;
7279
+ var DRACO_DECODER_VERSION, DRACO_ENCODER_VERSION, STATIC_DECODER_URL, DRACO_JS_DECODER_URL, DRACO_WASM_WRAPPER_URL, DRACO_WASM_DECODER_URL, DRACO_ENCODER_URL, loadDecoderPromise;
7317
7280
  var init_draco_module_loader = __esm({
7318
7281
  "../draco/src/lib/draco-module-loader.ts"() {
7319
7282
  init_src();
7320
- DRACO_VERSION = "1.4.1";
7321
- DRACO_JS_DECODER_URL = `https://www.gstatic.com/draco/versioned/decoders/${DRACO_VERSION}/draco_decoder.js`;
7322
- DRACO_WASM_WRAPPER_URL = `https://www.gstatic.com/draco/versioned/decoders/${DRACO_VERSION}/draco_wasm_wrapper.js`;
7323
- DRACO_WASM_DECODER_URL = `https://www.gstatic.com/draco/versioned/decoders/${DRACO_VERSION}/draco_decoder.wasm`;
7324
- DRACO_ENCODER_URL = `https://raw.githubusercontent.com/google/draco/${DRACO_VERSION}/javascript/draco_encoder.js`;
7283
+ DRACO_DECODER_VERSION = "1.5.5";
7284
+ DRACO_ENCODER_VERSION = "1.4.1";
7285
+ STATIC_DECODER_URL = `https://www.gstatic.com/draco/versioned/decoders/${DRACO_DECODER_VERSION}`;
7286
+ DRACO_JS_DECODER_URL = `${STATIC_DECODER_URL}/draco_decoder.js`;
7287
+ DRACO_WASM_WRAPPER_URL = `${STATIC_DECODER_URL}/draco_wasm_wrapper.js`;
7288
+ DRACO_WASM_DECODER_URL = `${STATIC_DECODER_URL}/draco_decoder.wasm`;
7289
+ DRACO_ENCODER_URL = `https://raw.githubusercontent.com/google/draco/${DRACO_ENCODER_VERSION}/javascript/draco_encoder.js`;
7325
7290
  }
7326
7291
  });
7327
7292
 
@@ -7892,6 +7857,7 @@
7892
7857
  height,
7893
7858
  data: decodedData,
7894
7859
  compressed,
7860
+ levelSize: decodedSize,
7895
7861
  hasAlpha: alphaFlag,
7896
7862
  format
7897
7863
  };
@@ -8435,7 +8401,7 @@
8435
8401
 
8436
8402
  // ../../node_modules/@luma.gl/constants/dist/esm/index.js
8437
8403
  var esm_default2;
8438
- var init_esm7 = __esm({
8404
+ var init_esm5 = __esm({
8439
8405
  "../../node_modules/@luma.gl/constants/dist/esm/index.js"() {
8440
8406
  esm_default2 = {
8441
8407
  DEPTH_BUFFER_BIT: 256,
@@ -9095,11 +9061,11 @@
9095
9061
  var GL_TYPE_MAP, STRING_ATTRIBUTE_TYPE, OBJECT_ID_ATTRIBUTE_TYPE, FLOAT_64_TYPE, INT_16_ATTRIBUTE_TYPE, COORDINATE_SYSTEM;
9096
9062
  var init_constants2 = __esm({
9097
9063
  "src/lib/parsers/constants.ts"() {
9098
- init_esm7();
9064
+ init_esm5();
9099
9065
  init_types();
9100
9066
  GL_TYPE_MAP = {
9101
9067
  UInt8: esm_default2.UNSIGNED_BYTE,
9102
- UInt16: esm_default2.UNSIGNED_INT,
9068
+ UInt16: esm_default2.UNSIGNED_SHORT,
9103
9069
  Float32: esm_default2.FLOAT,
9104
9070
  UInt32: esm_default2.UNSIGNED_INT,
9105
9071
  UInt64: esm_default2.DOUBLE
@@ -9488,7 +9454,7 @@
9488
9454
  normals: attributes.normal,
9489
9455
  colors: normalizeAttribute(attributes.color),
9490
9456
  texCoords: attributes.uv0,
9491
- uvRegions: normalizeAttribute(attributes.uvRegion)
9457
+ uvRegions: normalizeAttribute(attributes.uvRegion || attributes.region)
9492
9458
  };
9493
9459
  content.indices = indices || null;
9494
9460
  if (attributes.id && attributes.id.value) {
@@ -9737,8 +9703,8 @@
9737
9703
  var init_parse_i3s_tile_content = __esm({
9738
9704
  "src/lib/parsers/parse-i3s-tile-content.ts"() {
9739
9705
  init_src3();
9740
- init_esm5();
9741
- init_esm6();
9706
+ init_esm3();
9707
+ init_esm4();
9742
9708
  init_src4();
9743
9709
  init_src6();
9744
9710
  init_src7();
@@ -9800,7 +9766,7 @@
9800
9766
  var init_axis_aligned_bounding_box = __esm({
9801
9767
  "../../node_modules/@math.gl/culling/dist/esm/lib/bounding-volumes/axis-aligned-bounding-box.js"() {
9802
9768
  init_defineProperty();
9803
- init_esm5();
9769
+ init_esm3();
9804
9770
  init_constants3();
9805
9771
  scratchVector6 = new Vector3();
9806
9772
  scratchNormal2 = new Vector3();
@@ -9812,7 +9778,7 @@
9812
9778
  var init_bounding_sphere = __esm({
9813
9779
  "../../node_modules/@math.gl/culling/dist/esm/lib/bounding-volumes/bounding-sphere.js"() {
9814
9780
  init_defineProperty();
9815
- init_esm5();
9781
+ init_esm3();
9816
9782
  init_mat4();
9817
9783
  init_constants3();
9818
9784
  scratchVector7 = new Vector3();
@@ -9906,7 +9872,7 @@
9906
9872
  var init_oriented_bounding_box = __esm({
9907
9873
  "../../node_modules/@math.gl/culling/dist/esm/lib/bounding-volumes/oriented-bounding-box.js"() {
9908
9874
  init_defineProperty();
9909
- init_esm5();
9875
+ init_esm3();
9910
9876
  init_bounding_sphere();
9911
9877
  init_constants3();
9912
9878
  scratchVector32 = new Vector3();
@@ -10103,7 +10069,7 @@
10103
10069
  var init_plane = __esm({
10104
10070
  "../../node_modules/@math.gl/culling/dist/esm/lib/plane.js"() {
10105
10071
  init_defineProperty();
10106
- init_esm5();
10072
+ init_esm3();
10107
10073
  scratchPosition2 = new Vector3();
10108
10074
  scratchNormal3 = new Vector3();
10109
10075
  Plane = class {
@@ -10162,7 +10128,7 @@
10162
10128
  var init_culling_volume = __esm({
10163
10129
  "../../node_modules/@math.gl/culling/dist/esm/lib/culling-volume.js"() {
10164
10130
  init_defineProperty();
10165
- init_esm5();
10131
+ init_esm3();
10166
10132
  init_constants3();
10167
10133
  init_plane();
10168
10134
  faces = [new Vector3([1, 0, 0]), new Vector3([0, 1, 0]), new Vector3([0, 0, 1])];
@@ -10248,7 +10214,7 @@
10248
10214
  var init_perspective_off_center_frustum = __esm({
10249
10215
  "../../node_modules/@math.gl/culling/dist/esm/lib/perspective-off-center-frustum.js"() {
10250
10216
  init_defineProperty();
10251
- init_esm5();
10217
+ init_esm3();
10252
10218
  init_culling_volume();
10253
10219
  init_plane();
10254
10220
  scratchPlaneUpVector = new Vector3();
@@ -10271,7 +10237,7 @@
10271
10237
  var fromPointsXMin, fromPointsYMin, fromPointsZMin, fromPointsXMax, fromPointsYMax, fromPointsZMax, fromPointsCurrentPos, fromPointsScratch, fromPointsRitterCenter, fromPointsMinBoxPt, fromPointsMaxBoxPt, fromPointsNaiveCenterScratch, volumeConstant;
10272
10238
  var init_bounding_sphere_from_points = __esm({
10273
10239
  "../../node_modules/@math.gl/culling/dist/esm/lib/algorithms/bounding-sphere-from-points.js"() {
10274
- init_esm5();
10240
+ init_esm3();
10275
10241
  init_bounding_sphere();
10276
10242
  fromPointsXMin = new Vector3();
10277
10243
  fromPointsYMin = new Vector3();
@@ -10293,7 +10259,7 @@
10293
10259
  var scratchMatrix, scratchUnitary, scratchDiagonal, jMatrix, jMatrixTranspose;
10294
10260
  var init_compute_eigen_decomposition = __esm({
10295
10261
  "../../node_modules/@math.gl/culling/dist/esm/lib/algorithms/compute-eigen-decomposition.js"() {
10296
- init_esm5();
10262
+ init_esm3();
10297
10263
  scratchMatrix = new Matrix3();
10298
10264
  scratchUnitary = new Matrix3();
10299
10265
  scratchDiagonal = new Matrix3();
@@ -10306,7 +10272,7 @@
10306
10272
  var scratchVector24, scratchVector33, scratchVector42, scratchVector52, scratchVector62, scratchCovarianceResult, scratchEigenResult;
10307
10273
  var init_bounding_box_from_points = __esm({
10308
10274
  "../../node_modules/@math.gl/culling/dist/esm/lib/algorithms/bounding-box-from-points.js"() {
10309
- init_esm5();
10275
+ init_esm3();
10310
10276
  init_compute_eigen_decomposition();
10311
10277
  init_oriented_bounding_box();
10312
10278
  init_axis_aligned_bounding_box();
@@ -10324,7 +10290,7 @@
10324
10290
  });
10325
10291
 
10326
10292
  // ../../node_modules/@math.gl/culling/dist/esm/index.js
10327
- var init_esm8 = __esm({
10293
+ var init_esm6 = __esm({
10328
10294
  "../../node_modules/@math.gl/culling/dist/esm/index.js"() {
10329
10295
  init_constants3();
10330
10296
  init_axis_aligned_bounding_box();
@@ -10434,10 +10400,10 @@
10434
10400
  return this.nodePages[pageIndex].nodes[nodeIndex];
10435
10401
  }
10436
10402
  async formTileFromNodePages(id) {
10437
- const node2 = await this.getNodeById(id);
10403
+ const node3 = await this.getNodeById(id);
10438
10404
  const children = [];
10439
10405
  const childNodesPromises = [];
10440
- for (const child of node2.children || []) {
10406
+ for (const child of node3.children || []) {
10441
10407
  childNodesPromises.push(this.getNodeById(child));
10442
10408
  }
10443
10409
  const childNodes = await Promise.all(childNodesPromises);
@@ -10453,25 +10419,25 @@
10453
10419
  let textureFormat = "jpg";
10454
10420
  let attributeUrls = [];
10455
10421
  let isDracoGeometry = false;
10456
- if (node2 && node2.mesh) {
10457
- const { url, isDracoGeometry: isDracoGeometryResult } = node2.mesh.geometry && this.getContentUrl(node2.mesh.geometry) || { isDracoGeometry: false };
10422
+ if (node3 && node3.mesh) {
10423
+ const { url, isDracoGeometry: isDracoGeometryResult } = node3.mesh.geometry && this.getContentUrl(node3.mesh.geometry) || { isDracoGeometry: false };
10458
10424
  contentUrl = url;
10459
10425
  isDracoGeometry = isDracoGeometryResult;
10460
- const { textureData, materialDefinition: nodeMaterialDefinition } = this.getInformationFromMaterial(node2.mesh.material);
10426
+ const { textureData, materialDefinition: nodeMaterialDefinition } = this.getInformationFromMaterial(node3.mesh.material);
10461
10427
  materialDefinition = nodeMaterialDefinition;
10462
10428
  textureFormat = textureData.format || textureFormat;
10463
10429
  if (textureData.name) {
10464
- textureUrl = `${this.tileset.url}/nodes/${node2.mesh.material.resource}/textures/${textureData.name}`;
10430
+ textureUrl = `${this.tileset.url}/nodes/${node3.mesh.material.resource}/textures/${textureData.name}`;
10465
10431
  }
10466
10432
  if (this.tileset.attributeStorageInfo) {
10467
- attributeUrls = generateTilesetAttributeUrls(this.tileset, node2.mesh.attribute.resource);
10433
+ attributeUrls = generateTilesetAttributeUrls(this.tileset, node3.mesh.attribute.resource);
10468
10434
  }
10469
10435
  }
10470
- const lodSelection = this.getLodSelection(node2);
10436
+ const lodSelection = this.getLodSelection(node3);
10471
10437
  return normalizeTileNonUrlData({
10472
10438
  id: id.toString(),
10473
10439
  lodSelection,
10474
- obb: node2.obb,
10440
+ obb: node3.obb,
10475
10441
  contentUrl,
10476
10442
  textureUrl,
10477
10443
  attributeUrls,
@@ -10501,17 +10467,17 @@
10501
10467
  }
10502
10468
  return result;
10503
10469
  }
10504
- getLodSelection(node2) {
10470
+ getLodSelection(node3) {
10505
10471
  const lodSelection = [];
10506
10472
  if (this.lodSelectionMetricType === "maxScreenThresholdSQ") {
10507
10473
  lodSelection.push({
10508
10474
  metricType: "maxScreenThreshold",
10509
- maxError: Math.sqrt(node2.lodThreshold / (Math.PI * 0.25))
10475
+ maxError: Math.sqrt(node3.lodThreshold / (Math.PI * 0.25))
10510
10476
  });
10511
10477
  }
10512
10478
  lodSelection.push({
10513
10479
  metricType: this.lodSelectionMetricType,
10514
- maxError: node2.lodThreshold
10480
+ maxError: node3.lodThreshold
10515
10481
  });
10516
10482
  return lodSelection;
10517
10483
  }
@@ -10648,8 +10614,8 @@
10648
10614
  }
10649
10615
  var init_parse_i3s = __esm({
10650
10616
  "src/lib/parsers/parse-i3s.ts"() {
10651
- init_esm8();
10652
10617
  init_esm6();
10618
+ init_esm4();
10653
10619
  init_src3();
10654
10620
  init_src8();
10655
10621
  init_i3s_nodepages_tiles();
@@ -10691,6 +10657,9 @@
10691
10657
  }
10692
10658
  async function parseTileset(data, options, context) {
10693
10659
  const tilesetJson = JSON.parse(new TextDecoder().decode(data));
10660
+ if (tilesetJson?.layerType === POINT_CLOUD) {
10661
+ throw new Error("Point Cloud layers currently are not supported by I3SLoader");
10662
+ }
10694
10663
  tilesetJson.loader = I3SLoader;
10695
10664
  await normalizeTilesetData(tilesetJson, options, context);
10696
10665
  return tilesetJson;
@@ -10705,7 +10674,7 @@
10705
10674
  }
10706
10675
  return null;
10707
10676
  }
10708
- var VERSION12, TILESET_REGEX, TILE_HEADER_REGEX, SLPK_HEX, I3SLoader;
10677
+ var VERSION12, TILESET_REGEX, TILE_HEADER_REGEX, SLPK_HEX, POINT_CLOUD, I3SLoader;
10709
10678
  var init_i3s_loader = __esm({
10710
10679
  "src/i3s-loader.ts"() {
10711
10680
  init_src3();
@@ -10716,6 +10685,7 @@
10716
10685
  TILESET_REGEX = /layers\/[0-9]+$/;
10717
10686
  TILE_HEADER_REGEX = /nodes\/([0-9-]+|root)$/;
10718
10687
  SLPK_HEX = "504b0304";
10688
+ POINT_CLOUD = "PointCloud";
10719
10689
  I3SLoader = {
10720
10690
  name: "I3S (Indexed Scene Layers)",
10721
10691
  id: "i3s",
@@ -8,7 +8,7 @@ exports.ArcGisWebSceneLoader = void 0;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _parseArcgisWebscene = require("./lib/parsers/parse-arcgis-webscene");
11
- var VERSION = typeof "3.3.0-alpha.7" !== 'undefined' ? "3.3.0-alpha.7" : 'beta';
11
+ var VERSION = typeof "3.3.0" !== 'undefined' ? "3.3.0" : 'beta';
12
12
 
13
13
  var ArcGisWebSceneLoader = {
14
14
  name: 'ArcGIS Web Scene Loader',
@@ -1 +1 @@
1
- {"version":3,"file":"arcgis-webscene-loader.js","names":["VERSION","ArcGisWebSceneLoader","name","id","module","version","mimeTypes","parse","extensions","options","data","parseWebscene"],"sources":["../../src/arcgis-webscene-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {ArcGisWebSceneData} from './types';\n\nimport {parseWebscene} from './lib/parsers/parse-arcgis-webscene';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'beta';\n\n/**\n * Loader for ArcGis WebScene\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/webscene/\n */\nexport const ArcGisWebSceneLoader: LoaderWithParser = {\n name: 'ArcGIS Web Scene Loader',\n id: 'arcgis-web-scene',\n module: 'i3s',\n version: VERSION,\n mimeTypes: ['application/json'],\n parse,\n extensions: ['json'],\n options: {}\n};\n\n/**\n * Parse ArcGis webscene\n * @param data\n */\nasync function parse(data: ArrayBuffer): Promise<ArcGisWebSceneData> {\n return parseWebscene(data);\n}\n"],"mappings":";;;;;;;;;AAGA;AAIA,IAAMA,OAAO,GAAG,sBAAkB,KAAK,WAAW,qBAAiB,MAAM;;AAMlE,IAAMC,oBAAsC,GAAG;EACpDC,IAAI,EAAE,yBAAyB;EAC/BC,EAAE,EAAE,kBAAkB;EACtBC,MAAM,EAAE,KAAK;EACbC,OAAO,EAAEL,OAAO;EAChBM,SAAS,EAAE,CAAC,kBAAkB,CAAC;EAC/BC,KAAK,EAALA,KAAK;EACLC,UAAU,EAAE,CAAC,MAAM,CAAC;EACpBC,OAAO,EAAE,CAAC;AACZ,CAAC;;AAAC;AAAA,SAMaF,KAAK;EAAA;AAAA;AAAA;EAAA,mEAApB,iBAAqBG,IAAiB;IAAA;MAAA;QAAA;UAAA;YAAA,iCAC7B,IAAAC,kCAAa,EAACD,IAAI,CAAC;UAAA;UAAA;YAAA;QAAA;MAAA;IAAA;EAAA,CAC3B;EAAA;AAAA"}
1
+ {"version":3,"file":"arcgis-webscene-loader.js","names":["VERSION","ArcGisWebSceneLoader","name","id","module","version","mimeTypes","parse","extensions","options","data","parseWebscene"],"sources":["../../src/arcgis-webscene-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {ArcGisWebSceneData} from './types';\n\nimport {parseWebscene} from './lib/parsers/parse-arcgis-webscene';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'beta';\n\n/**\n * Loader for ArcGis WebScene\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/webscene/\n */\nexport const ArcGisWebSceneLoader: LoaderWithParser = {\n name: 'ArcGIS Web Scene Loader',\n id: 'arcgis-web-scene',\n module: 'i3s',\n version: VERSION,\n mimeTypes: ['application/json'],\n parse,\n extensions: ['json'],\n options: {}\n};\n\n/**\n * Parse ArcGis webscene\n * @param data\n */\nasync function parse(data: ArrayBuffer): Promise<ArcGisWebSceneData> {\n return parseWebscene(data);\n}\n"],"mappings":";;;;;;;;;AAGA;AAIA,IAAMA,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,MAAM;;AAMlE,IAAMC,oBAAsC,GAAG;EACpDC,IAAI,EAAE,yBAAyB;EAC/BC,EAAE,EAAE,kBAAkB;EACtBC,MAAM,EAAE,KAAK;EACbC,OAAO,EAAEL,OAAO;EAChBM,SAAS,EAAE,CAAC,kBAAkB,CAAC;EAC/BC,KAAK,EAALA,KAAK;EACLC,UAAU,EAAE,CAAC,MAAM,CAAC;EACpBC,OAAO,EAAE,CAAC;AACZ,CAAC;;AAAC;AAAA,SAMaF,KAAK;EAAA;AAAA;AAAA;EAAA,mEAApB,iBAAqBG,IAAiB;IAAA;MAAA;QAAA;UAAA;YAAA,iCAC7B,IAAAC,kCAAa,EAACD,IAAI,CAAC;UAAA;UAAA;YAAA;QAAA;MAAA;IAAA;EAAA,CAC3B;EAAA;AAAA"}
@@ -15,7 +15,7 @@ var _parseI3sAttribute = require("./lib/parsers/parse-i3s-attribute");
15
15
  var _urlUtils = require("./lib/utils/url-utils");
16
16
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
17
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
18
- var VERSION = typeof "3.3.0-alpha.7" !== 'undefined' ? "3.3.0-alpha.7" : 'latest';
18
+ var VERSION = typeof "3.3.0" !== 'undefined' ? "3.3.0" : 'latest';
19
19
  var EMPTY_VALUE = '';
20
20
  var REJECTED_STATUS = 'rejected';
21
21
  var I3SAttributeLoader = {