@loaders.gl/i3s 4.0.2 → 4.0.3

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.
@@ -92,7 +92,7 @@
92
92
  }
93
93
 
94
94
  // ../worker-utils/src/lib/env-utils/version.ts
95
- var NPM_TAG = "beta";
95
+ var NPM_TAG = "latest";
96
96
  function getVersion() {
97
97
  if (!globalThis._loadersgl_?.version) {
98
98
  globalThis._loadersgl_ = globalThis._loadersgl_ || {};
@@ -102,7 +102,7 @@
102
102
  );
103
103
  globalThis._loadersgl_.version = NPM_TAG;
104
104
  } else {
105
- globalThis._loadersgl_.version = "4.0.2";
105
+ globalThis._loadersgl_.version = "4.0.3";
106
106
  }
107
107
  }
108
108
  return globalThis._loadersgl_.version;
@@ -1447,7 +1447,7 @@
1447
1447
  var navigator_ = globalThis.navigator || {};
1448
1448
 
1449
1449
  // ../../node_modules/@probe.gl/log/node_modules/@probe.gl/env/dist/utils/globals.js
1450
- var VERSION2 = true ? "4.0.2" : "untranspiled source";
1450
+ var VERSION2 = true ? "4.0.3" : "untranspiled source";
1451
1451
  var isBrowser4 = isBrowser3();
1452
1452
 
1453
1453
  // ../../node_modules/@probe.gl/log/dist/utils/local-storage.js
@@ -2610,6 +2610,83 @@
2610
2610
  throw new Error(`${loader.id} loader - no parser found and worker is disabled`);
2611
2611
  }
2612
2612
 
2613
+ // ../schema/src/lib/table/simple-table/data-type.ts
2614
+ function getDataTypeFromTypedArray(array) {
2615
+ switch (array.constructor) {
2616
+ case Int8Array:
2617
+ return "int8";
2618
+ case Uint8Array:
2619
+ case Uint8ClampedArray:
2620
+ return "uint8";
2621
+ case Int16Array:
2622
+ return "int16";
2623
+ case Uint16Array:
2624
+ return "uint16";
2625
+ case Int32Array:
2626
+ return "int32";
2627
+ case Uint32Array:
2628
+ return "uint32";
2629
+ case Float32Array:
2630
+ return "float32";
2631
+ case Float64Array:
2632
+ return "float64";
2633
+ default:
2634
+ return "null";
2635
+ }
2636
+ }
2637
+
2638
+ // ../schema/src/lib/mesh/mesh-utils.ts
2639
+ function getMeshBoundingBox(attributes) {
2640
+ let minX = Infinity;
2641
+ let minY = Infinity;
2642
+ let minZ = Infinity;
2643
+ let maxX = -Infinity;
2644
+ let maxY = -Infinity;
2645
+ let maxZ = -Infinity;
2646
+ const positions = attributes.POSITION ? attributes.POSITION.value : [];
2647
+ const len2 = positions && positions.length;
2648
+ for (let i2 = 0; i2 < len2; i2 += 3) {
2649
+ const x = positions[i2];
2650
+ const y = positions[i2 + 1];
2651
+ const z = positions[i2 + 2];
2652
+ minX = x < minX ? x : minX;
2653
+ minY = y < minY ? y : minY;
2654
+ minZ = z < minZ ? z : minZ;
2655
+ maxX = x > maxX ? x : maxX;
2656
+ maxY = y > maxY ? y : maxY;
2657
+ maxZ = z > maxZ ? z : maxZ;
2658
+ }
2659
+ return [
2660
+ [minX, minY, minZ],
2661
+ [maxX, maxY, maxZ]
2662
+ ];
2663
+ }
2664
+
2665
+ // ../schema/src/lib/mesh/deduce-mesh-schema.ts
2666
+ function deduceMeshField(name, attribute, optionalMetadata) {
2667
+ const type = getDataTypeFromTypedArray(attribute.value);
2668
+ const metadata = optionalMetadata ? optionalMetadata : makeMeshAttributeMetadata(attribute);
2669
+ return {
2670
+ name,
2671
+ type: { type: "fixed-size-list", listSize: attribute.size, children: [{ name: "value", type }] },
2672
+ nullable: false,
2673
+ metadata
2674
+ };
2675
+ }
2676
+ function makeMeshAttributeMetadata(attribute) {
2677
+ const result = {};
2678
+ if ("byteOffset" in attribute) {
2679
+ result.byteOffset = attribute.byteOffset.toString(10);
2680
+ }
2681
+ if ("byteStride" in attribute) {
2682
+ result.byteStride = attribute.byteStride.toString(10);
2683
+ }
2684
+ if ("normalized" in attribute) {
2685
+ result.normalized = attribute.normalized.toString();
2686
+ }
2687
+ return result;
2688
+ }
2689
+
2613
2690
  // ../core/src/lib/api/load.ts
2614
2691
  async function load(url, loaders, options, context) {
2615
2692
  let resolvedLoaders;
@@ -5238,7 +5315,7 @@
5238
5315
  _defineProperty(Ellipsoid, "WGS84", new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z));
5239
5316
 
5240
5317
  // ../images/src/lib/utils/version.ts
5241
- var VERSION3 = true ? "4.0.2" : "latest";
5318
+ var VERSION3 = true ? "4.0.3" : "latest";
5242
5319
 
5243
5320
  // ../images/src/lib/category-api/image-type.ts
5244
5321
  var parseImageNode = globalThis.loaders?.parseImageNode;
@@ -5365,7 +5442,10 @@
5365
5442
  return await new Promise((resolve2, reject) => {
5366
5443
  try {
5367
5444
  image.onload = () => resolve2(image);
5368
- image.onerror = (err) => reject(new Error(`Could not load image ${url}: ${err}`));
5445
+ image.onerror = (error) => {
5446
+ const message = error instanceof Error ? error.message : "error";
5447
+ reject(new Error(message));
5448
+ };
5369
5449
  } catch (error) {
5370
5450
  reject(error);
5371
5451
  }
@@ -5641,7 +5721,7 @@
5641
5721
  };
5642
5722
 
5643
5723
  // ../draco/src/lib/utils/version.ts
5644
- var VERSION4 = true ? "4.0.2" : "latest";
5724
+ var VERSION4 = true ? "4.0.3" : "latest";
5645
5725
 
5646
5726
  // ../draco/src/draco-loader.ts
5647
5727
  var DEFAULT_DRACO_OPTIONS = {
@@ -5667,83 +5747,6 @@
5667
5747
  options: DEFAULT_DRACO_OPTIONS
5668
5748
  };
5669
5749
 
5670
- // ../schema/src/lib/table/simple-table/data-type.ts
5671
- function getDataTypeFromTypedArray(array) {
5672
- switch (array.constructor) {
5673
- case Int8Array:
5674
- return "int8";
5675
- case Uint8Array:
5676
- case Uint8ClampedArray:
5677
- return "uint8";
5678
- case Int16Array:
5679
- return "int16";
5680
- case Uint16Array:
5681
- return "uint16";
5682
- case Int32Array:
5683
- return "int32";
5684
- case Uint32Array:
5685
- return "uint32";
5686
- case Float32Array:
5687
- return "float32";
5688
- case Float64Array:
5689
- return "float64";
5690
- default:
5691
- return "null";
5692
- }
5693
- }
5694
-
5695
- // ../schema/src/lib/mesh/mesh-utils.ts
5696
- function getMeshBoundingBox(attributes) {
5697
- let minX = Infinity;
5698
- let minY = Infinity;
5699
- let minZ = Infinity;
5700
- let maxX = -Infinity;
5701
- let maxY = -Infinity;
5702
- let maxZ = -Infinity;
5703
- const positions = attributes.POSITION ? attributes.POSITION.value : [];
5704
- const len2 = positions && positions.length;
5705
- for (let i2 = 0; i2 < len2; i2 += 3) {
5706
- const x = positions[i2];
5707
- const y = positions[i2 + 1];
5708
- const z = positions[i2 + 2];
5709
- minX = x < minX ? x : minX;
5710
- minY = y < minY ? y : minY;
5711
- minZ = z < minZ ? z : minZ;
5712
- maxX = x > maxX ? x : maxX;
5713
- maxY = y > maxY ? y : maxY;
5714
- maxZ = z > maxZ ? z : maxZ;
5715
- }
5716
- return [
5717
- [minX, minY, minZ],
5718
- [maxX, maxY, maxZ]
5719
- ];
5720
- }
5721
-
5722
- // ../schema/src/lib/mesh/deduce-mesh-schema.ts
5723
- function deduceMeshField(name, attribute, optionalMetadata) {
5724
- const type = getDataTypeFromTypedArray(attribute.value);
5725
- const metadata = optionalMetadata ? optionalMetadata : makeMeshAttributeMetadata(attribute);
5726
- return {
5727
- name,
5728
- type: { type: "fixed-size-list", listSize: attribute.size, children: [{ name: "value", type }] },
5729
- nullable: false,
5730
- metadata
5731
- };
5732
- }
5733
- function makeMeshAttributeMetadata(attribute) {
5734
- const result = {};
5735
- if ("byteOffset" in attribute) {
5736
- result.byteOffset = attribute.byteOffset.toString(10);
5737
- }
5738
- if ("byteStride" in attribute) {
5739
- result.byteStride = attribute.byteStride.toString(10);
5740
- }
5741
- if ("normalized" in attribute) {
5742
- result.normalized = attribute.normalized.toString();
5743
- }
5744
- return result;
5745
- }
5746
-
5747
5750
  // ../draco/src/lib/utils/get-draco-schema.ts
5748
5751
  function getDracoSchema(attributes, loaderData, indices) {
5749
5752
  const metadata = makeMetadata(loaderData.metadata);
@@ -6322,7 +6325,7 @@
6322
6325
  }
6323
6326
 
6324
6327
  // ../textures/src/lib/utils/version.ts
6325
- var VERSION5 = true ? "4.0.2" : "beta";
6328
+ var VERSION5 = true ? "4.0.3" : "latest";
6326
6329
 
6327
6330
  // ../textures/src/lib/parsers/basis-module-loader.ts
6328
6331
  var BASIS_EXTERNAL_LIBRARIES = {
@@ -7850,7 +7853,7 @@
7850
7853
  }
7851
7854
 
7852
7855
  // src/i3s-content-loader.ts
7853
- var VERSION6 = true ? "4.0.2" : "beta";
7856
+ var VERSION6 = true ? "4.0.3" : "latest";
7854
7857
  var I3SContentLoader = {
7855
7858
  name: "I3S Content (Indexed Scene Layers)",
7856
7859
  id: "i3s-content",
package/dist/index.cjs CHANGED
@@ -533,7 +533,7 @@ function getFeatureIdsFromFeatureIndexMetadata(featureIndex) {
533
533
  }
534
534
 
535
535
  // src/i3s-content-loader.ts
536
- var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "beta";
536
+ var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
537
537
  var I3SContentLoader = {
538
538
  name: "I3S Content (Indexed Scene Layers)",
539
539
  id: "i3s-content",
@@ -1387,7 +1387,7 @@ function parseSublayersTree(sublayers, url) {
1387
1387
  }
1388
1388
 
1389
1389
  // src/i3s-building-scene-layer-loader.ts
1390
- var VERSION6 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "beta";
1390
+ var VERSION6 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
1391
1391
  var I3SBuildingSceneLayerLoader = {
1392
1392
  name: "I3S Building Scene Layer",
1393
1393
  id: "i3s-building-scene-layer",
@@ -1471,7 +1471,7 @@ async function checkSupportedIndexCRS(layer) {
1471
1471
  }
1472
1472
 
1473
1473
  // src/arcgis-webscene-loader.ts
1474
- var VERSION7 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "beta";
1474
+ var VERSION7 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
1475
1475
  var ArcGISWebSceneLoader = {
1476
1476
  name: "ArcGIS Web Scene Loader",
1477
1477
  id: "arcgis-web-scene",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/i3s",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "i3s .",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -41,14 +41,14 @@
41
41
  "build-worker-node": "esbuild src/workers/i3s-content-worker-node.ts --outfile=dist/i3s-content-worker-node.js --platform=node --target=node16 --minify --bundle --sourcemap --define:__VERSION__=\\\"$npm_package_version\\\""
42
42
  },
43
43
  "dependencies": {
44
- "@loaders.gl/compression": "4.0.2",
45
- "@loaders.gl/crypto": "4.0.2",
46
- "@loaders.gl/draco": "4.0.2",
47
- "@loaders.gl/images": "4.0.2",
48
- "@loaders.gl/loader-utils": "4.0.2",
49
- "@loaders.gl/schema": "4.0.2",
50
- "@loaders.gl/textures": "4.0.2",
51
- "@loaders.gl/tiles": "4.0.2",
44
+ "@loaders.gl/compression": "4.0.3",
45
+ "@loaders.gl/crypto": "4.0.3",
46
+ "@loaders.gl/draco": "4.0.3",
47
+ "@loaders.gl/images": "4.0.3",
48
+ "@loaders.gl/loader-utils": "4.0.3",
49
+ "@loaders.gl/schema": "4.0.3",
50
+ "@loaders.gl/textures": "4.0.3",
51
+ "@loaders.gl/tiles": "4.0.3",
52
52
  "@math.gl/core": "^4.0.0",
53
53
  "@math.gl/culling": "^4.0.0",
54
54
  "@math.gl/geospatial": "^4.0.0"
@@ -56,5 +56,5 @@
56
56
  "peerDependencies": {
57
57
  "@loaders.gl/core": "^4.0.0"
58
58
  },
59
- "gitHead": "471058d109d5652f28c32c1f296fd632f9a5c806"
59
+ "gitHead": "03c871839b36c997249dabae1844df53a35d3760"
60
60
  }
@@ -5,7 +5,7 @@ import {parseWebscene} from './lib/parsers/parse-arcgis-webscene';
5
5
 
6
6
  // __VERSION__ is injected by babel-plugin-version-inline
7
7
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
8
- const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'beta';
8
+ const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
9
9
 
10
10
  export type ArcGISWebSceneLoaderOptions = LoaderOptions & {};
11
11
 
@@ -7,7 +7,7 @@ import {parseBuildingSceneLayer} from './lib/parsers/parse-i3s-building-scene-la
7
7
  // __VERSION__ is injected by babel-plugin-version-inline
8
8
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
9
9
 
10
- const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'beta';
10
+ const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
11
11
  /**
12
12
  * Loader for I3S - Building Scene Layer
13
13
  */
@@ -6,7 +6,7 @@ import {I3STileContent, I3STileOptions, I3STilesetOptions} from './types';
6
6
  // __VERSION__ is injected by babel-plugin-version-inline
7
7
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
8
8
 
9
- const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'beta';
9
+ const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
10
10
 
11
11
  /**
12
12
  * Loader for I3S - Indexed 3D Scene Layer