@loaders.gl/3d-tiles 4.1.0-alpha.2 → 4.1.0-alpha.4

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 (152) hide show
  1. package/dist/3d-tiles-archive/3d-tiles-archive-archive.d.ts.map +1 -1
  2. package/dist/3d-tiles-archive/3d-tiles-archive-archive.js.map +1 -1
  3. package/dist/3d-tiles-archive/3d-tiles-archive-parser.d.ts.map +1 -1
  4. package/dist/3d-tiles-archive/3d-tiles-archive-parser.js.map +1 -1
  5. package/dist/3d-tiles-archive-loader.d.ts.map +1 -1
  6. package/dist/3d-tiles-archive-loader.js +1 -1
  7. package/dist/3d-tiles-archive-loader.js.map +1 -1
  8. package/dist/cesium-ion-loader.d.ts.map +1 -1
  9. package/dist/cesium-ion-loader.js.map +1 -1
  10. package/dist/dist.dev.js +111 -44
  11. package/dist/index.cjs +29 -20
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/lib/classes/helpers/tile-3d-accessor-utils.d.ts.map +1 -1
  15. package/dist/lib/classes/helpers/tile-3d-accessor-utils.js.map +1 -1
  16. package/dist/lib/classes/tile-3d-batch-table-hierarchy.d.ts.map +1 -1
  17. package/dist/lib/classes/tile-3d-batch-table-hierarchy.js.map +1 -1
  18. package/dist/lib/classes/tile-3d-batch-table.d.ts.map +1 -1
  19. package/dist/lib/classes/tile-3d-batch-table.js.map +1 -1
  20. package/dist/lib/classes/tile-3d-feature-table.d.ts.map +1 -1
  21. package/dist/lib/classes/tile-3d-feature-table.js.map +1 -1
  22. package/dist/lib/constants.d.ts.map +1 -1
  23. package/dist/lib/constants.js.map +1 -1
  24. package/dist/lib/encoders/encode-3d-tile-batched-model.d.ts.map +1 -1
  25. package/dist/lib/encoders/encode-3d-tile-batched-model.js.map +1 -1
  26. package/dist/lib/encoders/encode-3d-tile-composite.d.ts.map +1 -1
  27. package/dist/lib/encoders/encode-3d-tile-composite.js.map +1 -1
  28. package/dist/lib/encoders/encode-3d-tile-instanced-model.d.ts.map +1 -1
  29. package/dist/lib/encoders/encode-3d-tile-instanced-model.js.map +1 -1
  30. package/dist/lib/encoders/encode-3d-tile-point-cloud.d.ts.map +1 -1
  31. package/dist/lib/encoders/encode-3d-tile-point-cloud.js.map +1 -1
  32. package/dist/lib/encoders/encode-3d-tile.d.ts.map +1 -1
  33. package/dist/lib/encoders/encode-3d-tile.js.map +1 -1
  34. package/dist/lib/encoders/helpers/encode-3d-tile-header.d.ts.map +1 -1
  35. package/dist/lib/encoders/helpers/encode-3d-tile-header.js.map +1 -1
  36. package/dist/lib/filesystems/tiles-3d-archive-file-system.d.ts.map +1 -1
  37. package/dist/lib/filesystems/tiles-3d-archive-file-system.js.map +1 -1
  38. package/dist/lib/ion/ion.d.ts.map +1 -1
  39. package/dist/lib/ion/ion.js.map +1 -1
  40. package/dist/lib/parsers/helpers/normalize-3d-tile-colors.d.ts.map +1 -1
  41. package/dist/lib/parsers/helpers/normalize-3d-tile-colors.js.map +1 -1
  42. package/dist/lib/parsers/helpers/normalize-3d-tile-normals.d.ts.map +1 -1
  43. package/dist/lib/parsers/helpers/normalize-3d-tile-normals.js.map +1 -1
  44. package/dist/lib/parsers/helpers/normalize-3d-tile-positions.d.ts.map +1 -1
  45. package/dist/lib/parsers/helpers/normalize-3d-tile-positions.js.map +1 -1
  46. package/dist/lib/parsers/helpers/parse-3d-implicit-tiles.d.ts.map +1 -1
  47. package/dist/lib/parsers/helpers/parse-3d-implicit-tiles.js +21 -19
  48. package/dist/lib/parsers/helpers/parse-3d-implicit-tiles.js.map +1 -1
  49. package/dist/lib/parsers/helpers/parse-3d-tile-gltf-view.d.ts.map +1 -1
  50. package/dist/lib/parsers/helpers/parse-3d-tile-gltf-view.js.map +1 -1
  51. package/dist/lib/parsers/helpers/parse-3d-tile-header.d.ts.map +1 -1
  52. package/dist/lib/parsers/helpers/parse-3d-tile-header.js.map +1 -1
  53. package/dist/lib/parsers/helpers/parse-3d-tile-subtree.d.ts +9 -1
  54. package/dist/lib/parsers/helpers/parse-3d-tile-subtree.d.ts.map +1 -1
  55. package/dist/lib/parsers/helpers/parse-3d-tile-subtree.js +3 -2
  56. package/dist/lib/parsers/helpers/parse-3d-tile-subtree.js.map +1 -1
  57. package/dist/lib/parsers/helpers/parse-3d-tile-tables.d.ts.map +1 -1
  58. package/dist/lib/parsers/helpers/parse-3d-tile-tables.js.map +1 -1
  59. package/dist/lib/parsers/helpers/parse-utils.d.ts.map +1 -1
  60. package/dist/lib/parsers/helpers/parse-utils.js.map +1 -1
  61. package/dist/lib/parsers/parse-3d-tile-batched-model.d.ts.map +1 -1
  62. package/dist/lib/parsers/parse-3d-tile-batched-model.js.map +1 -1
  63. package/dist/lib/parsers/parse-3d-tile-composite.d.ts.map +1 -1
  64. package/dist/lib/parsers/parse-3d-tile-composite.js.map +1 -1
  65. package/dist/lib/parsers/parse-3d-tile-gltf.d.ts.map +1 -1
  66. package/dist/lib/parsers/parse-3d-tile-gltf.js.map +1 -1
  67. package/dist/lib/parsers/parse-3d-tile-header.d.ts.map +1 -1
  68. package/dist/lib/parsers/parse-3d-tile-header.js +6 -5
  69. package/dist/lib/parsers/parse-3d-tile-header.js.map +1 -1
  70. package/dist/lib/parsers/parse-3d-tile-instanced-model.d.ts.map +1 -1
  71. package/dist/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -1
  72. package/dist/lib/parsers/parse-3d-tile-point-cloud.d.ts.map +1 -1
  73. package/dist/lib/parsers/parse-3d-tile-point-cloud.js.map +1 -1
  74. package/dist/lib/parsers/parse-3d-tile.d.ts.map +1 -1
  75. package/dist/lib/parsers/parse-3d-tile.js.map +1 -1
  76. package/dist/lib/utils/obb/s2-corners-to-obb.d.ts.map +1 -1
  77. package/dist/lib/utils/obb/s2-corners-to-obb.js.map +1 -1
  78. package/dist/lib/utils/s2/converters/s2-to-boundary.d.ts.map +1 -1
  79. package/dist/lib/utils/s2/converters/s2-to-boundary.js.map +1 -1
  80. package/dist/lib/utils/s2/converters/s2-to-obb-points.d.ts.map +1 -1
  81. package/dist/lib/utils/s2/converters/s2-to-obb-points.js.map +1 -1
  82. package/dist/lib/utils/s2/converters/s2-to-region.d.ts.map +1 -1
  83. package/dist/lib/utils/s2/converters/s2-to-region.js.map +1 -1
  84. package/dist/lib/utils/s2/index.d.ts.map +1 -1
  85. package/dist/lib/utils/s2/index.js.map +1 -1
  86. package/dist/lib/utils/s2/s2-geometry-functions.d.ts.map +1 -1
  87. package/dist/lib/utils/s2/s2-geometry-functions.js.map +1 -1
  88. package/dist/lib/utils/s2/s2-token-functions.d.ts.map +1 -1
  89. package/dist/lib/utils/s2/s2-token-functions.js.map +1 -1
  90. package/dist/lib/utils/s2/s2geometry/s2-cell-utils.d.ts.map +1 -1
  91. package/dist/lib/utils/s2/s2geometry/s2-cell-utils.js.map +1 -1
  92. package/dist/lib/utils/s2/s2geometry/s2-geometry.d.ts.map +1 -1
  93. package/dist/lib/utils/s2/s2geometry/s2-geometry.js.map +1 -1
  94. package/dist/lib/utils/version.js +1 -1
  95. package/dist/lib/utils/version.js.map +1 -1
  96. package/dist/tile-3d-subtree-loader.d.ts.map +1 -1
  97. package/dist/tile-3d-subtree-loader.js.map +1 -1
  98. package/dist/tile-3d-writer.d.ts.map +1 -1
  99. package/dist/tile-3d-writer.js.map +1 -1
  100. package/dist/tiles-3d-loader.d.ts.map +1 -1
  101. package/dist/tiles-3d-loader.js.map +1 -1
  102. package/dist/types.d.ts +4 -4
  103. package/dist/types.d.ts.map +1 -1
  104. package/dist/types.js.map +1 -1
  105. package/package.json +8 -8
  106. package/src/3d-tiles-archive/3d-tiles-archive-archive.ts +4 -0
  107. package/src/3d-tiles-archive/3d-tiles-archive-parser.ts +4 -0
  108. package/src/3d-tiles-archive-loader.ts +4 -0
  109. package/src/cesium-ion-loader.ts +4 -0
  110. package/src/index.ts +4 -0
  111. package/src/lib/classes/helpers/tile-3d-accessor-utils.ts +4 -0
  112. package/src/lib/classes/tile-3d-batch-table-hierarchy.ts +4 -0
  113. package/src/lib/classes/tile-3d-batch-table.ts +4 -0
  114. package/src/lib/classes/tile-3d-feature-table.ts +4 -0
  115. package/src/lib/constants.ts +4 -0
  116. package/src/lib/encoders/encode-3d-tile-batched-model.ts +4 -0
  117. package/src/lib/encoders/encode-3d-tile-composite.ts +4 -0
  118. package/src/lib/encoders/encode-3d-tile-instanced-model.ts +4 -0
  119. package/src/lib/encoders/encode-3d-tile-point-cloud.ts +4 -0
  120. package/src/lib/encoders/encode-3d-tile.ts +4 -0
  121. package/src/lib/encoders/helpers/encode-3d-tile-header.ts +4 -0
  122. package/src/lib/filesystems/tiles-3d-archive-file-system.ts +4 -0
  123. package/src/lib/ion/ion.ts +4 -0
  124. package/src/lib/parsers/helpers/normalize-3d-tile-colors.ts +4 -0
  125. package/src/lib/parsers/helpers/normalize-3d-tile-normals.ts +4 -0
  126. package/src/lib/parsers/helpers/normalize-3d-tile-positions.ts +4 -0
  127. package/src/lib/parsers/helpers/parse-3d-implicit-tiles.ts +25 -16
  128. package/src/lib/parsers/helpers/parse-3d-tile-gltf-view.ts +4 -0
  129. package/src/lib/parsers/helpers/parse-3d-tile-header.ts +4 -0
  130. package/src/lib/parsers/helpers/parse-3d-tile-subtree.ts +11 -2
  131. package/src/lib/parsers/helpers/parse-3d-tile-tables.ts +4 -0
  132. package/src/lib/parsers/helpers/parse-utils.ts +4 -0
  133. package/src/lib/parsers/parse-3d-tile-batched-model.ts +4 -0
  134. package/src/lib/parsers/parse-3d-tile-composite.ts +4 -0
  135. package/src/lib/parsers/parse-3d-tile-gltf.ts +2 -1
  136. package/src/lib/parsers/parse-3d-tile-header.ts +11 -3
  137. package/src/lib/parsers/parse-3d-tile-instanced-model.ts +4 -0
  138. package/src/lib/parsers/parse-3d-tile-point-cloud.ts +4 -0
  139. package/src/lib/parsers/parse-3d-tile.ts +4 -0
  140. package/src/lib/utils/obb/s2-corners-to-obb.ts +4 -0
  141. package/src/lib/utils/s2/converters/s2-to-boundary.ts +4 -0
  142. package/src/lib/utils/s2/converters/s2-to-obb-points.ts +4 -0
  143. package/src/lib/utils/s2/converters/s2-to-region.ts +4 -0
  144. package/src/lib/utils/s2/index.ts +3 -1
  145. package/src/lib/utils/s2/s2-geometry-functions.ts +3 -1
  146. package/src/lib/utils/s2/s2-token-functions.ts +3 -2
  147. package/src/lib/utils/s2/s2geometry/s2-cell-utils.ts +3 -1
  148. package/src/lib/utils/s2/s2geometry/s2-geometry.ts +4 -1
  149. package/src/tile-3d-subtree-loader.ts +4 -0
  150. package/src/tile-3d-writer.ts +4 -0
  151. package/src/tiles-3d-loader.ts +4 -0
  152. package/src/types.ts +8 -4
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  import type {Availability, Tile3DBoundingVolume, Subtree} from '../../../types';
2
6
  import {Tile3DSubtreeLoader} from '../../../tile-3d-subtree-loader';
3
7
  import {load} from '@loaders.gl/core';
@@ -10,12 +14,12 @@ import Long from 'long';
10
14
  import {Tiles3DLoaderOptions} from '../../../tiles-3d-loader';
11
15
  import {ImplicitOptions} from '../parse-3d-tile-header';
12
16
 
13
- const QUADTREE_DEVISION_COUNT = 4;
14
- const OCTREE_DEVISION_COUNT = 8;
17
+ const QUADTREE_DIVISION_COUNT = 4;
18
+ const OCTREE_DIVISION_COUNT = 8;
15
19
 
16
20
  const SUBDIVISION_COUNT_MAP = {
17
- QUADTREE: QUADTREE_DEVISION_COUNT,
18
- OCTREE: OCTREE_DEVISION_COUNT
21
+ QUADTREE: QUADTREE_DIVISION_COUNT,
22
+ OCTREE: OCTREE_DIVISION_COUNT
19
23
  };
20
24
 
21
25
  /**
@@ -103,17 +107,20 @@ export async function parseImplicitTiles(params: {
103
107
  z: 0
104
108
  },
105
109
  childIndex = 0,
110
+ s2VolumeBox,
111
+ loaderOptions
112
+ } = params;
113
+ let {
114
+ subtree,
115
+ level = 0,
106
116
  globalData = {
107
117
  level: 0,
108
118
  mortonIndex: 0,
109
119
  x: 0,
110
120
  y: 0,
111
121
  z: 0
112
- },
113
- s2VolumeBox,
114
- loaderOptions
122
+ }
115
123
  } = params;
116
- let {subtree, level = 0} = params;
117
124
  const {
118
125
  subdivisionScheme,
119
126
  subtreeLevels,
@@ -163,9 +170,9 @@ export async function parseImplicitTiles(params: {
163
170
  );
164
171
  }
165
172
 
166
- const x = concatBits(globalData.x, childTileX, level * bitsPerTile);
167
- const y = concatBits(globalData.y, childTileY, level * bitsPerTile);
168
- const z = concatBits(globalData.z, childTileZ, level * bitsPerTile);
173
+ const x = concatBits(globalData.x, childTileX, level);
174
+ const y = concatBits(globalData.y, childTileY, level);
175
+ const z = concatBits(globalData.z, childTileZ, level);
169
176
 
170
177
  if (isChildSubtreeAvailable) {
171
178
  const subtreePath = `${basePath}/${subtreesUriTemplate}`;
@@ -174,11 +181,13 @@ export async function parseImplicitTiles(params: {
174
181
 
175
182
  subtree = childSubtree;
176
183
 
177
- globalData.mortonIndex = childTileMortonIndex;
178
- globalData.x = childTileX;
179
- globalData.y = childTileY;
180
- globalData.z = childTileZ;
181
- globalData.level = level;
184
+ globalData = {
185
+ mortonIndex: childTileMortonIndex,
186
+ x: childTileX,
187
+ y: childTileY,
188
+ z: childTileZ,
189
+ level
190
+ };
182
191
 
183
192
  childTileMortonIndex = 0;
184
193
  tileAvailabilityIndex = 0;
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT AND Apache-2.0
3
+ // Copyright vis.gl contributors
4
+
1
5
  // This file is derived from the Cesium code base under Apache 2 license
2
6
  // See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
3
7
 
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT AND Apache-2.0
3
+ // Copyright vis.gl contributors
4
+
1
5
  // This file is derived from the Cesium code base under Apache 2 license
2
6
  // See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
3
7
 
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  import type {Subtree, Availability} from '../../../types';
2
6
  import type {LoaderContext, LoaderOptions} from '@loaders.gl/loader-utils';
3
7
 
@@ -72,7 +76,7 @@ export default async function parse3DTilesSubtree(
72
76
  * @param internalBinaryBuffer - subtree binary buffer
73
77
  * @param context - loaders.gl context
74
78
  */
75
- async function loadExplicitBitstream(
79
+ export async function loadExplicitBitstream(
76
80
  subtree: Subtree,
77
81
  availabilityObject: Availability,
78
82
  internalBinaryBuffer: ArrayBuffer,
@@ -109,8 +113,13 @@ async function loadExplicitBitstream(
109
113
  );
110
114
  return;
111
115
  }
116
+
117
+ const bufferStart = subtree.buffers
118
+ .slice(0, bufferView.buffer)
119
+ .reduce((offset, buf) => offset + buf.byteLength, 0);
120
+
112
121
  availabilityObject.explicitBitstream = new Uint8Array(
113
- internalBinaryBuffer,
122
+ internalBinaryBuffer.slice(bufferStart, bufferStart + buffer.byteLength),
114
123
  bufferView.byteOffset,
115
124
  bufferView.byteLength
116
125
  );
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT AND Apache-2.0
3
+ // Copyright vis.gl contributors
4
+
1
5
  // This file is derived from the Cesium code base under Apache 2 license
2
6
  // See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
3
7
 
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT AND Apache-2.0
3
+ // Copyright vis.gl contributors
4
+
1
5
  // This file is derived from the Cesium code base under Apache 2 license
2
6
  // See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
3
7
 
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT AND Apache-2.0
3
+ // Copyright vis.gl contributors
4
+
1
5
  // This file is derived from the Cesium code base under Apache 2 license
2
6
  // See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
3
7
 
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT AND Apache-2.0
3
+ // Copyright vis.gl contributors
4
+
1
5
  // This file is derived from the Cesium code base under Apache 2 license
2
6
  // See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
3
7
 
@@ -1,4 +1,5 @@
1
- // loaders.gl, MIT license
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT license
2
3
  // Copyright (c) vis.gl contributors
3
4
 
4
5
  import {parseFromContext, LoaderContext} from '@loaders.gl/loader-utils';
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  import type {Tiles3DLoaderOptions} from '../../tiles-3d-loader';
2
6
  import type {LoaderOptions} from '@loaders.gl/loader-utils';
3
7
  import {path} from '@loaders.gl/loader-utils';
@@ -79,7 +83,7 @@ function getRefine(refine?: string): TILE_REFINEMENT | string | undefined {
79
83
  }
80
84
  }
81
85
 
82
- function resolveUri(uri: string = '', basePath: string): string {
86
+ function resolveUri(uri: string, basePath: string): string {
83
87
  // url scheme per RFC3986
84
88
  const urlSchemeRegex = /^[a-z][0-9a-z+.-]*:/i;
85
89
 
@@ -103,7 +107,10 @@ export function normalizeTileData(
103
107
  let tileContentUrl: string | undefined;
104
108
  if (tile.content) {
105
109
  const contentUri = tile.content.uri || tile.content?.url;
106
- tileContentUrl = resolveUri(contentUri, basePath);
110
+ if (typeof contentUri !== 'undefined') {
111
+ // sparse implicit tilesets may not define content for all nodes
112
+ tileContentUrl = resolveUri(contentUri, basePath);
113
+ }
107
114
  }
108
115
  const tilePostprocessed: Tiles3DTileJSONPostprocessed = {
109
116
  ...tile,
@@ -195,7 +202,8 @@ export async function normalizeImplicitTileHeaders(
195
202
  const replacedUrlTemplate = replaceContentUrlTemplate(subtreesUriTemplate, 0, 0, 0, 0);
196
203
  const subtreeUrl = resolveUri(replacedUrlTemplate, basePath);
197
204
  const subtree = await load(subtreeUrl, Tile3DSubtreeLoader, options);
198
- const contentUrlTemplate = resolveUri(tile.content?.uri, basePath);
205
+ const tileContentUri = tile.content?.uri;
206
+ const contentUrlTemplate = tileContentUri ? resolveUri(tileContentUri, basePath) : '';
199
207
  const refine = tileset?.root?.refine;
200
208
  // @ts-ignore
201
209
  const rootLodMetricValue = tile.geometricError;
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT AND Apache-2.0
3
+ // Copyright vis.gl contributors
4
+
1
5
  // This file is derived from the Cesium code base under Apache 2 license
2
6
  // See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
3
7
 
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT AND Apache-2.0
3
+ // Copyright vis.gl contributors
4
+
1
5
  // This file is derived from the Cesium code base under Apache 2 license
2
6
  // See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
3
7
 
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT AND Apache-2.0
3
+ // Copyright vis.gl contributors
4
+
1
5
  // This file is derived from the Cesium code base under Apache 2 license
2
6
  // See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
3
7
 
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  import {Vector3} from '@math.gl/core';
2
6
  import {OrientedBoundingBox, makeOrientedBoundingBoxFromPoints} from '@math.gl/culling';
3
7
 
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  import type {S2Cell} from '../s2geometry/s2-geometry';
2
6
  import {IJToST, STToUV, FaceUVToXYZ, XYZToLngLat} from '../s2geometry/s2-geometry';
3
7
 
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  import {getS2Cell} from '../s2geometry/s2-cell-utils';
2
6
  import {getS2Region} from './s2-to-region';
3
7
  import {Vector3} from '@math.gl/core';
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  import type {S2Cell} from '../s2geometry/s2-geometry';
2
6
  import {getS2BoundaryFlatFromS2Cell} from './s2-to-boundary';
3
7
  import {getS2Cell} from '../s2geometry/s2-cell-utils';
@@ -1,4 +1,6 @@
1
- // math.gl MIT license
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
2
4
 
3
5
  export {getS2CellIdFromToken, getS2TokenFromCellId, getS2ChildCellId} from './s2-token-functions';
4
6
  export {getS2BoundaryFlat, getS2LngLat} from './s2-geometry-functions';
@@ -1,4 +1,6 @@
1
- // math.gl, MIT license
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
2
4
 
3
5
  import {getS2BoundaryFlatFromS2Cell} from './converters/s2-to-boundary';
4
6
  import {getS2LngLatFromS2Cell} from './s2geometry/s2-geometry';
@@ -1,5 +1,6 @@
1
- // loaders.gl, MIT license
2
- // Copyright (c) vis.gl contributors
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
3
4
 
4
5
  import Long from 'long';
5
6
 
@@ -1,4 +1,6 @@
1
- // math.gl, MIT license
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
2
4
 
3
5
  import type {S2Cell} from './s2-geometry';
4
6
  import {getS2CellFromQuadKey, getS2QuadkeyFromCellId} from './s2-geometry';
@@ -1,4 +1,7 @@
1
- // math.gl, MIT license
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT AND ISC
3
+ // Copyright vis.gl contributors
4
+
2
5
  /*
3
6
  Adapted from s2-geometry under ISC License (ISC)
4
7
  Copyright (c) 2012-2016, Jon Atkins <github@jonatkins.com>
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  import type {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';
2
6
  import type {Subtree} from './types';
3
7
  import parse3DTilesSubtree from './lib/parsers/helpers/parse-3d-tile-subtree';
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  import type {WriterWithEncoder, WriterOptions} from '@loaders.gl/loader-utils';
2
6
  import {VERSION} from './lib/utils/version';
3
7
  import encode3DTile from './lib/encoders/encode-3d-tile';
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  import type {LoaderWithParser, LoaderOptions, LoaderContext} from '@loaders.gl/loader-utils';
2
6
  // / import type { GLTFLoaderOptions } from '@loaders.gl/gltf';
3
7
  import type {DracoLoaderOptions} from '@loaders.gl/draco';
package/src/types.ts CHANGED
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  import type {GLTFPostprocessed, FeatureTableJson} from '@loaders.gl/gltf';
2
6
  export type {FeatureTableJson};
3
7
 
@@ -321,10 +325,10 @@ export type Subtree = {
321
325
  */
322
326
  childSubtreeAvailability: Availability;
323
327
  // TODO: These are unused properties. Improve types when they are required
324
- propertyTables: unknown;
325
- tileMetadata: unknown;
326
- contentMetadata: unknown;
327
- subtreeMetadata: unknown;
328
+ propertyTables?: unknown;
329
+ tileMetadata?: unknown;
330
+ contentMetadata?: unknown;
331
+ subtreeMetadata?: unknown;
328
332
  };
329
333
 
330
334
  export type Availability = {