@loaders.gl/tiles 3.4.0-alpha.1 → 3.4.0-alpha.2

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 (2) hide show
  1. package/dist/dist.min.js +452 -241
  2. package/package.json +5 -5
package/dist/dist.min.js CHANGED
@@ -3347,7 +3347,7 @@
3347
3347
  }
3348
3348
  });
3349
3349
 
3350
- // ../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js
3350
+ // node_modules/@probe.gl/stats/dist/utils/hi-res-timestamp.js
3351
3351
  function getHiResTimestamp() {
3352
3352
  let timestamp;
3353
3353
  if (typeof window !== "undefined" && window.performance) {
@@ -3361,14 +3361,14 @@
3361
3361
  return timestamp;
3362
3362
  }
3363
3363
  var init_hi_res_timestamp = __esm({
3364
- "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js"() {
3364
+ "node_modules/@probe.gl/stats/dist/utils/hi-res-timestamp.js"() {
3365
3365
  }
3366
3366
  });
3367
3367
 
3368
- // ../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js
3368
+ // node_modules/@probe.gl/stats/dist/lib/stat.js
3369
3369
  var Stat;
3370
3370
  var init_stat = __esm({
3371
- "../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js"() {
3371
+ "node_modules/@probe.gl/stats/dist/lib/stat.js"() {
3372
3372
  init_defineProperty();
3373
3373
  init_hi_res_timestamp();
3374
3374
  Stat = class {
@@ -3376,12 +3376,12 @@
3376
3376
  _defineProperty(this, "name", void 0);
3377
3377
  _defineProperty(this, "type", void 0);
3378
3378
  _defineProperty(this, "sampleSize", 1);
3379
- _defineProperty(this, "time", void 0);
3380
- _defineProperty(this, "count", void 0);
3381
- _defineProperty(this, "samples", void 0);
3382
- _defineProperty(this, "lastTiming", void 0);
3383
- _defineProperty(this, "lastSampleTime", void 0);
3384
- _defineProperty(this, "lastSampleCount", void 0);
3379
+ _defineProperty(this, "time", 0);
3380
+ _defineProperty(this, "count", 0);
3381
+ _defineProperty(this, "samples", 0);
3382
+ _defineProperty(this, "lastTiming", 0);
3383
+ _defineProperty(this, "lastSampleTime", 0);
3384
+ _defineProperty(this, "lastSampleCount", 0);
3385
3385
  _defineProperty(this, "_count", 0);
3386
3386
  _defineProperty(this, "_time", 0);
3387
3387
  _defineProperty(this, "_samples", 0);
@@ -3391,6 +3391,20 @@
3391
3391
  this.type = type;
3392
3392
  this.reset();
3393
3393
  }
3394
+ reset() {
3395
+ this.time = 0;
3396
+ this.count = 0;
3397
+ this.samples = 0;
3398
+ this.lastTiming = 0;
3399
+ this.lastSampleTime = 0;
3400
+ this.lastSampleCount = 0;
3401
+ this._count = 0;
3402
+ this._time = 0;
3403
+ this._samples = 0;
3404
+ this._startTime = 0;
3405
+ this._timerPending = false;
3406
+ return this;
3407
+ }
3394
3408
  setSampleSize(samples) {
3395
3409
  this.sampleSize = samples;
3396
3410
  return this;
@@ -3454,20 +3468,6 @@
3454
3468
  getHz() {
3455
3469
  return this.time > 0 ? this.samples / (this.time / 1e3) : 0;
3456
3470
  }
3457
- reset() {
3458
- this.time = 0;
3459
- this.count = 0;
3460
- this.samples = 0;
3461
- this.lastTiming = 0;
3462
- this.lastSampleTime = 0;
3463
- this.lastSampleCount = 0;
3464
- this._count = 0;
3465
- this._time = 0;
3466
- this._samples = 0;
3467
- this._startTime = 0;
3468
- this._timerPending = false;
3469
- return this;
3470
- }
3471
3471
  _checkSampling() {
3472
3472
  if (this._samples === this.sampleSize) {
3473
3473
  this.lastSampleTime = this._time;
@@ -3484,10 +3484,10 @@
3484
3484
  }
3485
3485
  });
3486
3486
 
3487
- // ../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js
3487
+ // node_modules/@probe.gl/stats/dist/lib/stats.js
3488
3488
  var Stats;
3489
3489
  var init_stats = __esm({
3490
- "../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js"() {
3490
+ "node_modules/@probe.gl/stats/dist/lib/stats.js"() {
3491
3491
  init_defineProperty();
3492
3492
  init_stat();
3493
3493
  Stats = class {
@@ -3510,14 +3510,14 @@
3510
3510
  return Object.keys(this.stats).length;
3511
3511
  }
3512
3512
  reset() {
3513
- for (const key in this.stats) {
3514
- this.stats[key].reset();
3513
+ for (const stat of Object.values(this.stats)) {
3514
+ stat.reset();
3515
3515
  }
3516
3516
  return this;
3517
3517
  }
3518
3518
  forEach(fn) {
3519
- for (const key in this.stats) {
3520
- fn(this.stats[key]);
3519
+ for (const stat of Object.values(this.stats)) {
3520
+ fn(stat);
3521
3521
  }
3522
3522
  }
3523
3523
  getTable() {
@@ -3551,15 +3551,15 @@
3551
3551
  this.stats[name] = new Stat(name, type);
3552
3552
  }
3553
3553
  }
3554
- return this.stats[name];
3554
+ return this.stats[name] || null;
3555
3555
  }
3556
3556
  };
3557
3557
  }
3558
3558
  });
3559
3559
 
3560
- // ../../node_modules/@probe.gl/stats/dist/esm/index.js
3561
- var init_esm3 = __esm({
3562
- "../../node_modules/@probe.gl/stats/dist/esm/index.js"() {
3560
+ // node_modules/@probe.gl/stats/dist/index.js
3561
+ var init_dist = __esm({
3562
+ "node_modules/@probe.gl/stats/dist/index.js"() {
3563
3563
  init_stats();
3564
3564
  init_stat();
3565
3565
  init_hi_res_timestamp();
@@ -4160,46 +4160,7 @@
4160
4160
  }
4161
4161
  });
4162
4162
 
4163
- // ../loader-utils/src/lib/binary-utils/buffer-utils.ts
4164
- function isBuffer(value) {
4165
- return value && typeof value === "object" && value.isBuffer;
4166
- }
4167
- function bufferToArrayBuffer(buffer) {
4168
- if (isBuffer(buffer)) {
4169
- const typedArray = new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.length);
4170
- return typedArray.slice().buffer;
4171
- }
4172
- return buffer;
4173
- }
4174
- var init_buffer_utils = __esm({
4175
- "../loader-utils/src/lib/binary-utils/buffer-utils.ts"() {
4176
- }
4177
- });
4178
-
4179
4163
  // ../loader-utils/src/lib/binary-utils/array-buffer-utils.ts
4180
- function toArrayBuffer(data) {
4181
- if (isBuffer(data)) {
4182
- return bufferToArrayBuffer(data);
4183
- }
4184
- if (data instanceof ArrayBuffer) {
4185
- return data;
4186
- }
4187
- if (ArrayBuffer.isView(data)) {
4188
- if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
4189
- return data.buffer;
4190
- }
4191
- return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
4192
- }
4193
- if (typeof data === "string") {
4194
- const text = data;
4195
- const uint8Array = new TextEncoder().encode(text);
4196
- return uint8Array.buffer;
4197
- }
4198
- if (data && typeof data === "object" && data._toArrayBuffer) {
4199
- return data._toArrayBuffer();
4200
- }
4201
- throw new Error("toArrayBuffer");
4202
- }
4203
4164
  function compareArrayBuffers(arrayBuffer1, arrayBuffer2, byteLength) {
4204
4165
  byteLength = byteLength || arrayBuffer1.byteLength;
4205
4166
  if (arrayBuffer1.byteLength < byteLength || arrayBuffer2.byteLength < byteLength) {
@@ -4227,7 +4188,6 @@
4227
4188
  }
4228
4189
  var init_array_buffer_utils = __esm({
4229
4190
  "../loader-utils/src/lib/binary-utils/array-buffer-utils.ts"() {
4230
- init_buffer_utils();
4231
4191
  }
4232
4192
  });
4233
4193
 
@@ -4245,11 +4205,230 @@
4245
4205
  }
4246
4206
  });
4247
4207
 
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
+
4248
4427
  // ../loader-utils/src/lib/request-utils/request-scheduler.ts
4249
4428
  var STAT_QUEUED_REQUESTS, STAT_ACTIVE_REQUESTS, STAT_CANCELLED_REQUESTS, STAT_QUEUED_REQUESTS_EVER, STAT_ACTIVE_REQUESTS_EVER, DEFAULT_PROPS2, RequestScheduler;
4250
4429
  var init_request_scheduler = __esm({
4251
4430
  "../loader-utils/src/lib/request-utils/request-scheduler.ts"() {
4252
- init_esm3();
4431
+ init_dist2();
4253
4432
  STAT_QUEUED_REQUESTS = "Queued Requests";
4254
4433
  STAT_ACTIVE_REQUESTS = "Active Requests";
4255
4434
  STAT_CANCELLED_REQUESTS = "Cancelled Requests";
@@ -4267,7 +4446,7 @@
4267
4446
  this.requestMap = new Map();
4268
4447
  this.deferredUpdate = null;
4269
4448
  this.props = { ...DEFAULT_PROPS2, ...props };
4270
- this.stats = new Stats({ id: this.props.id });
4449
+ this.stats = new Stats2({ id: this.props.id });
4271
4450
  this.stats.get(STAT_QUEUED_REQUESTS);
4272
4451
  this.stats.get(STAT_ACTIVE_REQUESTS);
4273
4452
  this.stats.get(STAT_CANCELLED_REQUESTS);
@@ -4370,6 +4549,48 @@
4370
4549
  }
4371
4550
  });
4372
4551
 
4552
+ // ../loader-utils/src/lib/node/buffer.browser.ts
4553
+ function toArrayBuffer(buffer) {
4554
+ return buffer;
4555
+ }
4556
+ var init_buffer_browser = __esm({
4557
+ "../loader-utils/src/lib/node/buffer.browser.ts"() {
4558
+ }
4559
+ });
4560
+
4561
+ // ../loader-utils/src/lib/binary-utils/memory-conversion-utils.ts
4562
+ function isBuffer(value) {
4563
+ return value && typeof value === "object" && value.isBuffer;
4564
+ }
4565
+ function toArrayBuffer2(data) {
4566
+ if (isBuffer(data)) {
4567
+ return toArrayBuffer(data);
4568
+ }
4569
+ if (data instanceof ArrayBuffer) {
4570
+ return data;
4571
+ }
4572
+ if (ArrayBuffer.isView(data)) {
4573
+ if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
4574
+ return data.buffer;
4575
+ }
4576
+ return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
4577
+ }
4578
+ if (typeof data === "string") {
4579
+ const text = data;
4580
+ const uint8Array = new TextEncoder().encode(text);
4581
+ return uint8Array.buffer;
4582
+ }
4583
+ if (data && typeof data === "object" && data._toArrayBuffer) {
4584
+ return data._toArrayBuffer();
4585
+ }
4586
+ throw new Error("toArrayBuffer");
4587
+ }
4588
+ var init_memory_conversion_utils = __esm({
4589
+ "../loader-utils/src/lib/binary-utils/memory-conversion-utils.ts"() {
4590
+ init_buffer_browser();
4591
+ }
4592
+ });
4593
+
4373
4594
  // ../loader-utils/src/lib/path-utils/path.ts
4374
4595
  var path_exports = {};
4375
4596
  __export(path_exports, {
@@ -4413,6 +4634,7 @@
4413
4634
  init_async_iteration();
4414
4635
  init_request_scheduler();
4415
4636
  init_file_aliases();
4637
+ init_memory_conversion_utils();
4416
4638
  init_path();
4417
4639
  }
4418
4640
  });
@@ -4446,55 +4668,55 @@
4446
4668
  return this._length;
4447
4669
  }
4448
4670
  add(item) {
4449
- const node = new DoublyLinkedListNode(item, this.tail, null);
4671
+ const node2 = new DoublyLinkedListNode(item, this.tail, null);
4450
4672
  if (this.tail) {
4451
- this.tail.next = node;
4452
- this.tail = node;
4673
+ this.tail.next = node2;
4674
+ this.tail = node2;
4453
4675
  } else {
4454
- this.head = node;
4455
- this.tail = node;
4676
+ this.head = node2;
4677
+ this.tail = node2;
4456
4678
  }
4457
4679
  ++this._length;
4458
- return node;
4680
+ return node2;
4459
4681
  }
4460
- remove(node) {
4461
- if (!node) {
4682
+ remove(node2) {
4683
+ if (!node2) {
4462
4684
  return;
4463
4685
  }
4464
- if (node.previous && node.next) {
4465
- node.previous.next = node.next;
4466
- node.next.previous = node.previous;
4467
- } else if (node.previous) {
4468
- node.previous.next = null;
4469
- this.tail = node.previous;
4470
- } else if (node.next) {
4471
- node.next.previous = null;
4472
- this.head = node.next;
4686
+ if (node2.previous && node2.next) {
4687
+ node2.previous.next = node2.next;
4688
+ node2.next.previous = node2.previous;
4689
+ } else if (node2.previous) {
4690
+ node2.previous.next = null;
4691
+ this.tail = node2.previous;
4692
+ } else if (node2.next) {
4693
+ node2.next.previous = null;
4694
+ this.head = node2.next;
4473
4695
  } else {
4474
4696
  this.head = null;
4475
4697
  this.tail = null;
4476
4698
  }
4477
- node.next = null;
4478
- node.previous = null;
4699
+ node2.next = null;
4700
+ node2.previous = null;
4479
4701
  --this._length;
4480
4702
  }
4481
- splice(node, nextNode) {
4482
- if (node === nextNode) {
4703
+ splice(node2, nextNode) {
4704
+ if (node2 === nextNode) {
4483
4705
  return;
4484
4706
  }
4485
4707
  this.remove(nextNode);
4486
- this._insert(node, nextNode);
4708
+ this._insert(node2, nextNode);
4487
4709
  }
4488
- _insert(node, nextNode) {
4489
- const oldNodeNext = node.next;
4490
- node.next = nextNode;
4491
- if (this.tail === node) {
4710
+ _insert(node2, nextNode) {
4711
+ const oldNodeNext = node2.next;
4712
+ node2.next = nextNode;
4713
+ if (this.tail === node2) {
4492
4714
  this.tail = nextNode;
4493
4715
  } else {
4494
4716
  oldNodeNext.previous = nextNode;
4495
4717
  }
4496
4718
  nextNode.next = oldNodeNext;
4497
- nextNode.previous = node;
4719
+ nextNode.previous = node2;
4498
4720
  ++this._length;
4499
4721
  }
4500
4722
  };
@@ -4519,9 +4741,9 @@
4519
4741
  this._list.splice(this._list.tail, this._sentinel);
4520
4742
  }
4521
4743
  touch(tile) {
4522
- const node = tile._cacheNode;
4523
- if (defined(node)) {
4524
- this._list.splice(this._sentinel, node);
4744
+ const node2 = tile._cacheNode;
4745
+ if (defined(node2)) {
4746
+ this._list.splice(this._sentinel, node2);
4525
4747
  }
4526
4748
  }
4527
4749
  add(tileset, tile, addCallback) {
@@ -4533,11 +4755,11 @@
4533
4755
  }
4534
4756
  }
4535
4757
  unloadTile(tileset, tile, unloadCallback) {
4536
- const node = tile._cacheNode;
4537
- if (!defined(node)) {
4758
+ const node2 = tile._cacheNode;
4759
+ if (!defined(node2)) {
4538
4760
  return;
4539
4761
  }
4540
- this._list.remove(node);
4762
+ this._list.remove(node2);
4541
4763
  tile._cacheNode = void 0;
4542
4764
  if (unloadCallback) {
4543
4765
  unloadCallback(tileset, tile);
@@ -4549,10 +4771,10 @@
4549
4771
  const list = this._list;
4550
4772
  const maximumMemoryUsageInBytes = tileset.maximumMemoryUsage * 1024 * 1024;
4551
4773
  const sentinel = this._sentinel;
4552
- let node = list.head;
4553
- while (node !== sentinel && (tileset.gpuMemoryUsageInBytes > maximumMemoryUsageInBytes || trimTiles)) {
4554
- const tile = node.item;
4555
- node = node.next;
4774
+ let node2 = list.head;
4775
+ while (node2 !== sentinel && (tileset.gpuMemoryUsageInBytes > maximumMemoryUsageInBytes || trimTiles)) {
4776
+ const tile = node2.item;
4777
+ node2 = node2.next;
4556
4778
  this.unloadTile(tileset, tile, unloadCallback);
4557
4779
  }
4558
4780
  }
@@ -5154,7 +5376,7 @@
5154
5376
  });
5155
5377
 
5156
5378
  // ../../node_modules/@math.gl/culling/dist/esm/index.js
5157
- var init_esm4 = __esm({
5379
+ var init_esm3 = __esm({
5158
5380
  "../../node_modules/@math.gl/culling/dist/esm/index.js"() {
5159
5381
  init_constants2();
5160
5382
  init_axis_aligned_bounding_box();
@@ -5260,7 +5482,7 @@
5260
5482
  var init_frame_state = __esm({
5261
5483
  "src/tileset/helpers/frame-state.ts"() {
5262
5484
  init_esm();
5263
- init_esm4();
5485
+ init_esm3();
5264
5486
  init_esm2();
5265
5487
  scratchVector7 = new Vector3();
5266
5488
  scratchPosition3 = new Vector3();
@@ -5313,7 +5535,7 @@
5313
5535
  var init_zoom = __esm({
5314
5536
  "src/tileset/helpers/zoom.ts"() {
5315
5537
  init_esm();
5316
- init_esm4();
5538
+ init_esm3();
5317
5539
  init_esm2();
5318
5540
  WGS84_RADIUS_X2 = 6378137;
5319
5541
  WGS84_RADIUS_Y2 = 6378137;
@@ -5520,12 +5742,12 @@
5520
5742
  }
5521
5743
  });
5522
5744
 
5523
- // ../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js
5745
+ // ../core/node_modules/@probe.gl/env/dist/lib/is-electron.js
5524
5746
  function isElectron(mockUserAgent) {
5525
5747
  if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
5526
5748
  return true;
5527
5749
  }
5528
- if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions.electron)) {
5750
+ if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions["electron"])) {
5529
5751
  return true;
5530
5752
  }
5531
5753
  const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
@@ -5536,59 +5758,54 @@
5536
5758
  return false;
5537
5759
  }
5538
5760
  var init_is_electron = __esm({
5539
- "../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js"() {
5761
+ "../core/node_modules/@probe.gl/env/dist/lib/is-electron.js"() {
5540
5762
  }
5541
5763
  });
5542
5764
 
5543
- // ../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js
5765
+ // ../core/node_modules/@probe.gl/env/dist/lib/is-browser.js
5544
5766
  function isBrowser3() {
5545
5767
  const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
5546
5768
  return !isNode || isElectron();
5547
5769
  }
5548
5770
  var init_is_browser = __esm({
5549
- "../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js"() {
5771
+ "../core/node_modules/@probe.gl/env/dist/lib/is-browser.js"() {
5550
5772
  init_is_electron();
5551
5773
  }
5552
5774
  });
5553
5775
 
5554
- // ../../node_modules/@probe.gl/env/dist/esm/lib/globals.js
5555
- var globals3, self_3, window_3, document_3, process_;
5776
+ // ../core/node_modules/@probe.gl/env/dist/lib/globals.js
5777
+ var self2, window2, document2, process2, console2, navigator2;
5556
5778
  var init_globals3 = __esm({
5557
- "../../node_modules/@probe.gl/env/dist/esm/lib/globals.js"() {
5558
- globals3 = {
5559
- self: typeof self !== "undefined" && self,
5560
- window: typeof window !== "undefined" && window,
5561
- global: typeof global !== "undefined" && global,
5562
- document: typeof document !== "undefined" && document,
5563
- process: typeof process === "object" && process
5564
- };
5565
- self_3 = globals3.self || globals3.window || globals3.global;
5566
- window_3 = globals3.window || globals3.self || globals3.global;
5567
- document_3 = globals3.document || {};
5568
- process_ = globals3.process || {};
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 || {};
5569
5786
  }
5570
5787
  });
5571
5788
 
5572
- // ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
5789
+ // ../core/node_modules/@probe.gl/env/dist/utils/globals.js
5573
5790
  var VERSION2, isBrowser4;
5574
5791
  var init_globals4 = __esm({
5575
- "../../node_modules/@probe.gl/env/dist/esm/utils/globals.js"() {
5792
+ "../core/node_modules/@probe.gl/env/dist/utils/globals.js"() {
5576
5793
  init_is_browser();
5577
5794
  VERSION2 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
5578
5795
  isBrowser4 = isBrowser3();
5579
5796
  }
5580
5797
  });
5581
5798
 
5582
- // ../../node_modules/@probe.gl/env/dist/esm/index.js
5583
- var init_esm5 = __esm({
5584
- "../../node_modules/@probe.gl/env/dist/esm/index.js"() {
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"() {
5585
5802
  init_globals4();
5586
5803
  init_globals3();
5587
5804
  init_is_browser();
5588
5805
  }
5589
5806
  });
5590
5807
 
5591
- // ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
5808
+ // ../core/node_modules/@probe.gl/log/dist/utils/local-storage.js
5592
5809
  function getStorage(type) {
5593
5810
  try {
5594
5811
  const storage = window[type];
@@ -5602,35 +5819,28 @@
5602
5819
  }
5603
5820
  var LocalStorage;
5604
5821
  var init_local_storage = __esm({
5605
- "../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js"() {
5822
+ "../core/node_modules/@probe.gl/log/dist/utils/local-storage.js"() {
5606
5823
  init_defineProperty();
5607
5824
  LocalStorage = class {
5608
- constructor(id) {
5609
- let defaultSettings = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
5825
+ constructor(id, defaultConfig) {
5610
5826
  let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
5611
5827
  _defineProperty(this, "storage", void 0);
5612
5828
  _defineProperty(this, "id", void 0);
5613
- _defineProperty(this, "config", {});
5829
+ _defineProperty(this, "config", void 0);
5614
5830
  this.storage = getStorage(type);
5615
5831
  this.id = id;
5616
- this.config = {};
5617
- Object.assign(this.config, defaultSettings);
5832
+ this.config = defaultConfig;
5618
5833
  this._loadConfiguration();
5619
5834
  }
5620
5835
  getConfiguration() {
5621
5836
  return this.config;
5622
5837
  }
5623
5838
  setConfiguration(configuration) {
5624
- this.config = {};
5625
- return this.updateConfiguration(configuration);
5626
- }
5627
- updateConfiguration(configuration) {
5628
5839
  Object.assign(this.config, configuration);
5629
5840
  if (this.storage) {
5630
5841
  const serialized = JSON.stringify(this.config);
5631
5842
  this.storage.setItem(this.id, serialized);
5632
5843
  }
5633
- return this;
5634
5844
  }
5635
5845
  _loadConfiguration() {
5636
5846
  let configuration = {};
@@ -5645,7 +5855,7 @@
5645
5855
  }
5646
5856
  });
5647
5857
 
5648
- // ../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js
5858
+ // ../core/node_modules/@probe.gl/log/dist/utils/formatters.js
5649
5859
  function formatTime(ms) {
5650
5860
  let formatted;
5651
5861
  if (ms < 10) {
@@ -5676,31 +5886,35 @@
5676
5886
  return ["".concat(message, " %c+"), style];
5677
5887
  }
5678
5888
  var init_formatters = __esm({
5679
- "../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js"() {
5889
+ "../core/node_modules/@probe.gl/log/dist/utils/formatters.js"() {
5680
5890
  }
5681
5891
  });
5682
5892
 
5683
- // ../../node_modules/@probe.gl/log/dist/esm/utils/color.js
5893
+ // ../core/node_modules/@probe.gl/log/dist/utils/color.js
5684
5894
  function getColor(color) {
5685
- return typeof color === "string" ? COLOR[color.toUpperCase()] || COLOR.WHITE : color;
5895
+ if (typeof color !== "string") {
5896
+ return color;
5897
+ }
5898
+ color = color.toUpperCase();
5899
+ return COLOR[color] || COLOR.WHITE;
5686
5900
  }
5687
5901
  function addColor(string, color, background) {
5688
5902
  if (!isBrowser3 && typeof string === "string") {
5689
5903
  if (color) {
5690
- color = getColor(color);
5691
- string = "[".concat(color, "m").concat(string, "");
5904
+ const colorCode = getColor(color);
5905
+ string = "[".concat(colorCode, "m").concat(string, "");
5692
5906
  }
5693
5907
  if (background) {
5694
- color = getColor(background);
5695
- string = "[".concat(background + 10, "m").concat(string, "");
5908
+ const colorCode = getColor(background);
5909
+ string = "[".concat(colorCode + BACKGROUND_INCREMENT, "m").concat(string, "");
5696
5910
  }
5697
5911
  }
5698
5912
  return string;
5699
5913
  }
5700
- var COLOR;
5914
+ var COLOR, BACKGROUND_INCREMENT;
5701
5915
  var init_color = __esm({
5702
- "../../node_modules/@probe.gl/log/dist/esm/utils/color.js"() {
5703
- init_esm5();
5916
+ "../core/node_modules/@probe.gl/log/dist/utils/color.js"() {
5917
+ init_dist3();
5704
5918
  (function(COLOR2) {
5705
5919
  COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
5706
5920
  COLOR2[COLOR2["RED"] = 31] = "RED";
@@ -5719,66 +5933,63 @@
5719
5933
  COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
5720
5934
  COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
5721
5935
  })(COLOR || (COLOR = {}));
5936
+ BACKGROUND_INCREMENT = 10;
5722
5937
  }
5723
5938
  });
5724
5939
 
5725
- // ../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js
5940
+ // ../core/node_modules/@probe.gl/log/dist/utils/autobind.js
5726
5941
  function autobind(obj) {
5727
5942
  let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
5728
5943
  const proto = Object.getPrototypeOf(obj);
5729
5944
  const propNames = Object.getOwnPropertyNames(proto);
5945
+ const object = obj;
5730
5946
  for (const key of propNames) {
5731
- if (typeof obj[key] === "function") {
5947
+ const value = object[key];
5948
+ if (typeof value === "function") {
5732
5949
  if (!predefined.find((name) => key === name)) {
5733
- obj[key] = obj[key].bind(obj);
5950
+ object[key] = value.bind(obj);
5734
5951
  }
5735
5952
  }
5736
5953
  }
5737
5954
  }
5738
5955
  var init_autobind = __esm({
5739
- "../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js"() {
5956
+ "../core/node_modules/@probe.gl/log/dist/utils/autobind.js"() {
5740
5957
  }
5741
5958
  });
5742
5959
 
5743
- // ../../node_modules/@probe.gl/log/dist/esm/utils/assert.js
5960
+ // ../core/node_modules/@probe.gl/log/dist/utils/assert.js
5744
5961
  function assert4(condition, message) {
5745
5962
  if (!condition) {
5746
5963
  throw new Error(message || "Assertion failed");
5747
5964
  }
5748
5965
  }
5749
5966
  var init_assert4 = __esm({
5750
- "../../node_modules/@probe.gl/log/dist/esm/utils/assert.js"() {
5967
+ "../core/node_modules/@probe.gl/log/dist/utils/assert.js"() {
5751
5968
  }
5752
5969
  });
5753
5970
 
5754
- // ../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js
5755
- function getHiResTimestamp2() {
5971
+ // ../core/node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js
5972
+ function getHiResTimestamp3() {
5756
5973
  let timestamp;
5757
- if (isBrowser3 && "performance" in window_3) {
5974
+ if (isBrowser3() && window2.performance) {
5758
5975
  var _window$performance, _window$performance$n;
5759
- 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);
5760
- } else if ("hrtime" in process_) {
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) {
5761
5978
  var _process$hrtime;
5762
- const timeParts = process_ === null || process_ === void 0 ? void 0 : (_process$hrtime = process_.hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(process_);
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);
5763
5980
  timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
5764
5981
  } else {
5765
5982
  timestamp = Date.now();
5766
5983
  }
5767
5984
  return timestamp;
5768
5985
  }
5769
- var init_hi_res_timestamp2 = __esm({
5770
- "../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js"() {
5771
- init_esm5();
5986
+ var init_hi_res_timestamp3 = __esm({
5987
+ "../core/node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js"() {
5988
+ init_dist3();
5772
5989
  }
5773
5990
  });
5774
5991
 
5775
- // (disabled):../../node_modules/@probe.gl/log/dist/esm/node/node-asciify-image
5776
- var init_node_asciify_image = __esm({
5777
- "(disabled):../../node_modules/@probe.gl/log/dist/esm/node/node-asciify-image"() {
5778
- }
5779
- });
5780
-
5781
- // ../../node_modules/@probe.gl/log/dist/esm/log.js
5992
+ // ../core/node_modules/@probe.gl/log/dist/log.js
5782
5993
  function noop() {
5783
5994
  }
5784
5995
  function normalizeLogLevel(logLevel) {
@@ -5844,11 +6055,7 @@
5844
6055
  message = "",
5845
6056
  scale: scale5 = 1
5846
6057
  } = _ref2;
5847
- asciify.nodeAsciifyImage({
5848
- image,
5849
- message,
5850
- scale: scale5
5851
- });
6058
+ console.warn("removed");
5852
6059
  return noop;
5853
6060
  }
5854
6061
  function logImageInBrowser(_ref3) {
@@ -5887,26 +6094,25 @@
5887
6094
  }
5888
6095
  return "empty";
5889
6096
  }
5890
- var originalConsole, DEFAULT_SETTINGS, cache, ONCE, Log;
6097
+ var originalConsole, DEFAULT_LOG_CONFIGURATION, cache, ONCE, Log;
5891
6098
  var init_log = __esm({
5892
- "../../node_modules/@probe.gl/log/dist/esm/log.js"() {
6099
+ "../core/node_modules/@probe.gl/log/dist/log.js"() {
5893
6100
  init_defineProperty();
5894
- init_esm5();
6101
+ init_dist3();
5895
6102
  init_local_storage();
5896
6103
  init_formatters();
5897
6104
  init_color();
5898
6105
  init_autobind();
5899
6106
  init_assert4();
5900
- init_hi_res_timestamp2();
5901
- init_node_asciify_image();
6107
+ init_hi_res_timestamp3();
5902
6108
  originalConsole = {
5903
- debug: isBrowser3 ? console.debug || console.log : console.log,
6109
+ debug: isBrowser3() ? console.debug || console.log : console.log,
5904
6110
  log: console.log,
5905
6111
  info: console.info,
5906
6112
  warn: console.warn,
5907
6113
  error: console.error
5908
6114
  };
5909
- DEFAULT_SETTINGS = {
6115
+ DEFAULT_LOG_CONFIGURATION = {
5910
6116
  enabled: true,
5911
6117
  level: 0
5912
6118
  };
@@ -5923,14 +6129,14 @@
5923
6129
  };
5924
6130
  _defineProperty(this, "id", void 0);
5925
6131
  _defineProperty(this, "VERSION", VERSION2);
5926
- _defineProperty(this, "_startTs", getHiResTimestamp2());
5927
- _defineProperty(this, "_deltaTs", getHiResTimestamp2());
6132
+ _defineProperty(this, "_startTs", getHiResTimestamp3());
6133
+ _defineProperty(this, "_deltaTs", getHiResTimestamp3());
5928
6134
  _defineProperty(this, "_storage", void 0);
5929
6135
  _defineProperty(this, "userData", {});
5930
6136
  _defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
5931
6137
  this.id = id;
5932
- this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS);
5933
6138
  this.userData = {};
6139
+ this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_LOG_CONFIGURATION);
5934
6140
  this.timeStamp("".concat(this.id, " started"));
5935
6141
  autobind(this);
5936
6142
  Object.seal(this);
@@ -5948,10 +6154,10 @@
5948
6154
  return this._storage.config.level;
5949
6155
  }
5950
6156
  getTotal() {
5951
- return Number((getHiResTimestamp2() - this._startTs).toPrecision(10));
6157
+ return Number((getHiResTimestamp3() - this._startTs).toPrecision(10));
5952
6158
  }
5953
6159
  getDelta() {
5954
- return Number((getHiResTimestamp2() - this._deltaTs).toPrecision(10));
6160
+ return Number((getHiResTimestamp3() - this._deltaTs).toPrecision(10));
5955
6161
  }
5956
6162
  set priority(newPriority) {
5957
6163
  this.level = newPriority;
@@ -5964,13 +6170,13 @@
5964
6170
  }
5965
6171
  enable() {
5966
6172
  let enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
5967
- this._storage.updateConfiguration({
6173
+ this._storage.setConfiguration({
5968
6174
  enabled
5969
6175
  });
5970
6176
  return this;
5971
6177
  }
5972
6178
  setLevel(level) {
5973
- this._storage.updateConfiguration({
6179
+ this._storage.setConfiguration({
5974
6180
  level
5975
6181
  });
5976
6182
  return this;
@@ -5979,7 +6185,7 @@
5979
6185
  return this._storage.config[setting];
5980
6186
  }
5981
6187
  set(setting, value) {
5982
- this._storage.updateConfiguration({
6188
+ this._storage.setConfiguration({
5983
6189
  [setting]: value
5984
6190
  });
5985
6191
  }
@@ -6018,9 +6224,6 @@
6018
6224
  return this._getLogFunction(logLevel, message, console.info, arguments);
6019
6225
  }
6020
6226
  once(logLevel, message) {
6021
- for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
6022
- args[_key - 2] = arguments[_key];
6023
- }
6024
6227
  return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
6025
6228
  }
6026
6229
  table(logLevel, table, columns) {
@@ -6042,7 +6245,7 @@
6042
6245
  if (!this._shouldLog(logLevel || priority)) {
6043
6246
  return noop;
6044
6247
  }
6045
- return isBrowser3 ? logImageInBrowser({
6248
+ return isBrowser3() ? logImageInBrowser({
6046
6249
  image,
6047
6250
  message,
6048
6251
  scale: scale5
@@ -6113,11 +6316,11 @@
6113
6316
  assert4(method);
6114
6317
  opts.total = this.getTotal();
6115
6318
  opts.delta = this.getDelta();
6116
- this._deltaTs = getHiResTimestamp2();
6319
+ this._deltaTs = getHiResTimestamp3();
6117
6320
  const tag = opts.tag || opts.message;
6118
- if (opts.once) {
6321
+ if (opts.once && tag) {
6119
6322
  if (!cache[tag]) {
6120
- cache[tag] = getHiResTimestamp2();
6323
+ cache[tag] = getHiResTimestamp3();
6121
6324
  } else {
6122
6325
  return noop;
6123
6326
  }
@@ -6132,13 +6335,13 @@
6132
6335
  }
6133
6336
  });
6134
6337
 
6135
- // ../../node_modules/@probe.gl/log/dist/esm/index.js
6136
- var esm_default;
6137
- var init_esm6 = __esm({
6138
- "../../node_modules/@probe.gl/log/dist/esm/index.js"() {
6338
+ // ../core/node_modules/@probe.gl/log/dist/index.js
6339
+ var dist_default;
6340
+ var init_dist4 = __esm({
6341
+ "../core/node_modules/@probe.gl/log/dist/index.js"() {
6139
6342
  init_log();
6140
6343
  init_log();
6141
- esm_default = new Log({
6344
+ dist_default = new Log({
6142
6345
  id: "@probe.gl/log"
6143
6346
  });
6144
6347
  }
@@ -6148,7 +6351,7 @@
6148
6351
  var probeLog, NullLog, ConsoleLog;
6149
6352
  var init_loggers = __esm({
6150
6353
  "../core/src/lib/loader-utils/loggers.ts"() {
6151
- init_esm6();
6354
+ init_dist4();
6152
6355
  probeLog = new Log({ id: "loaders.gl" });
6153
6356
  NullLog = class {
6154
6357
  log() {
@@ -6246,20 +6449,6 @@
6246
6449
  validateOptions(options, loaders);
6247
6450
  return normalizeOptionsInternal(loader, options, url);
6248
6451
  }
6249
- function getFetchFunction(options, context) {
6250
- const globalOptions = getGlobalLoaderOptions();
6251
- const fetchOptions = options || globalOptions;
6252
- if (typeof fetchOptions.fetch === "function") {
6253
- return fetchOptions.fetch;
6254
- }
6255
- if (isObject(fetchOptions.fetch)) {
6256
- return (url) => fetchFile(url, fetchOptions);
6257
- }
6258
- if (context?.fetch) {
6259
- return context?.fetch;
6260
- }
6261
- return fetchFile;
6262
- }
6263
6452
  function validateOptions(options, loaders) {
6264
6453
  validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
6265
6454
  for (const loader of loaders) {
@@ -6338,7 +6527,6 @@
6338
6527
  var init_option_utils = __esm({
6339
6528
  "../core/src/lib/loader-utils/option-utils.ts"() {
6340
6529
  init_is_type();
6341
- init_fetch_file();
6342
6530
  init_loggers();
6343
6531
  init_option_defaults();
6344
6532
  getGlobalLoaderOptions = () => {
@@ -6406,7 +6594,7 @@
6406
6594
  var log;
6407
6595
  var init_log2 = __esm({
6408
6596
  "../core/src/lib/utils/log.ts"() {
6409
- init_esm6();
6597
+ init_dist4();
6410
6598
  log = new Log({ id: "loaders.gl" });
6411
6599
  }
6412
6600
  });
@@ -6679,7 +6867,7 @@
6679
6867
  if (done) {
6680
6868
  return;
6681
6869
  }
6682
- yield toArrayBuffer(value);
6870
+ yield toArrayBuffer2(value);
6683
6871
  }
6684
6872
  } catch (error) {
6685
6873
  reader.releaseLock();
@@ -6687,7 +6875,7 @@
6687
6875
  }
6688
6876
  async function* makeNodeStreamIterator(stream, options) {
6689
6877
  for await (const chunk of stream) {
6690
- yield toArrayBuffer(chunk);
6878
+ yield toArrayBuffer2(chunk);
6691
6879
  }
6692
6880
  }
6693
6881
  var init_make_stream_iterator = __esm({
@@ -6788,6 +6976,29 @@
6788
6976
  }
6789
6977
  });
6790
6978
 
6979
+ // ../core/src/lib/loader-utils/get-fetch-function.ts
6980
+ function getFetchFunction(options, context) {
6981
+ const globalOptions = getGlobalLoaderOptions();
6982
+ const fetchOptions = options || globalOptions;
6983
+ if (typeof fetchOptions.fetch === "function") {
6984
+ return fetchOptions.fetch;
6985
+ }
6986
+ if (isObject(fetchOptions.fetch)) {
6987
+ return (url) => fetchFile(url, fetchOptions);
6988
+ }
6989
+ if (context?.fetch) {
6990
+ return context?.fetch;
6991
+ }
6992
+ return fetchFile;
6993
+ }
6994
+ var init_get_fetch_function = __esm({
6995
+ "../core/src/lib/loader-utils/get-fetch-function.ts"() {
6996
+ init_is_type();
6997
+ init_fetch_file();
6998
+ init_option_utils();
6999
+ }
7000
+ });
7001
+
6791
7002
  // ../core/src/lib/loader-utils/loader-context.ts
6792
7003
  function getLoaderContext(context, options, previousContext = null) {
6793
7004
  if (previousContext) {
@@ -6818,7 +7029,7 @@
6818
7029
  }
6819
7030
  var init_loader_context = __esm({
6820
7031
  "../core/src/lib/loader-utils/loader-context.ts"() {
6821
- init_option_utils();
7032
+ init_get_fetch_function();
6822
7033
  }
6823
7034
  });
6824
7035
 
@@ -6903,7 +7114,7 @@
6903
7114
  "../core/src/lib/api/load.ts"() {
6904
7115
  init_is_type();
6905
7116
  init_normalize_loader();
6906
- init_option_utils();
7117
+ init_get_fetch_function();
6907
7118
  init_parse();
6908
7119
  }
6909
7120
  });
@@ -7034,7 +7245,7 @@
7034
7245
  var init_bounding_volume = __esm({
7035
7246
  "src/tileset/helpers/bounding-volume.ts"() {
7036
7247
  init_esm();
7037
- init_esm4();
7248
+ init_esm3();
7038
7249
  init_esm2();
7039
7250
  init_src2();
7040
7251
  scratchScale = new Vector3();
@@ -7480,7 +7691,7 @@
7480
7691
  var init_tile_3d = __esm({
7481
7692
  "src/tileset/tile-3d.ts"() {
7482
7693
  init_esm();
7483
- init_esm4();
7694
+ init_esm3();
7484
7695
  init_src3();
7485
7696
  init_constants3();
7486
7697
  init_bounding_volume();
@@ -8087,7 +8298,7 @@
8087
8298
  "src/tileset/tileset-3d.ts"() {
8088
8299
  init_esm();
8089
8300
  init_esm2();
8090
- init_esm3();
8301
+ init_dist();
8091
8302
  init_src2();
8092
8303
  init_tileset_cache();
8093
8304
  init_transform_utils();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/tiles",
3
- "version": "3.4.0-alpha.1",
3
+ "version": "3.4.0-alpha.2",
4
4
  "description": "Common components for different tiles loaders.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -33,16 +33,16 @@
33
33
  "build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/dist.min.js"
34
34
  },
35
35
  "dependencies": {
36
- "@loaders.gl/loader-utils": "3.4.0-alpha.1",
37
- "@loaders.gl/math": "3.4.0-alpha.1",
36
+ "@loaders.gl/loader-utils": "3.4.0-alpha.2",
37
+ "@loaders.gl/math": "3.4.0-alpha.2",
38
38
  "@math.gl/core": "^3.5.1",
39
39
  "@math.gl/culling": "^3.5.1",
40
40
  "@math.gl/geospatial": "^3.5.1",
41
41
  "@math.gl/web-mercator": "^3.5.1",
42
- "@probe.gl/stats": "^3.5.0"
42
+ "@probe.gl/stats": "^4.0.1"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@loaders.gl/core": "^3.2.0"
46
46
  },
47
- "gitHead": "4085b0323050e4361614471319a1fb4729547bbf"
47
+ "gitHead": "f1c00c124d8d0c41a138ff40afb0d1a00711bf2e"
48
48
  }