@loaders.gl/3d-tiles 4.3.0-alpha.6 → 4.3.0-alpha.8

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,5 +1,5 @@
1
1
  export declare function createTypedArrayFromAccessor(tile3DAccessor: any, buffer: any, byteOffset: any, length: any): {
2
- values: import("@math.gl/core").TypedArray;
2
+ values: import("@math.gl/types").TypedArray;
3
3
  type: any;
4
4
  size: any;
5
5
  unpacker: any;
@@ -21,7 +21,7 @@ export default class Tile3DBatchTableParser {
21
21
  _setBinaryProperty(binaryProperty: any, index: any, value: any): void;
22
22
  _initializeBinaryProperties(): Record<string, any> | null;
23
23
  _initializeBinaryProperty(name: any, property: any): {
24
- typedArray: import("@math.gl/core").TypedArray;
24
+ typedArray: import("@math.gl/types").TypedArray;
25
25
  componentCount: any;
26
26
  unpack: any;
27
27
  pack: any;
@@ -1,4 +1,4 @@
1
- import type { Subtree } from "../../../types.js";
1
+ import type { Tile3DBoundingVolume, Subtree } from "../../../types.js";
2
2
  import type { S2VolumeInfo } from "../../utils/obb/s2-corners-to-obb.js";
3
3
  import { Tiles3DLoaderOptions } from "../../../tiles-3d-loader.js";
4
4
  import { ImplicitOptions } from "../parse-3d-tile-header.js";
@@ -15,38 +15,54 @@ export type S2VolumeBox = {
15
15
  * Recursively parse implicit tiles tree
16
16
  * Spec - https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_implicit_tiling
17
17
  * TODO Check out do we able to use Tile3D class as return type here.
18
- * @param subtree
19
- * @param lodMetricValue
20
- * @param options
21
- * @param parentData
22
- * @param childIndex
23
- * @param level
24
- * @param globalData
18
+ *
19
+ * @param subtree - the current subtree. Subtrees contain availability data for <implicitOptions.subtreeLevels>.
20
+ * Once we go deeper than that many levels, we will need load a child subtree to get further availability data.
21
+ * @param subtreeData - the coordinates of the current subtree, relative to the root of this implicit tiles tree.
22
+ * @param parentData - the coordinates of the parent tile, relative to the current subtree.
23
+ * The overall coordinates of the current tile can be found by combining the coordinates of the current subtree, the parent tile,
24
+ * and tje single-bit coordinates that can be calculated from the childIndex.
25
+ * @param childIndex - which child the current tile is of its parent. In the range 0-7 for OCTREE, 0-3 for QUADTREE.
26
+ * @param implicitOptions - options specified at the root of this implicit tile tree - numbers of levels, URL templates.
27
+ * @param loaderOptions - see Tiles3DLoaderOptions.
25
28
  */
26
29
  export declare function parseImplicitTiles(params: {
27
30
  subtree: Subtree;
28
- implicitOptions: ImplicitOptions;
29
- parentData?: {
30
- mortonIndex: number;
31
+ subtreeData?: {
32
+ level: number;
31
33
  x: number;
32
34
  y: number;
33
35
  z: number;
34
36
  };
35
- childIndex?: number;
36
- level?: number;
37
- globalData?: {
38
- level: number;
37
+ parentData?: {
39
38
  mortonIndex: number;
40
- x: number;
41
- y: number;
42
- z: number;
39
+ localLevel: number;
40
+ localX: number;
41
+ localY: number;
42
+ localZ: number;
43
43
  };
44
- s2VolumeBox?: S2VolumeBox;
44
+ childIndex?: number;
45
+ implicitOptions: ImplicitOptions;
45
46
  loaderOptions: Tiles3DLoaderOptions;
47
+ s2VolumeBox?: S2VolumeBox;
46
48
  }): Promise<{
47
49
  children: never[];
48
50
  lodMetricValue: number;
49
51
  contentUrl: string;
52
+ } | {
53
+ children: any;
54
+ contentUrl: any;
55
+ content: {
56
+ uri: any;
57
+ };
58
+ id: any;
59
+ refine: string | import("@loaders.gl/tiles").TILE_REFINEMENT | undefined;
60
+ type: string;
61
+ lodMetricType: import("@loaders.gl/tiles").LOD_METRIC_TYPE.GEOMETRIC_ERROR;
62
+ lodMetricValue: number;
63
+ geometricError: number;
64
+ transform: any;
65
+ boundingVolume: Tile3DBoundingVolume;
50
66
  }>;
51
67
  /**
52
68
  * Replace implicit tile content url with real coordinates.
@@ -1 +1 @@
1
- {"version":3,"file":"parse-3d-implicit-tiles.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/helpers/parse-3d-implicit-tiles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAqC,OAAO,EAAC,0BAAuB;AAMhF,OAAO,KAAK,EAAC,YAAY,EAAC,6CAA0C;AAGpE,OAAO,EAAC,oBAAoB,EAAC,oCAAiC;AAC9D,OAAO,EAAC,eAAe,EAAC,mCAAgC;AAUxD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,yFAAyF;IACzF,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,uGAAuG;IACvG,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AA6CF;;;;;;;;;;;GAWG;AAEH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,CAAC,EAAE;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC;IACnF,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,EAAE,oBAAoB,CAAC;CACrC;;;;GAwJA;AAmJD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR,MAAM,CAGR"}
1
+ {"version":3,"file":"parse-3d-implicit-tiles.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/helpers/parse-3d-implicit-tiles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAe,oBAAoB,EAAE,OAAO,EAAC,0BAAuB;AAMhF,OAAO,KAAK,EAAC,YAAY,EAAC,6CAA0C;AAGpE,OAAO,EAAC,oBAAoB,EAAC,oCAAiC;AAC9D,OAAO,EAAC,eAAe,EAAC,mCAAgC;AAUxD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,yFAAyF;IACzF,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,uGAAuG;IACvG,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AA6CF;;;;;;;;;;;;;;GAcG;AAEH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC;IAC/D,UAAU,CAAC,EAAE;QACX,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,eAAe,CAAC;IACjC,aAAa,EAAE,oBAAoB,CAAC;IACpC,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;;;;;;;;;;;;;;;;;;GAuJA;AA0JD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR,MAAM,CAGR"}
@@ -52,109 +52,122 @@ function getChildS2VolumeBox(s2VolumeBox, index, subdivisionScheme) {
52
52
  * Recursively parse implicit tiles tree
53
53
  * Spec - https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_implicit_tiling
54
54
  * TODO Check out do we able to use Tile3D class as return type here.
55
- * @param subtree
56
- * @param lodMetricValue
57
- * @param options
58
- * @param parentData
59
- * @param childIndex
60
- * @param level
61
- * @param globalData
55
+ *
56
+ * @param subtree - the current subtree. Subtrees contain availability data for <implicitOptions.subtreeLevels>.
57
+ * Once we go deeper than that many levels, we will need load a child subtree to get further availability data.
58
+ * @param subtreeData - the coordinates of the current subtree, relative to the root of this implicit tiles tree.
59
+ * @param parentData - the coordinates of the parent tile, relative to the current subtree.
60
+ * The overall coordinates of the current tile can be found by combining the coordinates of the current subtree, the parent tile,
61
+ * and tje single-bit coordinates that can be calculated from the childIndex.
62
+ * @param childIndex - which child the current tile is of its parent. In the range 0-7 for OCTREE, 0-3 for QUADTREE.
63
+ * @param implicitOptions - options specified at the root of this implicit tile tree - numbers of levels, URL templates.
64
+ * @param loaderOptions - see Tiles3DLoaderOptions.
62
65
  */
63
66
  // eslint-disable-next-line max-statements
64
67
  export async function parseImplicitTiles(params) {
65
- const { implicitOptions, parentData = {
66
- mortonIndex: 0,
67
- x: 0,
68
- y: 0,
69
- z: 0
70
- }, childIndex = 0, s2VolumeBox, loaderOptions } = params;
71
- let { subtree, level = 0, globalData = {
68
+ const { subtree, subtreeData = {
72
69
  level: 0,
73
- mortonIndex: 0,
74
70
  x: 0,
75
71
  y: 0,
76
72
  z: 0
77
- } } = params;
73
+ }, parentData = {
74
+ mortonIndex: 0,
75
+ localLevel: -1,
76
+ localX: 0,
77
+ localY: 0,
78
+ localZ: 0
79
+ }, childIndex = 0, implicitOptions, loaderOptions, s2VolumeBox } = params;
78
80
  const { subdivisionScheme, subtreeLevels, maximumLevel, contentUrlTemplate, subtreesUriTemplate, basePath } = implicitOptions;
79
81
  const tile = { children: [], lodMetricValue: 0, contentUrl: '' };
80
82
  if (!maximumLevel) {
81
83
  log.once(`Missing 'maximumLevel' or 'availableLevels' property. The subtree ${contentUrlTemplate} won't be loaded...`);
82
84
  return tile;
83
85
  }
84
- const lev = level + globalData.level;
85
- if (lev > maximumLevel) {
86
+ // Local tile level - relative to the current subtree.
87
+ const localLevel = parentData.localLevel + 1;
88
+ // Global tile level - relative to the root tile of this implicit subdivision scheme.
89
+ const level = subtreeData.level + localLevel;
90
+ if (level > maximumLevel) {
86
91
  return tile;
87
92
  }
88
93
  const childrenPerTile = SUBDIVISION_COUNT_MAP[subdivisionScheme];
89
94
  const bitsPerTile = Math.log2(childrenPerTile);
90
- // childIndex is in range [0,4] for quadtrees and [0, 7] for octrees
91
- const childX = childIndex & 0b01; // Get first bit for X
92
- const childY = (childIndex >> 1) & 0b01; // Get second bit for Y
93
- const childZ = (childIndex >> 2) & 0b01; // Get third bit for Z
94
- const levelOffset = (childrenPerTile ** level - 1) / (childrenPerTile - 1);
95
- let childTileMortonIndex = concatBits(parentData.mortonIndex, childIndex, bitsPerTile);
96
- let tileAvailabilityIndex = levelOffset + childTileMortonIndex;
97
- // Local tile coordinates
98
- let childTileX = concatBits(parentData.x, childX, 1);
99
- let childTileY = concatBits(parentData.y, childY, 1);
100
- let childTileZ = concatBits(parentData.z, childZ, 1);
101
- let isChildSubtreeAvailable = false;
102
- if (level >= subtreeLevels) {
103
- isChildSubtreeAvailable = getAvailabilityResult(subtree.childSubtreeAvailability, childTileMortonIndex);
104
- }
105
- const x = concatBits(globalData.x, childTileX, level);
106
- const y = concatBits(globalData.y, childTileY, level);
107
- const z = concatBits(globalData.z, childTileZ, level);
95
+ // childIndex is in range 0...3 for quadtrees and 0...7 for octrees
96
+ const lastBitX = childIndex & 0b01; // Get first bit for X
97
+ const lastBitY = (childIndex >> 1) & 0b01; // Get second bit for Y
98
+ const lastBitZ = (childIndex >> 2) & 0b01; // Get third bit for Z
99
+ // Local tile coordinates - relative to the current subtree root.
100
+ const localX = concatBits(parentData.localX, lastBitX, 1);
101
+ const localY = concatBits(parentData.localY, lastBitY, 1);
102
+ const localZ = concatBits(parentData.localZ, lastBitZ, 1);
103
+ // Global tile coordinates - relative to the implicit-tile-tree root.
104
+ // Found by combining the local coordinates which are relative to the current subtree, with the subtree coordinates.
105
+ const x = concatBits(subtreeData.x, localX, localLevel);
106
+ const y = concatBits(subtreeData.y, localY, localLevel);
107
+ const z = concatBits(subtreeData.z, localZ, localLevel);
108
+ const mortonIndex = concatBits(parentData.mortonIndex, childIndex, bitsPerTile);
109
+ const isChildSubtreeAvailable = localLevel === subtreeLevels &&
110
+ getAvailabilityResult(subtree.childSubtreeAvailability, mortonIndex);
111
+ // Context to provide the next recursive call.
112
+ // This context is set up differently depending on whether its time to start a new subtree or not.
113
+ let nextSubtree;
114
+ let nextSubtreeData;
115
+ let nextParentData;
116
+ let tileAvailabilityIndex;
108
117
  if (isChildSubtreeAvailable) {
109
118
  const subtreePath = `${basePath}/${subtreesUriTemplate}`;
110
- const childSubtreeUrl = replaceContentUrlTemplate(subtreePath, lev, x, y, z);
119
+ const childSubtreeUrl = replaceContentUrlTemplate(subtreePath, level, x, y, z);
111
120
  const childSubtree = await load(childSubtreeUrl, Tile3DSubtreeLoader, loaderOptions);
112
- subtree = childSubtree;
113
- globalData = {
114
- mortonIndex: childTileMortonIndex,
115
- x: childTileX,
116
- y: childTileY,
117
- z: childTileZ,
118
- level
119
- };
120
- childTileMortonIndex = 0;
121
+ // The next subtree is the newly-loaded child subtree.
122
+ nextSubtree = childSubtree;
123
+ // The current tile is actually the root tile in the next subtree, so it has a tileAvailabilityIndex of 0.
121
124
  tileAvailabilityIndex = 0;
122
- childTileX = 0;
123
- childTileY = 0;
124
- childTileZ = 0;
125
- level = 0;
125
+ // The next subtree starts HERE - at the current tile.
126
+ nextSubtreeData = { level, x, y, z };
127
+ // The next parent is also the current tile - so it has local coordinates of 0 relative to the next subtree.
128
+ nextParentData = { mortonIndex: 0, localLevel: 0, localX: 0, localY: 0, localZ: 0 };
129
+ }
130
+ else {
131
+ // Continue on with the same subtree as we're using currently.
132
+ nextSubtree = subtree;
133
+ // Calculate a tileAvailabilityIndex for the current tile within the current subtree.
134
+ const levelOffset = (childrenPerTile ** localLevel - 1) / (childrenPerTile - 1);
135
+ tileAvailabilityIndex = levelOffset + mortonIndex;
136
+ // The next subtree is the same as the current subtree.
137
+ nextSubtreeData = subtreeData;
138
+ // The next parent is the current tile: it has the local coordinates we already calculated.
139
+ nextParentData = { mortonIndex, localLevel, localX, localY, localZ };
126
140
  }
127
- const isTileAvailable = getAvailabilityResult(subtree.tileAvailability, tileAvailabilityIndex);
141
+ const isTileAvailable = getAvailabilityResult(nextSubtree.tileAvailability, tileAvailabilityIndex);
128
142
  if (!isTileAvailable) {
129
143
  return tile;
130
144
  }
131
- const isContentAvailable = getAvailabilityResult(subtree.contentAvailability, tileAvailabilityIndex);
145
+ const isContentAvailable = getAvailabilityResult(nextSubtree.contentAvailability, tileAvailabilityIndex);
132
146
  if (isContentAvailable) {
133
- tile.contentUrl = replaceContentUrlTemplate(contentUrlTemplate, lev, x, y, z);
147
+ tile.contentUrl = replaceContentUrlTemplate(contentUrlTemplate, level, x, y, z);
134
148
  }
135
- const childTileLevel = level + 1;
136
- const pData = { mortonIndex: childTileMortonIndex, x: childTileX, y: childTileY, z: childTileZ };
137
149
  for (let index = 0; index < childrenPerTile; index++) {
138
150
  const childS2VolumeBox = getChildS2VolumeBox(s2VolumeBox, index, subdivisionScheme);
139
151
  // Recursive calling...
140
- const childTileParsed = await parseImplicitTiles({
141
- subtree,
152
+ const childTile = await parseImplicitTiles({
153
+ subtree: nextSubtree,
154
+ subtreeData: nextSubtreeData,
155
+ parentData: nextParentData,
156
+ childIndex: index,
142
157
  implicitOptions,
143
158
  loaderOptions,
144
- parentData: pData,
145
- childIndex: index,
146
- level: childTileLevel,
147
- globalData: { ...globalData },
148
159
  s2VolumeBox: childS2VolumeBox
149
160
  });
150
- if (childTileParsed.contentUrl || childTileParsed.children.length) {
151
- const globalLevel = lev + 1;
152
- const childCoordinates = { childTileX, childTileY, childTileZ };
153
- const formattedTile = formatTileData(childTileParsed, globalLevel, childCoordinates, implicitOptions, s2VolumeBox);
161
+ if (childTile.contentUrl || childTile.children.length) {
154
162
  // @ts-ignore
155
- tile.children.push(formattedTile);
163
+ tile.children.push(childTile);
156
164
  }
157
165
  }
166
+ if (tile.contentUrl || tile.children.length) {
167
+ const coordinates = { level, x, y, z };
168
+ const formattedTile = formatTileData(tile, coordinates, implicitOptions, s2VolumeBox);
169
+ return formattedTile;
170
+ }
158
171
  return tile;
159
172
  }
160
173
  /**
@@ -190,19 +203,21 @@ function getAvailabilityResult(availabilityData, index) {
190
203
  /**
191
204
  * Do formatting of implicit tile data.
192
205
  * TODO Check out do we able to use Tile3D class as type here.
193
- * @param tile
194
- * @param lodMetricValue
195
- * @param options
206
+ *
207
+ * @param tile - tile data to format.
208
+ * @param coordinates - global tile coordinates (relative to the root of the implicit tile tree).
209
+ * @param options - options specified at the root of this implicit tile tree - numbers of levels, URL templates.
210
+ * @param s2VolumeBox - the S2VolumeBox for this particular child, if available.
196
211
  * @returns
197
212
  */
198
- function formatTileData(tile, level, childCoordinates, options, s2VolumeBox) {
213
+ function formatTileData(tile, coordinates, options, s2VolumeBox) {
199
214
  const { basePath, refine, getRefine, lodMetricType, getTileType, rootLodMetricValue, rootBoundingVolume } = options;
200
215
  const uri = tile.contentUrl && tile.contentUrl.replace(`${basePath}/`, '');
201
- const lodMetricValue = rootLodMetricValue / 2 ** level;
216
+ const lodMetricValue = rootLodMetricValue / 2 ** coordinates.level;
202
217
  const boundingVolume = s2VolumeBox?.box
203
218
  ? { box: s2VolumeBox.box }
204
219
  : rootBoundingVolume;
205
- const boundingVolumeForChildTile = calculateBoundingVolumeForChildTile(level, boundingVolume, childCoordinates);
220
+ const boundingVolumeForChildTile = calculateBoundingVolumeForChildTile(boundingVolume, coordinates, options.subdivisionScheme);
206
221
  return {
207
222
  children: tile.children,
208
223
  contentUrl: tile.contentUrl,
@@ -220,28 +235,36 @@ function formatTileData(tile, level, childCoordinates, options, s2VolumeBox) {
220
235
  /**
221
236
  * Calculate child bounding volume.
222
237
  * Spec - https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_implicit_tiling#subdivision-rules
223
- * @param level
224
238
  * @param rootBoundingVolume
225
- * @param childCoordinates
239
+ * @param coordinates
240
+ * @param subdivisionScheme
226
241
  */
227
- function calculateBoundingVolumeForChildTile(level, rootBoundingVolume, childCoordinates) {
242
+ function calculateBoundingVolumeForChildTile(rootBoundingVolume, coordinates, subdivisionScheme) {
228
243
  if (rootBoundingVolume.region) {
229
- const { childTileX, childTileY, childTileZ } = childCoordinates;
244
+ const { level, x, y, z } = coordinates;
230
245
  const [west, south, east, north, minimumHeight, maximumHeight] = rootBoundingVolume.region;
231
246
  const boundingVolumesCount = 2 ** level;
232
247
  const sizeX = (east - west) / boundingVolumesCount;
248
+ const [childWest, childEast] = [west + sizeX * x, west + sizeX * (x + 1)];
233
249
  const sizeY = (north - south) / boundingVolumesCount;
234
- // TODO : Why is the subdivisionScheme not being checked here?
250
+ const [childSouth, childNorth] = [south + sizeY * y, south + sizeY * (y + 1)];
235
251
  // In case of QUADTREE the sizeZ should NOT be changed!
236
252
  // https://portal.ogc.org/files/102132
237
- // A quadtree divides space only on the x and y dimensions. It divides each tile into 4 smaller tiles where the x and y dimensions are halved. The quadtree z minimum and maximum remain unchanged.
238
- const sizeZ = (maximumHeight - minimumHeight) / boundingVolumesCount;
239
- const [childWest, childEast] = [west + sizeX * childTileX, west + sizeX * (childTileX + 1)];
240
- const [childSouth, childNorth] = [south + sizeY * childTileY, south + sizeY * (childTileY + 1)];
241
- const [childMinimumHeight, childMaximumHeight] = [
242
- minimumHeight + sizeZ * childTileZ,
243
- minimumHeight + sizeZ * (childTileZ + 1)
244
- ];
253
+ // A quadtree divides space only on the x and y dimensions.
254
+ // It divides each tile into 4 smaller tiles where the x and y dimensions are halved.
255
+ // The quadtree z minimum and maximum remain unchanged.
256
+ let childMinimumHeight;
257
+ let childMaximumHeight;
258
+ if (subdivisionScheme === 'OCTREE') {
259
+ const sizeZ = (maximumHeight - minimumHeight) / boundingVolumesCount;
260
+ [childMinimumHeight, childMaximumHeight] = [
261
+ minimumHeight + sizeZ * z,
262
+ minimumHeight + sizeZ * (z + 1)
263
+ ];
264
+ }
265
+ else {
266
+ [childMinimumHeight, childMaximumHeight] = [minimumHeight, maximumHeight];
267
+ }
245
268
  return {
246
269
  region: [childWest, childSouth, childEast, childNorth, childMinimumHeight, childMaximumHeight]
247
270
  };
@@ -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.0-alpha.5" !== 'undefined' ? "4.3.0-alpha.5" : 'latest';
4
+ export const VERSION = typeof "4.3.0-alpha.7" !== 'undefined' ? "4.3.0-alpha.7" : 'latest';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/3d-tiles",
3
- "version": "4.3.0-alpha.6",
3
+ "version": "4.3.0-alpha.8",
4
4
  "description": "3D Tiles, an open standard for streaming massive heterogeneous 3D geospatial datasets.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -46,23 +46,23 @@
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.0-alpha.6",
50
- "@loaders.gl/crypto": "4.3.0-alpha.6",
51
- "@loaders.gl/draco": "4.3.0-alpha.6",
52
- "@loaders.gl/gltf": "4.3.0-alpha.6",
53
- "@loaders.gl/images": "4.3.0-alpha.6",
54
- "@loaders.gl/loader-utils": "4.3.0-alpha.6",
55
- "@loaders.gl/math": "4.3.0-alpha.6",
56
- "@loaders.gl/tiles": "4.3.0-alpha.6",
57
- "@loaders.gl/zip": "4.3.0-alpha.6",
58
- "@math.gl/core": "^4.0.1",
59
- "@math.gl/culling": "^4.0.1",
60
- "@math.gl/geospatial": "^4.0.1",
49
+ "@loaders.gl/compression": "4.3.0-alpha.8",
50
+ "@loaders.gl/crypto": "4.3.0-alpha.8",
51
+ "@loaders.gl/draco": "4.3.0-alpha.8",
52
+ "@loaders.gl/gltf": "4.3.0-alpha.8",
53
+ "@loaders.gl/images": "4.3.0-alpha.8",
54
+ "@loaders.gl/loader-utils": "4.3.0-alpha.8",
55
+ "@loaders.gl/math": "4.3.0-alpha.8",
56
+ "@loaders.gl/tiles": "4.3.0-alpha.8",
57
+ "@loaders.gl/zip": "4.3.0-alpha.8",
58
+ "@math.gl/core": "^4.1.0",
59
+ "@math.gl/culling": "^4.1.0",
60
+ "@math.gl/geospatial": "^4.1.0",
61
61
  "@probe.gl/log": "^4.0.4",
62
62
  "long": "^5.2.1"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "@loaders.gl/core": "^4.0.0"
66
66
  },
67
- "gitHead": "315f2e232fc4e6a477c41de800a54d3e3d957e8c"
67
+ "gitHead": "c458e0c3a09543cd7c4a293d3c3f08c12acf78c0"
68
68
  }