@loaders.gl/3d-tiles 4.3.2 → 4.4.0-alpha.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ion.d.ts","sourceRoot":"","sources":["../../../src/lib/ion/ion.ts"],"names":[],"mappings":"AAYA,wBAAsB,qBAAqB,CAAC,WAAW,KAAA,EAAE,OAAO,KAAA,gBAqB/D;AAGD,wBAAsB,YAAY,CAAC,WAAW,KAAA,gBAS7C;AAGD,wBAAsB,mBAAmB,CAAC,WAAW,KAAA,EAAE,OAAO,KAAA,gBA4B7D"}
1
+ {"version":3,"file":"ion.d.ts","sourceRoot":"","sources":["../../../src/lib/ion/ion.ts"],"names":[],"mappings":"AAYA,wBAAsB,qBAAqB,CAAC,WAAW,KAAA,EAAE,OAAO,KAAA,gBAwB/D;AAGD,wBAAsB,YAAY,CAAC,WAAW,KAAA,gBAS7C;AAGD,wBAAsB,mBAAmB,CAAC,WAAW,KAAA,EAAE,OAAO,KAAA,gBA4B7D"}
@@ -18,11 +18,14 @@ export async function getIonTilesetMetadata(accessToken, assetId) {
18
18
  }
19
19
  // Step 2: Query metdatadata for this asset.
20
20
  const ionAssetMetadata = await getIonAssetMetadata(accessToken, assetId);
21
- const { type, url } = ionAssetMetadata;
21
+ const type = ionAssetMetadata.type;
22
+ // As of Oct 2024 ion service now returns the resource URL in an options object
23
+ const url = ionAssetMetadata.options?.url || ionAssetMetadata.url;
22
24
  assert(type === '3DTILES' && url);
23
25
  // Prepare a headers object for fetch
24
26
  ionAssetMetadata.headers = {
25
- Authorization: `Bearer ${ionAssetMetadata.accessToken}`
27
+ // Use provided accessToken if a new token is not provided in the ion response
28
+ Authorization: `Bearer ${ionAssetMetadata.accessToken || accessToken}`
26
29
  };
27
30
  return ionAssetMetadata;
28
31
  }
@@ -1,4 +1,4 @@
1
1
  // Version constant cannot be imported, it needs to correspond to the build version of **this** module.
2
2
  // __VERSION__ is injected by babel-plugin-version-inline
3
3
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
4
- export const VERSION = typeof "4.3.1" !== 'undefined' ? "4.3.1" : 'latest';
4
+ export const VERSION = typeof "4.4.0-alpha.0" !== 'undefined' ? "4.4.0-alpha.0" : 'latest';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/3d-tiles",
3
- "version": "4.3.2",
3
+ "version": "4.4.0-alpha.1",
4
4
  "description": "3D Tiles, an open standard for streaming massive heterogeneous 3D geospatial datasets.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -46,15 +46,15 @@
46
46
  "build-bundle-dev": "ocular-bundle ./bundle.ts --env=dev --output=dist/dist.dev.js"
47
47
  },
48
48
  "dependencies": {
49
- "@loaders.gl/compression": "4.3.2",
50
- "@loaders.gl/crypto": "4.3.2",
51
- "@loaders.gl/draco": "4.3.2",
52
- "@loaders.gl/gltf": "4.3.2",
53
- "@loaders.gl/images": "4.3.2",
54
- "@loaders.gl/loader-utils": "4.3.2",
55
- "@loaders.gl/math": "4.3.2",
56
- "@loaders.gl/tiles": "4.3.2",
57
- "@loaders.gl/zip": "4.3.2",
49
+ "@loaders.gl/compression": "4.4.0-alpha.1",
50
+ "@loaders.gl/crypto": "4.4.0-alpha.1",
51
+ "@loaders.gl/draco": "4.4.0-alpha.1",
52
+ "@loaders.gl/gltf": "4.4.0-alpha.1",
53
+ "@loaders.gl/images": "4.4.0-alpha.1",
54
+ "@loaders.gl/loader-utils": "4.4.0-alpha.1",
55
+ "@loaders.gl/math": "4.4.0-alpha.1",
56
+ "@loaders.gl/tiles": "4.4.0-alpha.1",
57
+ "@loaders.gl/zip": "4.4.0-alpha.1",
58
58
  "@math.gl/core": "^4.1.0",
59
59
  "@math.gl/culling": "^4.1.0",
60
60
  "@math.gl/geospatial": "^4.1.0",
@@ -62,7 +62,7 @@
62
62
  "long": "^5.2.1"
63
63
  },
64
64
  "peerDependencies": {
65
- "@loaders.gl/core": "^4.3.0"
65
+ "@loaders.gl/core": "4.4.0-alpha.0"
66
66
  },
67
- "gitHead": "b4203b8703f64a38d6f79a3113bc7bb51d45c93a"
67
+ "gitHead": "f1732de45907bd500bf4eedb4803beca8bf4bfb0"
68
68
  }
@@ -23,12 +23,15 @@ export async function getIonTilesetMetadata(accessToken, assetId) {
23
23
 
24
24
  // Step 2: Query metdatadata for this asset.
25
25
  const ionAssetMetadata = await getIonAssetMetadata(accessToken, assetId);
26
- const {type, url} = ionAssetMetadata;
26
+ const type = ionAssetMetadata.type;
27
+ // As of Oct 2024 ion service now returns the resource URL in an options object
28
+ const url = ionAssetMetadata.options?.url || ionAssetMetadata.url;
27
29
  assert(type === '3DTILES' && url);
28
30
 
29
31
  // Prepare a headers object for fetch
30
32
  ionAssetMetadata.headers = {
31
- Authorization: `Bearer ${ionAssetMetadata.accessToken}`
33
+ // Use provided accessToken if a new token is not provided in the ion response
34
+ Authorization: `Bearer ${ionAssetMetadata.accessToken || accessToken}`
32
35
  };
33
36
  return ionAssetMetadata;
34
37
  }