@loaders.gl/tiles 4.2.0-alpha.4 → 4.2.0-alpha.6

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 (75) hide show
  1. package/dist/constants.js +34 -32
  2. package/dist/dist.dev.js +679 -449
  3. package/dist/dist.min.js +9 -0
  4. package/dist/index.cjs +265 -326
  5. package/dist/index.cjs.map +7 -0
  6. package/dist/index.d.ts +10 -10
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +3 -1
  9. package/dist/tileset/format-3d-tiles/tileset-3d-traverser.d.ts +1 -1
  10. package/dist/tileset/format-3d-tiles/tileset-3d-traverser.d.ts.map +1 -1
  11. package/dist/tileset/format-3d-tiles/tileset-3d-traverser.js +45 -35
  12. package/dist/tileset/format-i3s/i3s-pending-tiles-register.js +38 -22
  13. package/dist/tileset/format-i3s/i3s-tile-manager.d.ts +1 -1
  14. package/dist/tileset/format-i3s/i3s-tile-manager.d.ts.map +1 -1
  15. package/dist/tileset/format-i3s/i3s-tile-manager.js +68 -69
  16. package/dist/tileset/format-i3s/i3s-tileset-traverser.d.ts +2 -2
  17. package/dist/tileset/format-i3s/i3s-tileset-traverser.d.ts.map +1 -1
  18. package/dist/tileset/format-i3s/i3s-tileset-traverser.js +79 -57
  19. package/dist/tileset/helpers/3d-tiles-options.d.ts +1 -1
  20. package/dist/tileset/helpers/3d-tiles-options.d.ts.map +1 -1
  21. package/dist/tileset/helpers/3d-tiles-options.js +3 -4
  22. package/dist/tileset/helpers/bounding-volume.js +269 -128
  23. package/dist/tileset/helpers/frame-state.d.ts +1 -1
  24. package/dist/tileset/helpers/frame-state.d.ts.map +1 -1
  25. package/dist/tileset/helpers/frame-state.js +114 -95
  26. package/dist/tileset/helpers/i3s-lod.d.ts +2 -2
  27. package/dist/tileset/helpers/i3s-lod.d.ts.map +1 -1
  28. package/dist/tileset/helpers/i3s-lod.js +68 -39
  29. package/dist/tileset/helpers/tiles-3d-lod.js +97 -85
  30. package/dist/tileset/helpers/transform-utils.js +45 -44
  31. package/dist/tileset/helpers/zoom.d.ts +1 -1
  32. package/dist/tileset/helpers/zoom.d.ts.map +1 -1
  33. package/dist/tileset/helpers/zoom.js +70 -40
  34. package/dist/tileset/tile-3d.d.ts +7 -6
  35. package/dist/tileset/tile-3d.d.ts.map +1 -1
  36. package/dist/tileset/tile-3d.js +608 -399
  37. package/dist/tileset/tileset-3d.d.ts +7 -6
  38. package/dist/tileset/tileset-3d.d.ts.map +1 -1
  39. package/dist/tileset/tileset-3d.js +739 -597
  40. package/dist/tileset/tileset-cache.d.ts +2 -2
  41. package/dist/tileset/tileset-cache.d.ts.map +1 -1
  42. package/dist/tileset/tileset-cache.js +65 -48
  43. package/dist/tileset/tileset-traverser.d.ts +3 -3
  44. package/dist/tileset/tileset-traverser.d.ts.map +1 -1
  45. package/dist/tileset/tileset-traverser.js +282 -220
  46. package/dist/types.js +0 -1
  47. package/dist/utils/doubly-linked-list-node.js +17 -9
  48. package/dist/utils/doubly-linked-list.d.ts +1 -1
  49. package/dist/utils/doubly-linked-list.d.ts.map +1 -1
  50. package/dist/utils/doubly-linked-list.js +83 -56
  51. package/dist/utils/managed-array.js +140 -76
  52. package/package.json +10 -9
  53. package/src/tileset/tile-3d.ts +1 -1
  54. package/src/tileset/tileset-3d.ts +1 -1
  55. package/dist/constants.js.map +0 -1
  56. package/dist/index.js.map +0 -1
  57. package/dist/tileset/format-3d-tiles/tileset-3d-traverser.js.map +0 -1
  58. package/dist/tileset/format-i3s/i3s-pending-tiles-register.js.map +0 -1
  59. package/dist/tileset/format-i3s/i3s-tile-manager.js.map +0 -1
  60. package/dist/tileset/format-i3s/i3s-tileset-traverser.js.map +0 -1
  61. package/dist/tileset/helpers/3d-tiles-options.js.map +0 -1
  62. package/dist/tileset/helpers/bounding-volume.js.map +0 -1
  63. package/dist/tileset/helpers/frame-state.js.map +0 -1
  64. package/dist/tileset/helpers/i3s-lod.js.map +0 -1
  65. package/dist/tileset/helpers/tiles-3d-lod.js.map +0 -1
  66. package/dist/tileset/helpers/transform-utils.js.map +0 -1
  67. package/dist/tileset/helpers/zoom.js.map +0 -1
  68. package/dist/tileset/tile-3d.js.map +0 -1
  69. package/dist/tileset/tileset-3d.js.map +0 -1
  70. package/dist/tileset/tileset-cache.js.map +0 -1
  71. package/dist/tileset/tileset-traverser.js.map +0 -1
  72. package/dist/types.js.map +0 -1
  73. package/dist/utils/doubly-linked-list-node.js.map +0 -1
  74. package/dist/utils/doubly-linked-list.js.map +0 -1
  75. package/dist/utils/managed-array.js.map +0 -1
@@ -1,3 +1,8 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ // This file is derived from the Cesium code base under Apache 2 license
5
+ // See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
1
6
  import { Vector3, Matrix4 } from '@math.gl/core';
2
7
  import { CullingVolume } from '@math.gl/culling';
3
8
  import { load } from '@loaders.gl/core';
@@ -9,405 +14,609 @@ import { get3dTilesOptions } from "./helpers/3d-tiles-options.js";
9
14
  import { TilesetTraverser } from "./tileset-traverser.js";
10
15
  const scratchVector = new Vector3();
11
16
  function defined(x) {
12
- return x !== undefined && x !== null;
17
+ return x !== undefined && x !== null;
13
18
  }
19
+ /**
20
+ * A Tile3DHeader represents a tile as Tileset3D. When a tile is first created, its content is not loaded;
21
+ * the content is loaded on-demand when needed based on the view.
22
+ * Do not construct this directly, instead access tiles through {@link Tileset3D#tileVisible}.
23
+ */
14
24
  export class Tile3D {
15
- constructor(tileset, header, parentHeader) {
16
- let extendedId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
17
- this.tileset = void 0;
18
- this.header = void 0;
19
- this.id = void 0;
20
- this.url = void 0;
21
- this.parent = void 0;
22
- this.refine = void 0;
23
- this.type = void 0;
24
- this.contentUrl = void 0;
25
- this.lodMetricType = 'geometricError';
26
- this.lodMetricValue = 0;
27
- this.boundingVolume = null;
28
- this.content = null;
29
- this.contentState = TILE_CONTENT_STATE.UNLOADED;
30
- this.gpuMemoryUsageInBytes = 0;
31
- this.children = [];
32
- this.depth = 0;
33
- this.viewportIds = [];
34
- this.transform = new Matrix4();
35
- this.extensions = null;
36
- this.implicitTiling = null;
37
- this.userData = {};
38
- this.computedTransform = void 0;
39
- this.hasEmptyContent = false;
40
- this.hasTilesetContent = false;
41
- this.traverser = new TilesetTraverser({});
42
- this._cacheNode = null;
43
- this._frameNumber = null;
44
- this._expireDate = null;
45
- this._expiredContent = null;
46
- this._boundingBox = undefined;
47
- this._distanceToCamera = 0;
48
- this._screenSpaceError = 0;
49
- this._visibilityPlaneMask = void 0;
50
- this._visible = undefined;
51
- this._contentBoundingVolume = void 0;
52
- this._viewerRequestVolume = void 0;
53
- this._initialTransform = new Matrix4();
54
- this._priority = 0;
55
- this._selectedFrame = 0;
56
- this._requestedFrame = 0;
57
- this._selectionDepth = 0;
58
- this._touchedFrame = 0;
59
- this._centerZDepth = 0;
60
- this._shouldRefine = false;
61
- this._stackLength = 0;
62
- this._visitedFrame = 0;
63
- this._inRequestVolume = false;
64
- this._lodJudge = null;
65
- this.header = header;
66
- this.tileset = tileset;
67
- this.id = extendedId || header.id;
68
- this.url = header.url;
69
- this.parent = parentHeader;
70
- this.refine = this._getRefine(header.refine);
71
- this.type = header.type;
72
- this.contentUrl = header.contentUrl;
73
- this._initializeLodMetric(header);
74
- this._initializeTransforms(header);
75
- this._initializeBoundingVolumes(header);
76
- this._initializeContent(header);
77
- this._initializeRenderingState(header);
78
- Object.seal(this);
79
- }
80
- destroy() {
81
- this.header = null;
82
- }
83
- isDestroyed() {
84
- return this.header === null;
85
- }
86
- get selected() {
87
- return this._selectedFrame === this.tileset._frameNumber;
88
- }
89
- get isVisible() {
90
- return this._visible;
91
- }
92
- get isVisibleAndInRequestVolume() {
93
- return this._visible && this._inRequestVolume;
94
- }
95
- get hasRenderContent() {
96
- return !this.hasEmptyContent && !this.hasTilesetContent;
97
- }
98
- get hasChildren() {
99
- return this.children.length > 0 || this.header.children && this.header.children.length > 0;
100
- }
101
- get contentReady() {
102
- return this.contentState === TILE_CONTENT_STATE.READY || this.hasEmptyContent;
103
- }
104
- get contentAvailable() {
105
- return Boolean(this.contentReady && this.hasRenderContent || this._expiredContent && !this.contentFailed);
106
- }
107
- get hasUnloadedContent() {
108
- return this.hasRenderContent && this.contentUnloaded;
109
- }
110
- get contentUnloaded() {
111
- return this.contentState === TILE_CONTENT_STATE.UNLOADED;
112
- }
113
- get contentExpired() {
114
- return this.contentState === TILE_CONTENT_STATE.EXPIRED;
115
- }
116
- get contentFailed() {
117
- return this.contentState === TILE_CONTENT_STATE.FAILED;
118
- }
119
- get distanceToCamera() {
120
- return this._distanceToCamera;
121
- }
122
- get screenSpaceError() {
123
- return this._screenSpaceError;
124
- }
125
- get boundingBox() {
126
- if (!this._boundingBox) {
127
- this._boundingBox = getCartographicBounds(this.header.boundingVolume, this.boundingVolume);
128
- }
129
- return this._boundingBox;
130
- }
131
- getScreenSpaceError(frameState, useParentLodMetric) {
132
- switch (this.tileset.type) {
133
- case TILESET_TYPE.I3S:
134
- return getProjectedRadius(this, frameState);
135
- case TILESET_TYPE.TILES3D:
136
- return getTiles3DScreenSpaceError(this, frameState, useParentLodMetric);
137
- default:
138
- throw new Error('Unsupported tileset type');
139
- }
140
- }
141
- unselect() {
142
- this._selectedFrame = 0;
143
- }
144
- _getGpuMemoryUsageInBytes() {
145
- return this.content.gpuMemoryUsageInBytes || this.content.byteLength || 0;
146
- }
147
- _getPriority() {
148
- const traverser = this.tileset._traverser;
149
- const {
150
- skipLevelOfDetail
151
- } = traverser.options;
152
- const maySkipTile = this.refine === TILE_REFINEMENT.ADD || skipLevelOfDetail;
153
- if (maySkipTile && !this.isVisible && this._visible !== undefined) {
154
- return -1;
155
- }
156
- if (this.tileset._frameNumber - this._touchedFrame >= 1) {
157
- return -1;
158
- }
159
- if (this.contentState === TILE_CONTENT_STATE.UNLOADED) {
160
- return -1;
161
- }
162
- const parent = this.parent;
163
- const useParentScreenSpaceError = parent && (!maySkipTile || this._screenSpaceError === 0.0 || parent.hasTilesetContent);
164
- const screenSpaceError = useParentScreenSpaceError ? parent._screenSpaceError : this._screenSpaceError;
165
- const rootScreenSpaceError = traverser.root ? traverser.root._screenSpaceError : 0.0;
166
- return Math.max(rootScreenSpaceError - screenSpaceError, 0);
167
- }
168
- async loadContent() {
169
- if (this.hasEmptyContent) {
170
- return false;
171
- }
172
- if (this.content) {
173
- return true;
174
- }
175
- const expired = this.contentExpired;
176
- if (expired) {
177
- this._expireDate = null;
178
- }
179
- this.contentState = TILE_CONTENT_STATE.LOADING;
180
- const requestToken = await this.tileset._requestScheduler.scheduleRequest(this.id, this._getPriority.bind(this));
181
- if (!requestToken) {
182
- this.contentState = TILE_CONTENT_STATE.UNLOADED;
183
- return false;
184
- }
185
- try {
186
- const contentUrl = this.tileset.getTileUrl(this.contentUrl);
187
- const loader = this.tileset.loader;
188
- const options = {
189
- ...this.tileset.loadOptions,
190
- [loader.id]: {
191
- ...this.tileset.loadOptions[loader.id],
192
- isTileset: this.type === 'json',
193
- ...this._getLoaderSpecificOptions(loader.id)
194
- }
195
- };
196
- this.content = await load(contentUrl, loader, options);
197
- if (this.tileset.options.contentLoader) {
198
- await this.tileset.options.contentLoader(this);
199
- }
200
- if (this._isTileset()) {
201
- this.tileset._initializeTileHeaders(this.content, this);
202
- }
203
- this.contentState = TILE_CONTENT_STATE.READY;
204
- this._onContentLoaded();
205
- return true;
206
- } catch (error) {
207
- this.contentState = TILE_CONTENT_STATE.FAILED;
208
- throw error;
209
- } finally {
210
- requestToken.done();
211
- }
212
- }
213
- unloadContent() {
214
- if (this.content && this.content.destroy) {
215
- this.content.destroy();
216
- }
217
- this.content = null;
218
- if (this.header.content && this.header.content.destroy) {
219
- this.header.content.destroy();
220
- }
221
- this.header.content = null;
222
- this.contentState = TILE_CONTENT_STATE.UNLOADED;
223
- return true;
224
- }
225
- updateVisibility(frameState, viewportIds) {
226
- if (this._frameNumber === frameState.frameNumber) {
227
- return;
228
- }
229
- const parent = this.parent;
230
- const parentVisibilityPlaneMask = parent ? parent._visibilityPlaneMask : CullingVolume.MASK_INDETERMINATE;
231
- if (this.tileset._traverser.options.updateTransforms) {
232
- const parentTransform = parent ? parent.computedTransform : this.tileset.modelMatrix;
233
- this._updateTransform(parentTransform);
234
- }
235
- this._distanceToCamera = this.distanceToTile(frameState);
236
- this._screenSpaceError = this.getScreenSpaceError(frameState, false);
237
- this._visibilityPlaneMask = this.visibility(frameState, parentVisibilityPlaneMask);
238
- this._visible = this._visibilityPlaneMask !== CullingVolume.MASK_OUTSIDE;
239
- this._inRequestVolume = this.insideViewerRequestVolume(frameState);
240
- this._frameNumber = frameState.frameNumber;
241
- this.viewportIds = viewportIds;
242
- }
243
- visibility(frameState, parentVisibilityPlaneMask) {
244
- const {
245
- cullingVolume
246
- } = frameState;
247
- const {
248
- boundingVolume
249
- } = this;
250
- return cullingVolume.computeVisibilityWithPlaneMask(boundingVolume, parentVisibilityPlaneMask);
251
- }
252
- contentVisibility() {
253
- return true;
254
- }
255
- distanceToTile(frameState) {
256
- const boundingVolume = this.boundingVolume;
257
- return Math.sqrt(Math.max(boundingVolume.distanceSquaredTo(frameState.camera.position), 0));
258
- }
259
- cameraSpaceZDepth(_ref) {
260
- let {
261
- camera
262
- } = _ref;
263
- const boundingVolume = this.boundingVolume;
264
- scratchVector.subVectors(boundingVolume.center, camera.position);
265
- return camera.direction.dot(scratchVector);
266
- }
267
- insideViewerRequestVolume(frameState) {
268
- const viewerRequestVolume = this._viewerRequestVolume;
269
- return !viewerRequestVolume || viewerRequestVolume.distanceSquaredTo(frameState.camera.position) <= 0;
270
- }
271
- updateExpiration() {
272
- if (defined(this._expireDate) && this.contentReady && !this.hasEmptyContent) {
273
- const now = Date.now();
274
- if (Date.lessThan(this._expireDate, now)) {
275
- this.contentState = TILE_CONTENT_STATE.EXPIRED;
276
- this._expiredContent = this.content;
277
- }
278
- }
279
- }
280
- get extras() {
281
- return this.header.extras;
282
- }
283
- _initializeLodMetric(header) {
284
- if ('lodMetricType' in header) {
285
- this.lodMetricType = header.lodMetricType;
286
- } else {
287
- this.lodMetricType = this.parent && this.parent.lodMetricType || this.tileset.lodMetricType;
288
- console.warn(`3D Tile: Required prop lodMetricType is undefined. Using parent lodMetricType`);
289
- }
290
- if ('lodMetricValue' in header) {
291
- this.lodMetricValue = header.lodMetricValue;
292
- } else {
293
- this.lodMetricValue = this.parent && this.parent.lodMetricValue || this.tileset.lodMetricValue;
294
- console.warn('3D Tile: Required prop lodMetricValue is undefined. Using parent lodMetricValue');
295
- }
296
- }
297
- _initializeTransforms(tileHeader) {
298
- this.transform = tileHeader.transform ? new Matrix4(tileHeader.transform) : new Matrix4();
299
- const parent = this.parent;
300
- const tileset = this.tileset;
301
- const parentTransform = parent && parent.computedTransform ? parent.computedTransform.clone() : tileset.modelMatrix.clone();
302
- this.computedTransform = new Matrix4(parentTransform).multiplyRight(this.transform);
303
- const parentInitialTransform = parent && parent._initialTransform ? parent._initialTransform.clone() : new Matrix4();
304
- this._initialTransform = new Matrix4(parentInitialTransform).multiplyRight(this.transform);
305
- }
306
- _initializeBoundingVolumes(tileHeader) {
307
- this._contentBoundingVolume = null;
308
- this._viewerRequestVolume = null;
309
- this._updateBoundingVolume(tileHeader);
310
- }
311
- _initializeContent(tileHeader) {
312
- this.content = {
313
- _tileset: this.tileset,
314
- _tile: this
315
- };
316
- this.hasEmptyContent = true;
317
- this.contentState = TILE_CONTENT_STATE.UNLOADED;
318
- this.hasTilesetContent = false;
319
- if (tileHeader.contentUrl) {
320
- this.content = null;
321
- this.hasEmptyContent = false;
322
- }
323
- }
324
- _initializeRenderingState(header) {
325
- this.depth = header.level || (this.parent ? this.parent.depth + 1 : 0);
326
- this._shouldRefine = false;
327
- this._distanceToCamera = 0;
328
- this._centerZDepth = 0;
329
- this._screenSpaceError = 0;
330
- this._visibilityPlaneMask = CullingVolume.MASK_INDETERMINATE;
331
- this._visible = undefined;
332
- this._inRequestVolume = false;
333
- this._stackLength = 0;
334
- this._selectionDepth = 0;
335
- this._frameNumber = 0;
336
- this._touchedFrame = 0;
337
- this._visitedFrame = 0;
338
- this._selectedFrame = 0;
339
- this._requestedFrame = 0;
340
- this._priority = 0.0;
341
- }
342
- _getRefine(refine) {
343
- return refine || this.parent && this.parent.refine || TILE_REFINEMENT.REPLACE;
344
- }
345
- _isTileset() {
346
- return this.contentUrl.indexOf('.json') !== -1;
347
- }
348
- _onContentLoaded() {
349
- switch (this.content && this.content.type) {
350
- case 'vctr':
351
- case 'geom':
352
- this.tileset._traverser.disableSkipLevelOfDetail = true;
353
- break;
354
- default:
355
- }
356
- if (this._isTileset()) {
357
- this.hasTilesetContent = true;
358
- } else {
359
- this.gpuMemoryUsageInBytes = this._getGpuMemoryUsageInBytes();
360
- }
361
- }
362
- _updateBoundingVolume(header) {
363
- this.boundingVolume = createBoundingVolume(header.boundingVolume, this.computedTransform, this.boundingVolume);
364
- const content = header.content;
365
- if (!content) {
366
- return;
367
- }
368
- if (content.boundingVolume) {
369
- this._contentBoundingVolume = createBoundingVolume(content.boundingVolume, this.computedTransform, this._contentBoundingVolume);
370
- }
371
- if (header.viewerRequestVolume) {
372
- this._viewerRequestVolume = createBoundingVolume(header.viewerRequestVolume, this.computedTransform, this._viewerRequestVolume);
373
- }
374
- }
375
- _updateTransform() {
376
- let parentTransform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Matrix4();
377
- const computedTransform = parentTransform.clone().multiplyRight(this.transform);
378
- const didTransformChange = !computedTransform.equals(this.computedTransform);
379
- if (!didTransformChange) {
380
- return;
381
- }
382
- this.computedTransform = computedTransform;
383
- this._updateBoundingVolume(this.header);
384
- }
385
- _getLoaderSpecificOptions(loaderId) {
386
- switch (loaderId) {
387
- case 'i3s':
388
- return {
389
- ...this.tileset.options.i3s,
390
- _tileOptions: {
391
- attributeUrls: this.header.attributeUrls,
392
- textureUrl: this.header.textureUrl,
393
- textureFormat: this.header.textureFormat,
394
- textureLoaderOptions: this.header.textureLoaderOptions,
395
- materialDefinition: this.header.materialDefinition,
396
- isDracoGeometry: this.header.isDracoGeometry,
397
- mbs: this.header.mbs
398
- },
399
- _tilesetOptions: {
400
- store: this.tileset.tileset.store,
401
- attributeStorageInfo: this.tileset.tileset.attributeStorageInfo,
402
- fields: this.tileset.tileset.fields
403
- },
404
- isTileHeader: false
405
- };
406
- case '3d-tiles':
407
- case 'cesium-ion':
408
- default:
409
- return get3dTilesOptions(this.tileset.tileset);
410
- }
411
- }
25
+ tileset;
26
+ header;
27
+ id;
28
+ url;
29
+ parent;
30
+ /* Specifies the type of refine that is used when traversing this tile for rendering. */
31
+ refine;
32
+ type;
33
+ contentUrl;
34
+ /** Different refinement algorithms used by I3S and 3D tiles */
35
+ lodMetricType = 'geometricError';
36
+ /** The error, in meters, introduced if this tile is rendered and its children are not. */
37
+ lodMetricValue = 0;
38
+ /** @todo math.gl is not exporting BoundingVolume base type? */
39
+ boundingVolume = null;
40
+ /**
41
+ * The tile's content. This represents the actual tile's payload,
42
+ * not the content's metadata in the tileset JSON file.
43
+ */
44
+ content = null;
45
+ contentState = TILE_CONTENT_STATE.UNLOADED;
46
+ gpuMemoryUsageInBytes = 0;
47
+ /** The tile's children - an array of Tile3D objects. */
48
+ children = [];
49
+ depth = 0;
50
+ viewportIds = [];
51
+ transform = new Matrix4();
52
+ extensions = null;
53
+ /** TODO Cesium 3d tiles specific */
54
+ implicitTiling = null;
55
+ /** Container to store application specific data */
56
+ userData = {};
57
+ computedTransform;
58
+ hasEmptyContent = false;
59
+ hasTilesetContent = false;
60
+ traverser = new TilesetTraverser({});
61
+ /** Used by TilesetCache */
62
+ _cacheNode = null;
63
+ _frameNumber = null;
64
+ // TODO Cesium 3d tiles specific
65
+ _expireDate = null;
66
+ _expiredContent = null;
67
+ _boundingBox = undefined;
68
+ /** updated every frame for tree traversal and rendering optimizations: */
69
+ _distanceToCamera = 0;
70
+ _screenSpaceError = 0;
71
+ _visibilityPlaneMask;
72
+ _visible = undefined;
73
+ _contentBoundingVolume;
74
+ _viewerRequestVolume;
75
+ _initialTransform = new Matrix4();
76
+ // Used by traverser, cannot be marked private
77
+ _priority = 0;
78
+ _selectedFrame = 0;
79
+ _requestedFrame = 0;
80
+ _selectionDepth = 0;
81
+ _touchedFrame = 0;
82
+ _centerZDepth = 0;
83
+ _shouldRefine = false;
84
+ _stackLength = 0;
85
+ _visitedFrame = 0;
86
+ _inRequestVolume = false;
87
+ _lodJudge = null; // TODO i3s specific, needs to remove
88
+ /**
89
+ * @constructs
90
+ * Create a Tile3D instance
91
+ * @param tileset - Tileset3D instance
92
+ * @param header - tile header - JSON loaded from a dataset
93
+ * @param parentHeader - parent Tile3D instance
94
+ * @param extendedId - optional ID to separate copies of a tile for different viewports.
95
+ * const extendedId = `${tile.id}-${frameState.viewport.id}`;
96
+ */
97
+ // eslint-disable-next-line max-statements
98
+ constructor(tileset, header, parentHeader, extendedId = '') {
99
+ // PUBLIC MEMBERS
100
+ // original tile data
101
+ this.header = header;
102
+ // The tileset containing this tile.
103
+ this.tileset = tileset;
104
+ this.id = extendedId || header.id;
105
+ this.url = header.url;
106
+ // This tile's parent or `undefined` if this tile is the root.
107
+ // @ts-ignore
108
+ this.parent = parentHeader;
109
+ this.refine = this._getRefine(header.refine);
110
+ this.type = header.type;
111
+ this.contentUrl = header.contentUrl;
112
+ this._initializeLodMetric(header);
113
+ this._initializeTransforms(header);
114
+ this._initializeBoundingVolumes(header);
115
+ this._initializeContent(header);
116
+ this._initializeRenderingState(header);
117
+ Object.seal(this);
118
+ }
119
+ destroy() {
120
+ this.header = null;
121
+ }
122
+ isDestroyed() {
123
+ return this.header === null;
124
+ }
125
+ get selected() {
126
+ return this._selectedFrame === this.tileset._frameNumber;
127
+ }
128
+ get isVisible() {
129
+ return this._visible;
130
+ }
131
+ get isVisibleAndInRequestVolume() {
132
+ return this._visible && this._inRequestVolume;
133
+ }
134
+ /** Returns true if tile is not an empty tile and not an external tileset */
135
+ get hasRenderContent() {
136
+ return !this.hasEmptyContent && !this.hasTilesetContent;
137
+ }
138
+ /** Returns true if tile has children */
139
+ get hasChildren() {
140
+ return this.children.length > 0 || (this.header.children && this.header.children.length > 0);
141
+ }
142
+ /**
143
+ * Determines if the tile's content is ready. This is automatically `true` for
144
+ * tiles with empty content.
145
+ */
146
+ get contentReady() {
147
+ return this.contentState === TILE_CONTENT_STATE.READY || this.hasEmptyContent;
148
+ }
149
+ /**
150
+ * Determines if the tile has available content to render. `true` if the tile's
151
+ * content is ready or if it has expired content this renders while new content loads; otherwise,
152
+ */
153
+ get contentAvailable() {
154
+ return Boolean((this.contentReady && this.hasRenderContent) || (this._expiredContent && !this.contentFailed));
155
+ }
156
+ /** Returns true if tile has renderable content but it's unloaded */
157
+ get hasUnloadedContent() {
158
+ return this.hasRenderContent && this.contentUnloaded;
159
+ }
160
+ /**
161
+ * Determines if the tile's content has not be requested. `true` if tile's
162
+ * content has not be requested; otherwise, `false`.
163
+ */
164
+ get contentUnloaded() {
165
+ return this.contentState === TILE_CONTENT_STATE.UNLOADED;
166
+ }
167
+ /**
168
+ * Determines if the tile's content is expired. `true` if tile's
169
+ * content is expired; otherwise, `false`.
170
+ */
171
+ get contentExpired() {
172
+ return this.contentState === TILE_CONTENT_STATE.EXPIRED;
173
+ }
174
+ // Determines if the tile's content failed to load. `true` if the tile's
175
+ // content failed to load; otherwise, `false`.
176
+ get contentFailed() {
177
+ return this.contentState === TILE_CONTENT_STATE.FAILED;
178
+ }
179
+ /**
180
+ * Distance from the tile's bounding volume center to the camera
181
+ */
182
+ get distanceToCamera() {
183
+ return this._distanceToCamera;
184
+ }
185
+ /**
186
+ * Screen space error for LOD selection
187
+ */
188
+ get screenSpaceError() {
189
+ return this._screenSpaceError;
190
+ }
191
+ /**
192
+ * Get bounding box in cartographic coordinates
193
+ * @returns [min, max] each in [longitude, latitude, altitude]
194
+ */
195
+ get boundingBox() {
196
+ if (!this._boundingBox) {
197
+ this._boundingBox = getCartographicBounds(this.header.boundingVolume, this.boundingVolume);
198
+ }
199
+ return this._boundingBox;
200
+ }
201
+ /** Get the tile's screen space error. */
202
+ getScreenSpaceError(frameState, useParentLodMetric) {
203
+ switch (this.tileset.type) {
204
+ case TILESET_TYPE.I3S:
205
+ return getProjectedRadius(this, frameState);
206
+ case TILESET_TYPE.TILES3D:
207
+ return getTiles3DScreenSpaceError(this, frameState, useParentLodMetric);
208
+ default:
209
+ // eslint-disable-next-line
210
+ throw new Error('Unsupported tileset type');
211
+ }
212
+ }
213
+ /**
214
+ * Make tile unselected than means it won't be shown
215
+ * but it can be still loaded in memory
216
+ */
217
+ unselect() {
218
+ this._selectedFrame = 0;
219
+ }
220
+ /**
221
+ * Memory usage of tile on GPU
222
+ */
223
+ _getGpuMemoryUsageInBytes() {
224
+ return this.content.gpuMemoryUsageInBytes || this.content.byteLength || 0;
225
+ }
226
+ /*
227
+ * If skipLevelOfDetail is off try to load child tiles as soon as possible so that their parent can refine sooner.
228
+ * Tiles are prioritized by screen space error.
229
+ */
230
+ // eslint-disable-next-line complexity
231
+ _getPriority() {
232
+ const traverser = this.tileset._traverser;
233
+ const { skipLevelOfDetail } = traverser.options;
234
+ /*
235
+ * Tiles that are outside of the camera's frustum could be skipped if we are in 'ADD' mode
236
+ * or if we are using 'Skip Traversal' in 'REPLACE' mode.
237
+ * Otherewise, all 'touched' child tiles have to be loaded and displayed,
238
+ * this may include tiles that are outide of the camera frustum (so that we can hide the parent tile).
239
+ */
240
+ const maySkipTile = this.refine === TILE_REFINEMENT.ADD || skipLevelOfDetail;
241
+ // Check if any reason to abort
242
+ if (maySkipTile && !this.isVisible && this._visible !== undefined) {
243
+ return -1;
244
+ }
245
+ // Condition used in `cancelOutOfViewRequests` function in CesiumJS/Cesium3DTileset.js
246
+ if (this.tileset._frameNumber - this._touchedFrame >= 1) {
247
+ return -1;
248
+ }
249
+ if (this.contentState === TILE_CONTENT_STATE.UNLOADED) {
250
+ return -1;
251
+ }
252
+ // Based on the priority function `getPriorityReverseScreenSpaceError` in CesiumJS. Scheduling priority is based on the parent's screen space error when possible.
253
+ const parent = this.parent;
254
+ const useParentScreenSpaceError = parent && (!maySkipTile || this._screenSpaceError === 0.0 || parent.hasTilesetContent);
255
+ const screenSpaceError = useParentScreenSpaceError
256
+ ? parent._screenSpaceError
257
+ : this._screenSpaceError;
258
+ const rootScreenSpaceError = traverser.root ? traverser.root._screenSpaceError : 0.0;
259
+ // Map higher SSE to lower values (e.g. root tile is highest priority)
260
+ return Math.max(rootScreenSpaceError - screenSpaceError, 0);
261
+ }
262
+ /**
263
+ * Requests the tile's content.
264
+ * The request may not be made if the Request Scheduler can't prioritize it.
265
+ */
266
+ // eslint-disable-next-line max-statements, complexity
267
+ async loadContent() {
268
+ if (this.hasEmptyContent) {
269
+ return false;
270
+ }
271
+ if (this.content) {
272
+ return true;
273
+ }
274
+ const expired = this.contentExpired;
275
+ if (expired) {
276
+ this._expireDate = null;
277
+ }
278
+ this.contentState = TILE_CONTENT_STATE.LOADING;
279
+ const requestToken = await this.tileset._requestScheduler.scheduleRequest(this.id, this._getPriority.bind(this));
280
+ if (!requestToken) {
281
+ // cancelled
282
+ this.contentState = TILE_CONTENT_STATE.UNLOADED;
283
+ return false;
284
+ }
285
+ try {
286
+ const contentUrl = this.tileset.getTileUrl(this.contentUrl);
287
+ // The content can be a binary tile ot a JSON tileset
288
+ const loader = this.tileset.loader;
289
+ const options = {
290
+ ...this.tileset.loadOptions,
291
+ [loader.id]: {
292
+ // @ts-expect-error
293
+ ...this.tileset.loadOptions[loader.id],
294
+ isTileset: this.type === 'json',
295
+ ...this._getLoaderSpecificOptions(loader.id)
296
+ }
297
+ };
298
+ this.content = await load(contentUrl, loader, options);
299
+ if (this.tileset.options.contentLoader) {
300
+ await this.tileset.options.contentLoader(this);
301
+ }
302
+ if (this._isTileset()) {
303
+ // Add tile headers for the nested tilset's subtree
304
+ // Async update of the tree should be fine since there would never be edits to the same node
305
+ // TODO - we need to capture the child tileset's URL
306
+ this.tileset._initializeTileHeaders(this.content, this);
307
+ }
308
+ this.contentState = TILE_CONTENT_STATE.READY;
309
+ this._onContentLoaded();
310
+ return true;
311
+ }
312
+ catch (error) {
313
+ // Tile is unloaded before the content finishes loading
314
+ this.contentState = TILE_CONTENT_STATE.FAILED;
315
+ throw error;
316
+ }
317
+ finally {
318
+ requestToken.done();
319
+ }
320
+ }
321
+ // Unloads the tile's content.
322
+ unloadContent() {
323
+ if (this.content && this.content.destroy) {
324
+ this.content.destroy();
325
+ }
326
+ this.content = null;
327
+ if (this.header.content && this.header.content.destroy) {
328
+ this.header.content.destroy();
329
+ }
330
+ this.header.content = null;
331
+ this.contentState = TILE_CONTENT_STATE.UNLOADED;
332
+ return true;
333
+ }
334
+ /**
335
+ * Update the tile's visibility
336
+ * @param {Object} frameState - frame state for tile culling
337
+ * @param {string[]} viewportIds - a list of viewport ids that show this tile
338
+ * @return {void}
339
+ */
340
+ updateVisibility(frameState, viewportIds) {
341
+ if (this._frameNumber === frameState.frameNumber) {
342
+ // Return early if visibility has already been checked during the traversal.
343
+ // The visibility may have already been checked if the cullWithChildrenBounds optimization is used.
344
+ return;
345
+ }
346
+ const parent = this.parent;
347
+ const parentVisibilityPlaneMask = parent
348
+ ? parent._visibilityPlaneMask
349
+ : CullingVolume.MASK_INDETERMINATE;
350
+ if (this.tileset._traverser.options.updateTransforms) {
351
+ const parentTransform = parent ? parent.computedTransform : this.tileset.modelMatrix;
352
+ this._updateTransform(parentTransform);
353
+ }
354
+ this._distanceToCamera = this.distanceToTile(frameState);
355
+ this._screenSpaceError = this.getScreenSpaceError(frameState, false);
356
+ this._visibilityPlaneMask = this.visibility(frameState, parentVisibilityPlaneMask); // Use parent's plane mask to speed up visibility test
357
+ this._visible = this._visibilityPlaneMask !== CullingVolume.MASK_OUTSIDE;
358
+ this._inRequestVolume = this.insideViewerRequestVolume(frameState);
359
+ this._frameNumber = frameState.frameNumber;
360
+ this.viewportIds = viewportIds;
361
+ }
362
+ // Determines whether the tile's bounding volume intersects the culling volume.
363
+ // @param {FrameState} frameState The frame state.
364
+ // @param {Number} parentVisibilityPlaneMask The parent's plane mask to speed up the visibility check.
365
+ // @returns {Number} A plane mask as described above in {@link CullingVolume#computeVisibilityWithPlaneMask}.
366
+ visibility(frameState, parentVisibilityPlaneMask) {
367
+ const { cullingVolume } = frameState;
368
+ const { boundingVolume } = this;
369
+ // TODO Cesium specific - restore clippingPlanes
370
+ // const {clippingPlanes, clippingPlanesOriginMatrix} = tileset;
371
+ // if (clippingPlanes && clippingPlanes.enabled) {
372
+ // const intersection = clippingPlanes.computeIntersectionWithBoundingVolume(
373
+ // boundingVolume,
374
+ // clippingPlanesOriginMatrix
375
+ // );
376
+ // this._isClipped = intersection !== Intersect.INSIDE;
377
+ // if (intersection === Intersect.OUTSIDE) {
378
+ // return CullingVolume.MASK_OUTSIDE;
379
+ // }
380
+ // }
381
+ // return cullingVolume.computeVisibilityWithPlaneMask(boundingVolume, parentVisibilityPlaneMask);
382
+ return cullingVolume.computeVisibilityWithPlaneMask(boundingVolume, parentVisibilityPlaneMask);
383
+ }
384
+ // Assuming the tile's bounding volume intersects the culling volume, determines
385
+ // whether the tile's content's bounding volume intersects the culling volume.
386
+ // @param {FrameState} frameState The frame state.
387
+ // @returns {Intersect} The result of the intersection: the tile's content is completely outside, completely inside, or intersecting the culling volume.
388
+ contentVisibility() {
389
+ return true;
390
+ // TODO restore
391
+ /*
392
+ // Assumes the tile's bounding volume intersects the culling volume already, so
393
+ // just return Intersect.INSIDE if there is no content bounding volume.
394
+ if (!defined(this.contentBoundingVolume)) {
395
+ return Intersect.INSIDE;
396
+ }
397
+
398
+ if (this._visibilityPlaneMask === CullingVolume.MASK_INSIDE) {
399
+ // The tile's bounding volume is completely inside the culling volume so
400
+ // the content bounding volume must also be inside.
401
+ return Intersect.INSIDE;
402
+ }
403
+
404
+ // PERFORMANCE_IDEA: is it possible to burn less CPU on this test since we know the
405
+ // tile's (not the content's) bounding volume intersects the culling volume?
406
+ const cullingVolume = frameState.cullingVolume;
407
+ const boundingVolume = tile.contentBoundingVolume;
408
+
409
+ const tileset = this.tileset;
410
+ const clippingPlanes = tileset.clippingPlanes;
411
+ if (defined(clippingPlanes) && clippingPlanes.enabled) {
412
+ const intersection = clippingPlanes.computeIntersectionWithBoundingVolume(
413
+ boundingVolume,
414
+ tileset.clippingPlanesOriginMatrix
415
+ );
416
+ this._isClipped = intersection !== Intersect.INSIDE;
417
+ if (intersection === Intersect.OUTSIDE) {
418
+ return Intersect.OUTSIDE;
419
+ }
420
+ }
421
+
422
+ return cullingVolume.computeVisibility(boundingVolume);
423
+ */
424
+ }
425
+ /**
426
+ * Computes the (potentially approximate) distance from the closest point of the tile's bounding volume to the camera.
427
+ * @param frameState The frame state.
428
+ * @returns {Number} The distance, in meters, or zero if the camera is inside the bounding volume.
429
+ */
430
+ distanceToTile(frameState) {
431
+ const boundingVolume = this.boundingVolume;
432
+ return Math.sqrt(Math.max(boundingVolume.distanceSquaredTo(frameState.camera.position), 0));
433
+ }
434
+ /**
435
+ * Computes the tile's camera-space z-depth.
436
+ * @param frameState The frame state.
437
+ * @returns The distance, in meters.
438
+ */
439
+ cameraSpaceZDepth({ camera }) {
440
+ const boundingVolume = this.boundingVolume; // Gets the underlying OrientedBoundingBox or BoundingSphere
441
+ scratchVector.subVectors(boundingVolume.center, camera.position);
442
+ return camera.direction.dot(scratchVector);
443
+ }
444
+ /**
445
+ * Checks if the camera is inside the viewer request volume.
446
+ * @param {FrameState} frameState The frame state.
447
+ * @returns {Boolean} Whether the camera is inside the volume.
448
+ */
449
+ insideViewerRequestVolume(frameState) {
450
+ const viewerRequestVolume = this._viewerRequestVolume;
451
+ return (!viewerRequestVolume || viewerRequestVolume.distanceSquaredTo(frameState.camera.position) <= 0);
452
+ }
453
+ // TODO Cesium specific
454
+ // Update whether the tile has expired.
455
+ updateExpiration() {
456
+ if (defined(this._expireDate) && this.contentReady && !this.hasEmptyContent) {
457
+ const now = Date.now();
458
+ // @ts-ignore Date.lessThan - replace with ms compare?
459
+ if (Date.lessThan(this._expireDate, now)) {
460
+ this.contentState = TILE_CONTENT_STATE.EXPIRED;
461
+ this._expiredContent = this.content;
462
+ }
463
+ }
464
+ }
465
+ get extras() {
466
+ return this.header.extras;
467
+ }
468
+ // INTERNAL METHODS
469
+ _initializeLodMetric(header) {
470
+ if ('lodMetricType' in header) {
471
+ this.lodMetricType = header.lodMetricType;
472
+ }
473
+ else {
474
+ this.lodMetricType = (this.parent && this.parent.lodMetricType) || this.tileset.lodMetricType;
475
+ // eslint-disable-next-line
476
+ console.warn(`3D Tile: Required prop lodMetricType is undefined. Using parent lodMetricType`);
477
+ }
478
+ // This is used to compute screen space error, i.e., the error measured in pixels.
479
+ if ('lodMetricValue' in header) {
480
+ this.lodMetricValue = header.lodMetricValue;
481
+ }
482
+ else {
483
+ this.lodMetricValue =
484
+ (this.parent && this.parent.lodMetricValue) || this.tileset.lodMetricValue;
485
+ // eslint-disable-next-line
486
+ console.warn('3D Tile: Required prop lodMetricValue is undefined. Using parent lodMetricValue');
487
+ }
488
+ }
489
+ _initializeTransforms(tileHeader) {
490
+ // The local transform of this tile.
491
+ this.transform = tileHeader.transform ? new Matrix4(tileHeader.transform) : new Matrix4();
492
+ const parent = this.parent;
493
+ const tileset = this.tileset;
494
+ const parentTransform = parent && parent.computedTransform
495
+ ? parent.computedTransform.clone()
496
+ : tileset.modelMatrix.clone();
497
+ this.computedTransform = new Matrix4(parentTransform).multiplyRight(this.transform);
498
+ const parentInitialTransform = parent && parent._initialTransform ? parent._initialTransform.clone() : new Matrix4();
499
+ this._initialTransform = new Matrix4(parentInitialTransform).multiplyRight(this.transform);
500
+ }
501
+ _initializeBoundingVolumes(tileHeader) {
502
+ this._contentBoundingVolume = null;
503
+ this._viewerRequestVolume = null;
504
+ this._updateBoundingVolume(tileHeader);
505
+ }
506
+ _initializeContent(tileHeader) {
507
+ // Empty tile by default
508
+ this.content = { _tileset: this.tileset, _tile: this };
509
+ this.hasEmptyContent = true;
510
+ this.contentState = TILE_CONTENT_STATE.UNLOADED;
511
+ // When `true`, the tile's content points to an external tileset.
512
+ // This is `false` until the tile's content is loaded.
513
+ this.hasTilesetContent = false;
514
+ if (tileHeader.contentUrl) {
515
+ this.content = null;
516
+ this.hasEmptyContent = false;
517
+ }
518
+ }
519
+ // TODO - remove anything not related to basic visibility detection
520
+ _initializeRenderingState(header) {
521
+ this.depth = header.level || (this.parent ? this.parent.depth + 1 : 0);
522
+ this._shouldRefine = false;
523
+ // Members this are updated every frame for tree traversal and rendering optimizations:
524
+ this._distanceToCamera = 0;
525
+ this._centerZDepth = 0;
526
+ this._screenSpaceError = 0;
527
+ this._visibilityPlaneMask = CullingVolume.MASK_INDETERMINATE;
528
+ this._visible = undefined;
529
+ this._inRequestVolume = false;
530
+ this._stackLength = 0;
531
+ this._selectionDepth = 0;
532
+ this._frameNumber = 0;
533
+ this._touchedFrame = 0;
534
+ this._visitedFrame = 0;
535
+ this._selectedFrame = 0;
536
+ this._requestedFrame = 0;
537
+ this._priority = 0.0;
538
+ }
539
+ _getRefine(refine) {
540
+ // Inherit from parent tile if omitted.
541
+ return refine || (this.parent && this.parent.refine) || TILE_REFINEMENT.REPLACE;
542
+ }
543
+ _isTileset() {
544
+ return this.contentUrl.indexOf('.json') !== -1;
545
+ }
546
+ _onContentLoaded() {
547
+ // Vector and Geometry tile rendering do not support the skip LOD optimization.
548
+ switch (this.content && this.content.type) {
549
+ case 'vctr':
550
+ case 'geom':
551
+ // @ts-ignore
552
+ this.tileset._traverser.disableSkipLevelOfDetail = true;
553
+ break;
554
+ default:
555
+ }
556
+ // The content may be tileset json
557
+ if (this._isTileset()) {
558
+ this.hasTilesetContent = true;
559
+ }
560
+ else {
561
+ this.gpuMemoryUsageInBytes = this._getGpuMemoryUsageInBytes();
562
+ }
563
+ }
564
+ _updateBoundingVolume(header) {
565
+ // Update the bounding volumes
566
+ this.boundingVolume = createBoundingVolume(header.boundingVolume, this.computedTransform, this.boundingVolume);
567
+ const content = header.content;
568
+ if (!content) {
569
+ return;
570
+ }
571
+ // TODO Cesium specific
572
+ // Non-leaf tiles may have a content bounding-volume, which is a tight-fit bounding volume
573
+ // around only the features in the tile. This box is useful for culling for rendering,
574
+ // but not for culling for traversing the tree since it does not guarantee spatial coherence, i.e.,
575
+ // since it only bounds features in the tile, not the entire tile, children may be
576
+ // outside of this box.
577
+ if (content.boundingVolume) {
578
+ this._contentBoundingVolume = createBoundingVolume(content.boundingVolume, this.computedTransform, this._contentBoundingVolume);
579
+ }
580
+ if (header.viewerRequestVolume) {
581
+ this._viewerRequestVolume = createBoundingVolume(header.viewerRequestVolume, this.computedTransform, this._viewerRequestVolume);
582
+ }
583
+ }
584
+ // Update the tile's transform. The transform is applied to the tile's bounding volumes.
585
+ _updateTransform(parentTransform = new Matrix4()) {
586
+ const computedTransform = parentTransform.clone().multiplyRight(this.transform);
587
+ const didTransformChange = !computedTransform.equals(this.computedTransform);
588
+ if (!didTransformChange) {
589
+ return;
590
+ }
591
+ this.computedTransform = computedTransform;
592
+ this._updateBoundingVolume(this.header);
593
+ }
594
+ // Get options which are applicable only for the particular loader
595
+ _getLoaderSpecificOptions(loaderId) {
596
+ switch (loaderId) {
597
+ case 'i3s':
598
+ return {
599
+ ...this.tileset.options.i3s,
600
+ _tileOptions: {
601
+ attributeUrls: this.header.attributeUrls,
602
+ textureUrl: this.header.textureUrl,
603
+ textureFormat: this.header.textureFormat,
604
+ textureLoaderOptions: this.header.textureLoaderOptions,
605
+ materialDefinition: this.header.materialDefinition,
606
+ isDracoGeometry: this.header.isDracoGeometry,
607
+ mbs: this.header.mbs
608
+ },
609
+ _tilesetOptions: {
610
+ store: this.tileset.tileset.store,
611
+ attributeStorageInfo: this.tileset.tileset.attributeStorageInfo,
612
+ fields: this.tileset.tileset.fields
613
+ },
614
+ isTileHeader: false
615
+ };
616
+ case '3d-tiles':
617
+ case 'cesium-ion':
618
+ default:
619
+ return get3dTilesOptions(this.tileset.tileset);
620
+ }
621
+ }
412
622
  }
413
- //# sourceMappingURL=tile-3d.js.map