@loaders.gl/tiles 3.4.0-alpha.2 → 3.4.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 (88) hide show
  1. package/dist/dist.min.js +340 -307
  2. package/dist/es5/constants.js +0 -2
  3. package/dist/es5/constants.js.map +1 -1
  4. package/dist/es5/index.js.map +1 -1
  5. package/dist/es5/tileset/format-3d-tiles/tileset-3d-traverser.js +0 -2
  6. package/dist/es5/tileset/format-3d-tiles/tileset-3d-traverser.js.map +1 -1
  7. package/dist/es5/tileset/format-i3s/i3s-pending-tiles-register.js +3 -8
  8. package/dist/es5/tileset/format-i3s/i3s-pending-tiles-register.js.map +1 -1
  9. package/dist/es5/tileset/format-i3s/i3s-tile-manager.js +4 -14
  10. package/dist/es5/tileset/format-i3s/i3s-tile-manager.js.map +1 -1
  11. package/dist/es5/tileset/format-i3s/i3s-tileset-traverser.js +19 -25
  12. package/dist/es5/tileset/format-i3s/i3s-tileset-traverser.js.map +1 -1
  13. package/dist/es5/tileset/helpers/3d-tiles-options.js.map +1 -1
  14. package/dist/es5/tileset/helpers/bounding-volume.js +87 -6
  15. package/dist/es5/tileset/helpers/bounding-volume.js.map +1 -1
  16. package/dist/es5/tileset/helpers/frame-state.js +4 -14
  17. package/dist/es5/tileset/helpers/frame-state.js.map +1 -1
  18. package/dist/es5/tileset/helpers/i3s-lod.js +0 -5
  19. package/dist/es5/tileset/helpers/i3s-lod.js.map +1 -1
  20. package/dist/es5/tileset/helpers/tiles-3d-lod.js +0 -7
  21. package/dist/es5/tileset/helpers/tiles-3d-lod.js.map +1 -1
  22. package/dist/es5/tileset/helpers/transform-utils.js +0 -7
  23. package/dist/es5/tileset/helpers/transform-utils.js.map +1 -1
  24. package/dist/es5/tileset/helpers/zoom.js +0 -4
  25. package/dist/es5/tileset/helpers/zoom.js.map +1 -1
  26. package/dist/es5/tileset/tile-3d.js +98 -166
  27. package/dist/es5/tileset/tile-3d.js.map +1 -1
  28. package/dist/es5/tileset/tileset-3d.js +86 -142
  29. package/dist/es5/tileset/tileset-3d.js.map +1 -1
  30. package/dist/es5/tileset/tileset-cache.js +0 -3
  31. package/dist/es5/tileset/tileset-cache.js.map +1 -1
  32. package/dist/es5/tileset/tileset-traverser.js +12 -51
  33. package/dist/es5/tileset/tileset-traverser.js.map +1 -1
  34. package/dist/es5/utils/doubly-linked-list-node.js.map +1 -1
  35. package/dist/es5/utils/doubly-linked-list.js +3 -11
  36. package/dist/es5/utils/doubly-linked-list.js.map +1 -1
  37. package/dist/es5/utils/managed-array.js +10 -30
  38. package/dist/es5/utils/managed-array.js.map +1 -1
  39. package/dist/esm/bundle.js +0 -1
  40. package/dist/esm/bundle.js.map +1 -1
  41. package/dist/esm/constants.js +0 -5
  42. package/dist/esm/constants.js.map +1 -1
  43. package/dist/esm/index.js +0 -2
  44. package/dist/esm/index.js.map +1 -1
  45. package/dist/esm/tileset/format-3d-tiles/tileset-3d-traverser.js +0 -4
  46. package/dist/esm/tileset/format-3d-tiles/tileset-3d-traverser.js.map +1 -1
  47. package/dist/esm/tileset/format-i3s/i3s-pending-tiles-register.js +0 -2
  48. package/dist/esm/tileset/format-i3s/i3s-pending-tiles-register.js.map +1 -1
  49. package/dist/esm/tileset/format-i3s/i3s-tile-manager.js +0 -6
  50. package/dist/esm/tileset/format-i3s/i3s-tile-manager.js.map +1 -1
  51. package/dist/esm/tileset/format-i3s/i3s-tileset-traverser.js +0 -3
  52. package/dist/esm/tileset/format-i3s/i3s-tileset-traverser.js.map +1 -1
  53. package/dist/esm/tileset/helpers/3d-tiles-options.js.map +1 -1
  54. package/dist/esm/tileset/helpers/bounding-volume.js +81 -8
  55. package/dist/esm/tileset/helpers/bounding-volume.js.map +1 -1
  56. package/dist/esm/tileset/helpers/frame-state.js +3 -13
  57. package/dist/esm/tileset/helpers/frame-state.js.map +1 -1
  58. package/dist/esm/tileset/helpers/i3s-lod.js +0 -6
  59. package/dist/esm/tileset/helpers/i3s-lod.js.map +1 -1
  60. package/dist/esm/tileset/helpers/tiles-3d-lod.js +0 -8
  61. package/dist/esm/tileset/helpers/tiles-3d-lod.js.map +1 -1
  62. package/dist/esm/tileset/helpers/transform-utils.js +0 -8
  63. package/dist/esm/tileset/helpers/transform-utils.js.map +1 -1
  64. package/dist/esm/tileset/helpers/zoom.js +0 -5
  65. package/dist/esm/tileset/helpers/zoom.js.map +1 -1
  66. package/dist/esm/tileset/tile-3d.js +8 -52
  67. package/dist/esm/tileset/tile-3d.js.map +1 -1
  68. package/dist/esm/tileset/tileset-3d.js +0 -38
  69. package/dist/esm/tileset/tileset-3d.js.map +1 -1
  70. package/dist/esm/tileset/tileset-cache.js +0 -3
  71. package/dist/esm/tileset/tileset-cache.js.map +1 -1
  72. package/dist/esm/tileset/tileset-traverser.js +0 -27
  73. package/dist/esm/tileset/tileset-traverser.js.map +1 -1
  74. package/dist/esm/utils/doubly-linked-list-node.js +0 -1
  75. package/dist/esm/utils/doubly-linked-list-node.js.map +1 -1
  76. package/dist/esm/utils/doubly-linked-list.js +0 -7
  77. package/dist/esm/utils/doubly-linked-list.js.map +1 -1
  78. package/dist/esm/utils/managed-array.js +0 -12
  79. package/dist/esm/utils/managed-array.js.map +1 -1
  80. package/dist/tileset/helpers/bounding-volume.d.ts +10 -0
  81. package/dist/tileset/helpers/bounding-volume.d.ts.map +1 -1
  82. package/dist/tileset/helpers/bounding-volume.js +117 -1
  83. package/dist/tileset/tile-3d.d.ts +7 -0
  84. package/dist/tileset/tile-3d.d.ts.map +1 -1
  85. package/dist/tileset/tile-3d.js +10 -0
  86. package/package.json +4 -4
  87. package/src/tileset/helpers/bounding-volume.ts +136 -0
  88. package/src/tileset/tile-3d.ts +18 -1
package/dist/dist.min.js CHANGED
@@ -2883,8 +2883,54 @@
2883
2883
  }
2884
2884
  });
2885
2885
 
2886
+ // ../../node_modules/@babel/runtime/helpers/esm/typeof.js
2887
+ function _typeof(obj) {
2888
+ "@babel/helpers - typeof";
2889
+ return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) {
2890
+ return typeof obj2;
2891
+ } : function(obj2) {
2892
+ return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
2893
+ }, _typeof(obj);
2894
+ }
2895
+ var init_typeof = __esm({
2896
+ "../../node_modules/@babel/runtime/helpers/esm/typeof.js"() {
2897
+ }
2898
+ });
2899
+
2900
+ // ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
2901
+ function _toPrimitive(input, hint) {
2902
+ if (_typeof(input) !== "object" || input === null)
2903
+ return input;
2904
+ var prim = input[Symbol.toPrimitive];
2905
+ if (prim !== void 0) {
2906
+ var res = prim.call(input, hint || "default");
2907
+ if (_typeof(res) !== "object")
2908
+ return res;
2909
+ throw new TypeError("@@toPrimitive must return a primitive value.");
2910
+ }
2911
+ return (hint === "string" ? String : Number)(input);
2912
+ }
2913
+ var init_toPrimitive = __esm({
2914
+ "../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js"() {
2915
+ init_typeof();
2916
+ }
2917
+ });
2918
+
2919
+ // ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
2920
+ function _toPropertyKey(arg) {
2921
+ var key = _toPrimitive(arg, "string");
2922
+ return _typeof(key) === "symbol" ? key : String(key);
2923
+ }
2924
+ var init_toPropertyKey = __esm({
2925
+ "../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"() {
2926
+ init_typeof();
2927
+ init_toPrimitive();
2928
+ }
2929
+ });
2930
+
2886
2931
  // ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
2887
2932
  function _defineProperty(obj, key, value) {
2933
+ key = _toPropertyKey(key);
2888
2934
  if (key in obj) {
2889
2935
  Object.defineProperty(obj, key, {
2890
2936
  value,
@@ -2899,6 +2945,7 @@
2899
2945
  }
2900
2946
  var init_defineProperty = __esm({
2901
2947
  "../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"() {
2948
+ init_toPropertyKey();
2902
2949
  }
2903
2950
  });
2904
2951
 
@@ -3347,7 +3394,7 @@
3347
3394
  }
3348
3395
  });
3349
3396
 
3350
- // node_modules/@probe.gl/stats/dist/utils/hi-res-timestamp.js
3397
+ // ../../node_modules/@probe.gl/stats/dist/utils/hi-res-timestamp.js
3351
3398
  function getHiResTimestamp() {
3352
3399
  let timestamp;
3353
3400
  if (typeof window !== "undefined" && window.performance) {
@@ -3361,14 +3408,14 @@
3361
3408
  return timestamp;
3362
3409
  }
3363
3410
  var init_hi_res_timestamp = __esm({
3364
- "node_modules/@probe.gl/stats/dist/utils/hi-res-timestamp.js"() {
3411
+ "../../node_modules/@probe.gl/stats/dist/utils/hi-res-timestamp.js"() {
3365
3412
  }
3366
3413
  });
3367
3414
 
3368
- // node_modules/@probe.gl/stats/dist/lib/stat.js
3415
+ // ../../node_modules/@probe.gl/stats/dist/lib/stat.js
3369
3416
  var Stat;
3370
3417
  var init_stat = __esm({
3371
- "node_modules/@probe.gl/stats/dist/lib/stat.js"() {
3418
+ "../../node_modules/@probe.gl/stats/dist/lib/stat.js"() {
3372
3419
  init_defineProperty();
3373
3420
  init_hi_res_timestamp();
3374
3421
  Stat = class {
@@ -3484,10 +3531,10 @@
3484
3531
  }
3485
3532
  });
3486
3533
 
3487
- // node_modules/@probe.gl/stats/dist/lib/stats.js
3534
+ // ../../node_modules/@probe.gl/stats/dist/lib/stats.js
3488
3535
  var Stats;
3489
3536
  var init_stats = __esm({
3490
- "node_modules/@probe.gl/stats/dist/lib/stats.js"() {
3537
+ "../../node_modules/@probe.gl/stats/dist/lib/stats.js"() {
3491
3538
  init_defineProperty();
3492
3539
  init_stat();
3493
3540
  Stats = class {
@@ -3537,29 +3584,28 @@
3537
3584
  stats.forEach((stat) => this._getOrCreate(stat));
3538
3585
  }
3539
3586
  _getOrCreate(stat) {
3540
- if (!stat || !stat.name) {
3541
- return null;
3542
- }
3543
3587
  const {
3544
3588
  name,
3545
3589
  type
3546
3590
  } = stat;
3547
- if (!this.stats[name]) {
3591
+ let result = this.stats[name];
3592
+ if (!result) {
3548
3593
  if (stat instanceof Stat) {
3549
- this.stats[name] = stat;
3594
+ result = stat;
3550
3595
  } else {
3551
- this.stats[name] = new Stat(name, type);
3596
+ result = new Stat(name, type);
3552
3597
  }
3598
+ this.stats[name] = result;
3553
3599
  }
3554
- return this.stats[name] || null;
3600
+ return result;
3555
3601
  }
3556
3602
  };
3557
3603
  }
3558
3604
  });
3559
3605
 
3560
- // node_modules/@probe.gl/stats/dist/index.js
3606
+ // ../../node_modules/@probe.gl/stats/dist/index.js
3561
3607
  var init_dist = __esm({
3562
- "node_modules/@probe.gl/stats/dist/index.js"() {
3608
+ "../../node_modules/@probe.gl/stats/dist/index.js"() {
3563
3609
  init_stats();
3564
3610
  init_stat();
3565
3611
  init_hi_res_timestamp();
@@ -3655,8 +3701,8 @@
3655
3701
  };
3656
3702
  this.name = jobName;
3657
3703
  this.workerThread = workerThread;
3658
- this.result = new Promise((resolve, reject) => {
3659
- this._resolve = resolve;
3704
+ this.result = new Promise((resolve2, reject) => {
3705
+ this._resolve = resolve2;
3660
3706
  this._reject = reject;
3661
3707
  });
3662
3708
  }
@@ -4205,230 +4251,11 @@
4205
4251
  }
4206
4252
  });
4207
4253
 
4208
- // ../loader-utils/node_modules/@probe.gl/stats/dist/utils/hi-res-timestamp.js
4209
- function getHiResTimestamp2() {
4210
- let timestamp;
4211
- if (typeof window !== "undefined" && window.performance) {
4212
- timestamp = window.performance.now();
4213
- } else if (typeof process !== "undefined" && process.hrtime) {
4214
- const timeParts = process.hrtime();
4215
- timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
4216
- } else {
4217
- timestamp = Date.now();
4218
- }
4219
- return timestamp;
4220
- }
4221
- var init_hi_res_timestamp2 = __esm({
4222
- "../loader-utils/node_modules/@probe.gl/stats/dist/utils/hi-res-timestamp.js"() {
4223
- }
4224
- });
4225
-
4226
- // ../loader-utils/node_modules/@probe.gl/stats/dist/lib/stat.js
4227
- var Stat2;
4228
- var init_stat2 = __esm({
4229
- "../loader-utils/node_modules/@probe.gl/stats/dist/lib/stat.js"() {
4230
- init_defineProperty();
4231
- init_hi_res_timestamp2();
4232
- Stat2 = class {
4233
- constructor(name, type) {
4234
- _defineProperty(this, "name", void 0);
4235
- _defineProperty(this, "type", void 0);
4236
- _defineProperty(this, "sampleSize", 1);
4237
- _defineProperty(this, "time", 0);
4238
- _defineProperty(this, "count", 0);
4239
- _defineProperty(this, "samples", 0);
4240
- _defineProperty(this, "lastTiming", 0);
4241
- _defineProperty(this, "lastSampleTime", 0);
4242
- _defineProperty(this, "lastSampleCount", 0);
4243
- _defineProperty(this, "_count", 0);
4244
- _defineProperty(this, "_time", 0);
4245
- _defineProperty(this, "_samples", 0);
4246
- _defineProperty(this, "_startTime", 0);
4247
- _defineProperty(this, "_timerPending", false);
4248
- this.name = name;
4249
- this.type = type;
4250
- this.reset();
4251
- }
4252
- reset() {
4253
- this.time = 0;
4254
- this.count = 0;
4255
- this.samples = 0;
4256
- this.lastTiming = 0;
4257
- this.lastSampleTime = 0;
4258
- this.lastSampleCount = 0;
4259
- this._count = 0;
4260
- this._time = 0;
4261
- this._samples = 0;
4262
- this._startTime = 0;
4263
- this._timerPending = false;
4264
- return this;
4265
- }
4266
- setSampleSize(samples) {
4267
- this.sampleSize = samples;
4268
- return this;
4269
- }
4270
- incrementCount() {
4271
- this.addCount(1);
4272
- return this;
4273
- }
4274
- decrementCount() {
4275
- this.subtractCount(1);
4276
- return this;
4277
- }
4278
- addCount(value) {
4279
- this._count += value;
4280
- this._samples++;
4281
- this._checkSampling();
4282
- return this;
4283
- }
4284
- subtractCount(value) {
4285
- this._count -= value;
4286
- this._samples++;
4287
- this._checkSampling();
4288
- return this;
4289
- }
4290
- addTime(time) {
4291
- this._time += time;
4292
- this.lastTiming = time;
4293
- this._samples++;
4294
- this._checkSampling();
4295
- return this;
4296
- }
4297
- timeStart() {
4298
- this._startTime = getHiResTimestamp2();
4299
- this._timerPending = true;
4300
- return this;
4301
- }
4302
- timeEnd() {
4303
- if (!this._timerPending) {
4304
- return this;
4305
- }
4306
- this.addTime(getHiResTimestamp2() - this._startTime);
4307
- this._timerPending = false;
4308
- this._checkSampling();
4309
- return this;
4310
- }
4311
- getSampleAverageCount() {
4312
- return this.sampleSize > 0 ? this.lastSampleCount / this.sampleSize : 0;
4313
- }
4314
- getSampleAverageTime() {
4315
- return this.sampleSize > 0 ? this.lastSampleTime / this.sampleSize : 0;
4316
- }
4317
- getSampleHz() {
4318
- return this.lastSampleTime > 0 ? this.sampleSize / (this.lastSampleTime / 1e3) : 0;
4319
- }
4320
- getAverageCount() {
4321
- return this.samples > 0 ? this.count / this.samples : 0;
4322
- }
4323
- getAverageTime() {
4324
- return this.samples > 0 ? this.time / this.samples : 0;
4325
- }
4326
- getHz() {
4327
- return this.time > 0 ? this.samples / (this.time / 1e3) : 0;
4328
- }
4329
- _checkSampling() {
4330
- if (this._samples === this.sampleSize) {
4331
- this.lastSampleTime = this._time;
4332
- this.lastSampleCount = this._count;
4333
- this.count += this._count;
4334
- this.time += this._time;
4335
- this.samples += this._samples;
4336
- this._time = 0;
4337
- this._count = 0;
4338
- this._samples = 0;
4339
- }
4340
- }
4341
- };
4342
- }
4343
- });
4344
-
4345
- // ../loader-utils/node_modules/@probe.gl/stats/dist/lib/stats.js
4346
- var Stats2;
4347
- var init_stats2 = __esm({
4348
- "../loader-utils/node_modules/@probe.gl/stats/dist/lib/stats.js"() {
4349
- init_defineProperty();
4350
- init_stat2();
4351
- Stats2 = class {
4352
- constructor(options) {
4353
- _defineProperty(this, "id", void 0);
4354
- _defineProperty(this, "stats", {});
4355
- this.id = options.id;
4356
- this.stats = {};
4357
- this._initializeStats(options.stats);
4358
- Object.seal(this);
4359
- }
4360
- get(name) {
4361
- let type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "count";
4362
- return this._getOrCreate({
4363
- name,
4364
- type
4365
- });
4366
- }
4367
- get size() {
4368
- return Object.keys(this.stats).length;
4369
- }
4370
- reset() {
4371
- for (const stat of Object.values(this.stats)) {
4372
- stat.reset();
4373
- }
4374
- return this;
4375
- }
4376
- forEach(fn) {
4377
- for (const stat of Object.values(this.stats)) {
4378
- fn(stat);
4379
- }
4380
- }
4381
- getTable() {
4382
- const table = {};
4383
- this.forEach((stat) => {
4384
- table[stat.name] = {
4385
- time: stat.time || 0,
4386
- count: stat.count || 0,
4387
- average: stat.getAverageTime() || 0,
4388
- hz: stat.getHz() || 0
4389
- };
4390
- });
4391
- return table;
4392
- }
4393
- _initializeStats() {
4394
- let stats = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
4395
- stats.forEach((stat) => this._getOrCreate(stat));
4396
- }
4397
- _getOrCreate(stat) {
4398
- if (!stat || !stat.name) {
4399
- return null;
4400
- }
4401
- const {
4402
- name,
4403
- type
4404
- } = stat;
4405
- if (!this.stats[name]) {
4406
- if (stat instanceof Stat2) {
4407
- this.stats[name] = stat;
4408
- } else {
4409
- this.stats[name] = new Stat2(name, type);
4410
- }
4411
- }
4412
- return this.stats[name] || null;
4413
- }
4414
- };
4415
- }
4416
- });
4417
-
4418
- // ../loader-utils/node_modules/@probe.gl/stats/dist/index.js
4419
- var init_dist2 = __esm({
4420
- "../loader-utils/node_modules/@probe.gl/stats/dist/index.js"() {
4421
- init_stats2();
4422
- init_stat2();
4423
- init_hi_res_timestamp2();
4424
- }
4425
- });
4426
-
4427
4254
  // ../loader-utils/src/lib/request-utils/request-scheduler.ts
4428
4255
  var STAT_QUEUED_REQUESTS, STAT_ACTIVE_REQUESTS, STAT_CANCELLED_REQUESTS, STAT_QUEUED_REQUESTS_EVER, STAT_ACTIVE_REQUESTS_EVER, DEFAULT_PROPS2, RequestScheduler;
4429
4256
  var init_request_scheduler = __esm({
4430
4257
  "../loader-utils/src/lib/request-utils/request-scheduler.ts"() {
4431
- init_dist2();
4258
+ init_dist();
4432
4259
  STAT_QUEUED_REQUESTS = "Queued Requests";
4433
4260
  STAT_ACTIVE_REQUESTS = "Active Requests";
4434
4261
  STAT_CANCELLED_REQUESTS = "Cancelled Requests";
@@ -4446,7 +4273,7 @@
4446
4273
  this.requestMap = new Map();
4447
4274
  this.deferredUpdate = null;
4448
4275
  this.props = { ...DEFAULT_PROPS2, ...props };
4449
- this.stats = new Stats2({ id: this.props.id });
4276
+ this.stats = new Stats({ id: this.props.id });
4450
4277
  this.stats.get(STAT_QUEUED_REQUESTS);
4451
4278
  this.stats.get(STAT_ACTIVE_REQUESTS);
4452
4279
  this.stats.get(STAT_CANCELLED_REQUESTS);
@@ -4462,8 +4289,8 @@
4462
4289
  return this.requestMap.get(handle);
4463
4290
  }
4464
4291
  const request = { handle, priority: 0, getPriority };
4465
- const promise = new Promise((resolve) => {
4466
- request.resolve = resolve;
4292
+ const promise = new Promise((resolve2) => {
4293
+ request.resolve = resolve2;
4467
4294
  return request;
4468
4295
  });
4469
4296
  this.requestQueue.push(request);
@@ -4472,7 +4299,7 @@
4472
4299
  return promise;
4473
4300
  }
4474
4301
  _issueRequest(request) {
4475
- const { handle, resolve } = request;
4302
+ const { handle, resolve: resolve2 } = request;
4476
4303
  let isDone = false;
4477
4304
  const done = () => {
4478
4305
  if (!isDone) {
@@ -4483,7 +4310,7 @@
4483
4310
  }
4484
4311
  };
4485
4312
  this.activeRequestCount++;
4486
- return resolve ? resolve({ done }) : Promise.resolve({ done });
4313
+ return resolve2 ? resolve2({ done }) : Promise.resolve({ done });
4487
4314
  }
4488
4315
  _issueNewRequests() {
4489
4316
  if (!this.deferredUpdate) {
@@ -4591,19 +4418,33 @@
4591
4418
  }
4592
4419
  });
4593
4420
 
4421
+ // ../loader-utils/src/lib/path-utils/get-cwd.ts
4422
+ function getCWD() {
4423
+ if (typeof process !== "undefined" && typeof process.cwd !== "undefined") {
4424
+ return process.cwd();
4425
+ }
4426
+ const pathname = window.location?.pathname;
4427
+ return pathname?.slice(0, pathname.lastIndexOf("/") + 1) || "";
4428
+ }
4429
+ var init_get_cwd = __esm({
4430
+ "../loader-utils/src/lib/path-utils/get-cwd.ts"() {
4431
+ }
4432
+ });
4433
+
4594
4434
  // ../loader-utils/src/lib/path-utils/path.ts
4595
4435
  var path_exports = {};
4596
4436
  __export(path_exports, {
4597
4437
  dirname: () => dirname,
4598
4438
  filename: () => filename,
4599
- join: () => join
4439
+ join: () => join,
4440
+ resolve: () => resolve
4600
4441
  });
4601
4442
  function filename(url) {
4602
- const slashIndex = url && url.lastIndexOf("/");
4443
+ const slashIndex = url ? url.lastIndexOf("/") : -1;
4603
4444
  return slashIndex >= 0 ? url.substr(slashIndex + 1) : "";
4604
4445
  }
4605
4446
  function dirname(url) {
4606
- const slashIndex = url && url.lastIndexOf("/");
4447
+ const slashIndex = url ? url.lastIndexOf("/") : -1;
4607
4448
  return slashIndex >= 0 ? url.substr(0, slashIndex) : "";
4608
4449
  }
4609
4450
  function join(...parts) {
@@ -4619,8 +4460,112 @@
4619
4460
  });
4620
4461
  return parts.join(separator);
4621
4462
  }
4463
+ function resolve(...components) {
4464
+ const paths = [];
4465
+ for (let _i = 0; _i < components.length; _i++) {
4466
+ paths[_i] = components[_i];
4467
+ }
4468
+ let resolvedPath = "";
4469
+ let resolvedAbsolute = false;
4470
+ let cwd;
4471
+ for (let i = paths.length - 1; i >= -1 && !resolvedAbsolute; i--) {
4472
+ let path;
4473
+ if (i >= 0) {
4474
+ path = paths[i];
4475
+ } else {
4476
+ if (cwd === void 0) {
4477
+ cwd = getCWD();
4478
+ }
4479
+ path = cwd;
4480
+ }
4481
+ if (path.length === 0) {
4482
+ continue;
4483
+ }
4484
+ resolvedPath = `${path}/${resolvedPath}`;
4485
+ resolvedAbsolute = path.charCodeAt(0) === SLASH;
4486
+ }
4487
+ resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
4488
+ if (resolvedAbsolute) {
4489
+ return `/${resolvedPath}`;
4490
+ } else if (resolvedPath.length > 0) {
4491
+ return resolvedPath;
4492
+ }
4493
+ return ".";
4494
+ }
4495
+ function normalizeStringPosix(path, allowAboveRoot) {
4496
+ let res = "";
4497
+ let lastSlash = -1;
4498
+ let dots = 0;
4499
+ let code;
4500
+ let isAboveRoot = false;
4501
+ for (let i = 0; i <= path.length; ++i) {
4502
+ if (i < path.length) {
4503
+ code = path.charCodeAt(i);
4504
+ } else if (code === SLASH) {
4505
+ break;
4506
+ } else {
4507
+ code = SLASH;
4508
+ }
4509
+ if (code === SLASH) {
4510
+ if (lastSlash === i - 1 || dots === 1) {
4511
+ } else if (lastSlash !== i - 1 && dots === 2) {
4512
+ if (res.length < 2 || !isAboveRoot || res.charCodeAt(res.length - 1) !== DOT || res.charCodeAt(res.length - 2) !== DOT) {
4513
+ if (res.length > 2) {
4514
+ const start = res.length - 1;
4515
+ let j = start;
4516
+ for (; j >= 0; --j) {
4517
+ if (res.charCodeAt(j) === SLASH) {
4518
+ break;
4519
+ }
4520
+ }
4521
+ if (j !== start) {
4522
+ res = j === -1 ? "" : res.slice(0, j);
4523
+ lastSlash = i;
4524
+ dots = 0;
4525
+ isAboveRoot = false;
4526
+ continue;
4527
+ }
4528
+ } else if (res.length === 2 || res.length === 1) {
4529
+ res = "";
4530
+ lastSlash = i;
4531
+ dots = 0;
4532
+ isAboveRoot = false;
4533
+ continue;
4534
+ }
4535
+ }
4536
+ if (allowAboveRoot) {
4537
+ if (res.length > 0) {
4538
+ res += "/..";
4539
+ } else {
4540
+ res = "..";
4541
+ }
4542
+ isAboveRoot = true;
4543
+ }
4544
+ } else {
4545
+ const slice = path.slice(lastSlash + 1, i);
4546
+ if (res.length > 0) {
4547
+ res += `/${slice}`;
4548
+ } else {
4549
+ res = slice;
4550
+ }
4551
+ isAboveRoot = false;
4552
+ }
4553
+ lastSlash = i;
4554
+ dots = 0;
4555
+ } else if (code === DOT && dots !== -1) {
4556
+ ++dots;
4557
+ } else {
4558
+ dots = -1;
4559
+ }
4560
+ }
4561
+ return res;
4562
+ }
4563
+ var SLASH, DOT;
4622
4564
  var init_path = __esm({
4623
4565
  "../loader-utils/src/lib/path-utils/path.ts"() {
4566
+ init_get_cwd();
4567
+ SLASH = 47;
4568
+ DOT = 46;
4624
4569
  }
4625
4570
  });
4626
4571
 
@@ -4914,8 +4859,8 @@
4914
4859
  return this;
4915
4860
  }
4916
4861
  expand(point) {
4917
- const scratchPoint = scratchVector6.from(point);
4918
- const radius = scratchPoint.subtract(this.center).magnitude();
4862
+ const scratchPoint2 = scratchVector6.from(point);
4863
+ const radius = scratchPoint2.subtract(this.center).magnitude();
4919
4864
  if (radius > this.radius) {
4920
4865
  this.radius = radius;
4921
4866
  }
@@ -4932,8 +4877,8 @@
4932
4877
  return d * d;
4933
4878
  }
4934
4879
  distanceTo(point) {
4935
- const scratchPoint = scratchVector6.from(point);
4936
- const delta = scratchPoint.subtract(this.center);
4880
+ const scratchPoint2 = scratchVector6.from(point);
4881
+ const delta = scratchPoint2.subtract(this.center);
4937
4882
  return Math.max(0, delta.len() - this.radius);
4938
4883
  }
4939
4884
  intersectPlane(plane) {
@@ -5695,9 +5640,9 @@
5695
5640
  }
5696
5641
  if (resource instanceof Blob) {
5697
5642
  const blobSlice = resource.slice(0, 5);
5698
- return await new Promise((resolve) => {
5643
+ return await new Promise((resolve2) => {
5699
5644
  const reader = new FileReader();
5700
- reader.onload = (event) => resolve(event?.target?.result);
5645
+ reader.onload = (event) => resolve2(event?.target?.result);
5701
5646
  reader.readAsDataURL(blobSlice);
5702
5647
  });
5703
5648
  }
@@ -5742,7 +5687,7 @@
5742
5687
  }
5743
5688
  });
5744
5689
 
5745
- // ../core/node_modules/@probe.gl/env/dist/lib/is-electron.js
5690
+ // ../../node_modules/@probe.gl/env/dist/lib/is-electron.js
5746
5691
  function isElectron(mockUserAgent) {
5747
5692
  if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
5748
5693
  return true;
@@ -5758,54 +5703,54 @@
5758
5703
  return false;
5759
5704
  }
5760
5705
  var init_is_electron = __esm({
5761
- "../core/node_modules/@probe.gl/env/dist/lib/is-electron.js"() {
5706
+ "../../node_modules/@probe.gl/env/dist/lib/is-electron.js"() {
5762
5707
  }
5763
5708
  });
5764
5709
 
5765
- // ../core/node_modules/@probe.gl/env/dist/lib/is-browser.js
5710
+ // ../../node_modules/@probe.gl/env/dist/lib/is-browser.js
5766
5711
  function isBrowser3() {
5767
5712
  const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
5768
5713
  return !isNode || isElectron();
5769
5714
  }
5770
5715
  var init_is_browser = __esm({
5771
- "../core/node_modules/@probe.gl/env/dist/lib/is-browser.js"() {
5716
+ "../../node_modules/@probe.gl/env/dist/lib/is-browser.js"() {
5772
5717
  init_is_electron();
5773
5718
  }
5774
5719
  });
5775
5720
 
5776
- // ../core/node_modules/@probe.gl/env/dist/lib/globals.js
5777
- var self2, window2, document2, process2, console2, navigator2;
5721
+ // ../../node_modules/@probe.gl/env/dist/lib/globals.js
5722
+ var self_3, window_3, document_3, process_, console_, navigator_;
5778
5723
  var init_globals3 = __esm({
5779
- "../core/node_modules/@probe.gl/env/dist/lib/globals.js"() {
5780
- self2 = globalThis.self || globalThis.window || globalThis.global;
5781
- window2 = globalThis.window || globalThis.self || globalThis.global;
5782
- document2 = globalThis.document || {};
5783
- process2 = globalThis.process || {};
5784
- console2 = globalThis.console;
5785
- navigator2 = globalThis.navigator || {};
5724
+ "../../node_modules/@probe.gl/env/dist/lib/globals.js"() {
5725
+ self_3 = globalThis.self || globalThis.window || globalThis.global;
5726
+ window_3 = globalThis.window || globalThis.self || globalThis.global;
5727
+ document_3 = globalThis.document || {};
5728
+ process_ = globalThis.process || {};
5729
+ console_ = globalThis.console;
5730
+ navigator_ = globalThis.navigator || {};
5786
5731
  }
5787
5732
  });
5788
5733
 
5789
- // ../core/node_modules/@probe.gl/env/dist/utils/globals.js
5734
+ // ../../node_modules/@probe.gl/env/dist/utils/globals.js
5790
5735
  var VERSION2, isBrowser4;
5791
5736
  var init_globals4 = __esm({
5792
- "../core/node_modules/@probe.gl/env/dist/utils/globals.js"() {
5737
+ "../../node_modules/@probe.gl/env/dist/utils/globals.js"() {
5793
5738
  init_is_browser();
5794
5739
  VERSION2 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
5795
5740
  isBrowser4 = isBrowser3();
5796
5741
  }
5797
5742
  });
5798
5743
 
5799
- // ../core/node_modules/@probe.gl/env/dist/index.js
5800
- var init_dist3 = __esm({
5801
- "../core/node_modules/@probe.gl/env/dist/index.js"() {
5744
+ // ../../node_modules/@probe.gl/env/dist/index.js
5745
+ var init_dist2 = __esm({
5746
+ "../../node_modules/@probe.gl/env/dist/index.js"() {
5802
5747
  init_globals4();
5803
5748
  init_globals3();
5804
5749
  init_is_browser();
5805
5750
  }
5806
5751
  });
5807
5752
 
5808
- // ../core/node_modules/@probe.gl/log/dist/utils/local-storage.js
5753
+ // ../../node_modules/@probe.gl/log/dist/utils/local-storage.js
5809
5754
  function getStorage(type) {
5810
5755
  try {
5811
5756
  const storage = window[type];
@@ -5819,7 +5764,7 @@
5819
5764
  }
5820
5765
  var LocalStorage;
5821
5766
  var init_local_storage = __esm({
5822
- "../core/node_modules/@probe.gl/log/dist/utils/local-storage.js"() {
5767
+ "../../node_modules/@probe.gl/log/dist/utils/local-storage.js"() {
5823
5768
  init_defineProperty();
5824
5769
  LocalStorage = class {
5825
5770
  constructor(id, defaultConfig) {
@@ -5855,7 +5800,7 @@
5855
5800
  }
5856
5801
  });
5857
5802
 
5858
- // ../core/node_modules/@probe.gl/log/dist/utils/formatters.js
5803
+ // ../../node_modules/@probe.gl/log/dist/utils/formatters.js
5859
5804
  function formatTime(ms) {
5860
5805
  let formatted;
5861
5806
  if (ms < 10) {
@@ -5886,11 +5831,11 @@
5886
5831
  return ["".concat(message, " %c+"), style];
5887
5832
  }
5888
5833
  var init_formatters = __esm({
5889
- "../core/node_modules/@probe.gl/log/dist/utils/formatters.js"() {
5834
+ "../../node_modules/@probe.gl/log/dist/utils/formatters.js"() {
5890
5835
  }
5891
5836
  });
5892
5837
 
5893
- // ../core/node_modules/@probe.gl/log/dist/utils/color.js
5838
+ // ../../node_modules/@probe.gl/log/dist/utils/color.js
5894
5839
  function getColor(color) {
5895
5840
  if (typeof color !== "string") {
5896
5841
  return color;
@@ -5913,8 +5858,8 @@
5913
5858
  }
5914
5859
  var COLOR, BACKGROUND_INCREMENT;
5915
5860
  var init_color = __esm({
5916
- "../core/node_modules/@probe.gl/log/dist/utils/color.js"() {
5917
- init_dist3();
5861
+ "../../node_modules/@probe.gl/log/dist/utils/color.js"() {
5862
+ init_dist2();
5918
5863
  (function(COLOR2) {
5919
5864
  COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
5920
5865
  COLOR2[COLOR2["RED"] = 31] = "RED";
@@ -5937,7 +5882,7 @@
5937
5882
  }
5938
5883
  });
5939
5884
 
5940
- // ../core/node_modules/@probe.gl/log/dist/utils/autobind.js
5885
+ // ../../node_modules/@probe.gl/log/dist/utils/autobind.js
5941
5886
  function autobind(obj) {
5942
5887
  let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
5943
5888
  const proto = Object.getPrototypeOf(obj);
@@ -5953,43 +5898,43 @@
5953
5898
  }
5954
5899
  }
5955
5900
  var init_autobind = __esm({
5956
- "../core/node_modules/@probe.gl/log/dist/utils/autobind.js"() {
5901
+ "../../node_modules/@probe.gl/log/dist/utils/autobind.js"() {
5957
5902
  }
5958
5903
  });
5959
5904
 
5960
- // ../core/node_modules/@probe.gl/log/dist/utils/assert.js
5905
+ // ../../node_modules/@probe.gl/log/dist/utils/assert.js
5961
5906
  function assert4(condition, message) {
5962
5907
  if (!condition) {
5963
5908
  throw new Error(message || "Assertion failed");
5964
5909
  }
5965
5910
  }
5966
5911
  var init_assert4 = __esm({
5967
- "../core/node_modules/@probe.gl/log/dist/utils/assert.js"() {
5912
+ "../../node_modules/@probe.gl/log/dist/utils/assert.js"() {
5968
5913
  }
5969
5914
  });
5970
5915
 
5971
- // ../core/node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js
5972
- function getHiResTimestamp3() {
5916
+ // ../../node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js
5917
+ function getHiResTimestamp2() {
5973
5918
  let timestamp;
5974
- if (isBrowser3() && window2.performance) {
5919
+ if (isBrowser3() && window_3.performance) {
5975
5920
  var _window$performance, _window$performance$n;
5976
- timestamp = window2 === null || window2 === void 0 ? void 0 : (_window$performance = window2.performance) === null || _window$performance === void 0 ? void 0 : (_window$performance$n = _window$performance.now) === null || _window$performance$n === void 0 ? void 0 : _window$performance$n.call(_window$performance);
5977
- } else if ("hrtime" in process2) {
5921
+ timestamp = window_3 === null || window_3 === void 0 ? void 0 : (_window$performance = window_3.performance) === null || _window$performance === void 0 ? void 0 : (_window$performance$n = _window$performance.now) === null || _window$performance$n === void 0 ? void 0 : _window$performance$n.call(_window$performance);
5922
+ } else if ("hrtime" in process_) {
5978
5923
  var _process$hrtime;
5979
- const timeParts = process2 === null || process2 === void 0 ? void 0 : (_process$hrtime = process2.hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(process2);
5924
+ const timeParts = process_ === null || process_ === void 0 ? void 0 : (_process$hrtime = process_.hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(process_);
5980
5925
  timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
5981
5926
  } else {
5982
5927
  timestamp = Date.now();
5983
5928
  }
5984
5929
  return timestamp;
5985
5930
  }
5986
- var init_hi_res_timestamp3 = __esm({
5987
- "../core/node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js"() {
5988
- init_dist3();
5931
+ var init_hi_res_timestamp2 = __esm({
5932
+ "../../node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js"() {
5933
+ init_dist2();
5989
5934
  }
5990
5935
  });
5991
5936
 
5992
- // ../core/node_modules/@probe.gl/log/dist/log.js
5937
+ // ../../node_modules/@probe.gl/log/dist/log.js
5993
5938
  function noop() {
5994
5939
  }
5995
5940
  function normalizeLogLevel(logLevel) {
@@ -6096,15 +6041,15 @@
6096
6041
  }
6097
6042
  var originalConsole, DEFAULT_LOG_CONFIGURATION, cache, ONCE, Log;
6098
6043
  var init_log = __esm({
6099
- "../core/node_modules/@probe.gl/log/dist/log.js"() {
6044
+ "../../node_modules/@probe.gl/log/dist/log.js"() {
6100
6045
  init_defineProperty();
6101
- init_dist3();
6046
+ init_dist2();
6102
6047
  init_local_storage();
6103
6048
  init_formatters();
6104
6049
  init_color();
6105
6050
  init_autobind();
6106
6051
  init_assert4();
6107
- init_hi_res_timestamp3();
6052
+ init_hi_res_timestamp2();
6108
6053
  originalConsole = {
6109
6054
  debug: isBrowser3() ? console.debug || console.log : console.log,
6110
6055
  log: console.log,
@@ -6129,8 +6074,8 @@
6129
6074
  };
6130
6075
  _defineProperty(this, "id", void 0);
6131
6076
  _defineProperty(this, "VERSION", VERSION2);
6132
- _defineProperty(this, "_startTs", getHiResTimestamp3());
6133
- _defineProperty(this, "_deltaTs", getHiResTimestamp3());
6077
+ _defineProperty(this, "_startTs", getHiResTimestamp2());
6078
+ _defineProperty(this, "_deltaTs", getHiResTimestamp2());
6134
6079
  _defineProperty(this, "_storage", void 0);
6135
6080
  _defineProperty(this, "userData", {});
6136
6081
  _defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
@@ -6154,10 +6099,10 @@
6154
6099
  return this._storage.config.level;
6155
6100
  }
6156
6101
  getTotal() {
6157
- return Number((getHiResTimestamp3() - this._startTs).toPrecision(10));
6102
+ return Number((getHiResTimestamp2() - this._startTs).toPrecision(10));
6158
6103
  }
6159
6104
  getDelta() {
6160
- return Number((getHiResTimestamp3() - this._deltaTs).toPrecision(10));
6105
+ return Number((getHiResTimestamp2() - this._deltaTs).toPrecision(10));
6161
6106
  }
6162
6107
  set priority(newPriority) {
6163
6108
  this.level = newPriority;
@@ -6316,11 +6261,11 @@
6316
6261
  assert4(method);
6317
6262
  opts.total = this.getTotal();
6318
6263
  opts.delta = this.getDelta();
6319
- this._deltaTs = getHiResTimestamp3();
6264
+ this._deltaTs = getHiResTimestamp2();
6320
6265
  const tag = opts.tag || opts.message;
6321
6266
  if (opts.once && tag) {
6322
6267
  if (!cache[tag]) {
6323
- cache[tag] = getHiResTimestamp3();
6268
+ cache[tag] = getHiResTimestamp2();
6324
6269
  } else {
6325
6270
  return noop;
6326
6271
  }
@@ -6335,10 +6280,10 @@
6335
6280
  }
6336
6281
  });
6337
6282
 
6338
- // ../core/node_modules/@probe.gl/log/dist/index.js
6283
+ // ../../node_modules/@probe.gl/log/dist/index.js
6339
6284
  var dist_default;
6340
- var init_dist4 = __esm({
6341
- "../core/node_modules/@probe.gl/log/dist/index.js"() {
6285
+ var init_dist3 = __esm({
6286
+ "../../node_modules/@probe.gl/log/dist/index.js"() {
6342
6287
  init_log();
6343
6288
  init_log();
6344
6289
  dist_default = new Log({
@@ -6351,7 +6296,7 @@
6351
6296
  var probeLog, NullLog, ConsoleLog;
6352
6297
  var init_loggers = __esm({
6353
6298
  "../core/src/lib/loader-utils/loggers.ts"() {
6354
- init_dist4();
6299
+ init_dist3();
6355
6300
  probeLog = new Log({ id: "loaders.gl" });
6356
6301
  NullLog = class {
6357
6302
  log() {
@@ -6594,7 +6539,7 @@
6594
6539
  var log;
6595
6540
  var init_log2 = __esm({
6596
6541
  "../core/src/lib/utils/log.ts"() {
6597
- init_dist4();
6542
+ init_dist3();
6598
6543
  log = new Log({ id: "loaders.gl" });
6599
6544
  }
6600
6545
  });
@@ -7186,6 +7131,22 @@
7186
7131
  }
7187
7132
  throw new Error("3D Tile: boundingVolume must contain a sphere, region, or box");
7188
7133
  }
7134
+ function getCartographicBounds(boundingVolumeHeader, boundingVolume) {
7135
+ if (boundingVolumeHeader.box) {
7136
+ return orientedBoundingBoxToCartographicBounds(boundingVolume);
7137
+ }
7138
+ if (boundingVolumeHeader.region) {
7139
+ const [west, south, east, north, minHeight, maxHeight] = boundingVolumeHeader.region;
7140
+ return [
7141
+ [degrees(west), degrees(south), minHeight],
7142
+ [degrees(east), degrees(north), maxHeight]
7143
+ ];
7144
+ }
7145
+ if (boundingVolumeHeader.sphere) {
7146
+ return boundingSphereToCartographicBounds(boundingVolume);
7147
+ }
7148
+ throw new Error("Unkown boundingVolume type");
7149
+ }
7189
7150
  function createBox(box, transform, result) {
7190
7151
  const center = new Vector3(box[0], box[1], box[2]);
7191
7152
  transform.transform(center, center);
@@ -7241,13 +7202,79 @@
7241
7202
  }
7242
7203
  return new BoundingSphere(center, radius);
7243
7204
  }
7244
- var scratchScale, scratchNorthWest, scratchSouthEast;
7205
+ function orientedBoundingBoxToCartographicBounds(boundingVolume) {
7206
+ const result = emptyCartographicBounds();
7207
+ const { halfAxes } = boundingVolume;
7208
+ const xAxis = new Vector3(halfAxes.getColumn(0));
7209
+ const yAxis = new Vector3(halfAxes.getColumn(1));
7210
+ const zAxis = new Vector3(halfAxes.getColumn(2));
7211
+ for (let x = 0; x < 2; x++) {
7212
+ for (let y = 0; y < 2; y++) {
7213
+ for (let z = 0; z < 2; z++) {
7214
+ scratchPoint.copy(boundingVolume.center);
7215
+ scratchPoint.add(xAxis);
7216
+ scratchPoint.add(yAxis);
7217
+ scratchPoint.add(zAxis);
7218
+ addToCartographicBounds(result, scratchPoint);
7219
+ zAxis.negate();
7220
+ }
7221
+ yAxis.negate();
7222
+ }
7223
+ xAxis.negate();
7224
+ }
7225
+ return result;
7226
+ }
7227
+ function boundingSphereToCartographicBounds(boundingVolume) {
7228
+ const result = emptyCartographicBounds();
7229
+ const { center, radius } = boundingVolume;
7230
+ const point = Ellipsoid.WGS84.scaleToGeodeticSurface(center, scratchPoint);
7231
+ let zAxis;
7232
+ if (point) {
7233
+ zAxis = Ellipsoid.WGS84.geodeticSurfaceNormal(point);
7234
+ } else {
7235
+ zAxis = new Vector3(0, 0, 1);
7236
+ }
7237
+ let xAxis = new Vector3(zAxis[2], -zAxis[1], 0);
7238
+ if (xAxis.len() > 0) {
7239
+ xAxis.normalize();
7240
+ } else {
7241
+ xAxis = new Vector3(0, 1, 0);
7242
+ }
7243
+ const yAxis = xAxis.clone().cross(zAxis);
7244
+ for (const axis of [xAxis, yAxis, zAxis]) {
7245
+ scratchScale.copy(axis).scale(radius);
7246
+ for (let dir = 0; dir < 2; dir++) {
7247
+ scratchPoint.copy(center);
7248
+ scratchPoint.add(scratchScale);
7249
+ addToCartographicBounds(result, scratchPoint);
7250
+ scratchScale.negate();
7251
+ }
7252
+ }
7253
+ return result;
7254
+ }
7255
+ function emptyCartographicBounds() {
7256
+ return [
7257
+ [Infinity, Infinity, Infinity],
7258
+ [-Infinity, -Infinity, -Infinity]
7259
+ ];
7260
+ }
7261
+ function addToCartographicBounds(target, cartesian) {
7262
+ Ellipsoid.WGS84.cartesianToCartographic(cartesian, scratchPoint);
7263
+ target[0][0] = Math.min(target[0][0], scratchPoint[0]);
7264
+ target[0][1] = Math.min(target[0][1], scratchPoint[1]);
7265
+ target[0][2] = Math.min(target[0][2], scratchPoint[2]);
7266
+ target[1][0] = Math.max(target[1][0], scratchPoint[0]);
7267
+ target[1][1] = Math.max(target[1][1], scratchPoint[1]);
7268
+ target[1][2] = Math.max(target[1][2], scratchPoint[2]);
7269
+ }
7270
+ var scratchPoint, scratchScale, scratchNorthWest, scratchSouthEast;
7245
7271
  var init_bounding_volume = __esm({
7246
7272
  "src/tileset/helpers/bounding-volume.ts"() {
7247
7273
  init_esm();
7248
7274
  init_esm3();
7249
7275
  init_esm2();
7250
7276
  init_src2();
7277
+ scratchPoint = new Vector3();
7251
7278
  scratchScale = new Vector3();
7252
7279
  scratchNorthWest = new Vector3();
7253
7280
  scratchSouthEast = new Vector3();
@@ -7798,6 +7825,12 @@
7798
7825
  get screenSpaceError() {
7799
7826
  return this._screenSpaceError;
7800
7827
  }
7828
+ get boundingBox() {
7829
+ if (!this._boundingBox) {
7830
+ this._boundingBox = getCartographicBounds(this.header.boundingVolume, this.boundingVolume);
7831
+ }
7832
+ return this._boundingBox;
7833
+ }
7801
7834
  getScreenSpaceError(frameState, useParentLodMetric) {
7802
7835
  switch (this.tileset.type) {
7803
7836
  case TILESET_TYPE.I3S:
@@ -8451,12 +8484,12 @@
8451
8484
  this.lastUpdatedVieports = viewports;
8452
8485
  }
8453
8486
  if (!this.updatePromise) {
8454
- this.updatePromise = new Promise((resolve) => {
8487
+ this.updatePromise = new Promise((resolve2) => {
8455
8488
  setTimeout(() => {
8456
8489
  if (this.lastUpdatedVieports) {
8457
8490
  this.doUpdate(this.lastUpdatedVieports);
8458
8491
  }
8459
- resolve(this._frameNumber);
8492
+ resolve2(this._frameNumber);
8460
8493
  this.updatePromise = null;
8461
8494
  }, this.options.debounceTime);
8462
8495
  });