@loaders.gl/tile-converter 3.4.1 → 3.4.3

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.
package/dist/dist.min.js CHANGED
@@ -47485,7 +47485,7 @@ function _defineProperty(obj, key, value) {
47485
47485
  return obj;
47486
47486
  }
47487
47487
 
47488
- // ../../node_modules/@probe.gl/stats/dist/utils/hi-res-timestamp.js
47488
+ // ../loader-utils/node_modules/@probe.gl/stats/dist/utils/hi-res-timestamp.js
47489
47489
  function getHiResTimestamp() {
47490
47490
  let timestamp;
47491
47491
  if (typeof window !== "undefined" && window.performance) {
@@ -47499,7 +47499,7 @@ function getHiResTimestamp() {
47499
47499
  return timestamp;
47500
47500
  }
47501
47501
 
47502
- // ../../node_modules/@probe.gl/stats/dist/lib/stat.js
47502
+ // ../loader-utils/node_modules/@probe.gl/stats/dist/lib/stat.js
47503
47503
  var Stat = class {
47504
47504
  constructor(name10, type) {
47505
47505
  _defineProperty(this, "name", void 0);
@@ -47611,7 +47611,7 @@ var Stat = class {
47611
47611
  }
47612
47612
  };
47613
47613
 
47614
- // ../../node_modules/@probe.gl/stats/dist/lib/stats.js
47614
+ // ../loader-utils/node_modules/@probe.gl/stats/dist/lib/stats.js
47615
47615
  var Stats = class {
47616
47616
  constructor(options) {
47617
47617
  _defineProperty(this, "id", void 0);
@@ -48257,7 +48257,7 @@ async function writeFile2(filePath, arrayBufferOrString, options) {
48257
48257
  assert2(false);
48258
48258
  }
48259
48259
 
48260
- // ../../node_modules/@probe.gl/env/dist/lib/is-electron.js
48260
+ // ../core/node_modules/@probe.gl/env/dist/lib/is-electron.js
48261
48261
  function isElectron(mockUserAgent) {
48262
48262
  if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
48263
48263
  return true;
@@ -48273,13 +48273,13 @@ function isElectron(mockUserAgent) {
48273
48273
  return false;
48274
48274
  }
48275
48275
 
48276
- // ../../node_modules/@probe.gl/env/dist/lib/is-browser.js
48276
+ // ../core/node_modules/@probe.gl/env/dist/lib/is-browser.js
48277
48277
  function isBrowser3() {
48278
48278
  const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
48279
48279
  return !isNode || isElectron();
48280
48280
  }
48281
48281
 
48282
- // ../../node_modules/@probe.gl/env/dist/lib/globals.js
48282
+ // ../core/node_modules/@probe.gl/env/dist/lib/globals.js
48283
48283
  var self_3 = globalThis.self || globalThis.window || globalThis.global;
48284
48284
  var window_3 = globalThis.window || globalThis.self || globalThis.global;
48285
48285
  var document_3 = globalThis.document || {};
@@ -48287,11 +48287,11 @@ var process_ = globalThis.process || {};
48287
48287
  var console_ = globalThis.console;
48288
48288
  var navigator_ = globalThis.navigator || {};
48289
48289
 
48290
- // ../../node_modules/@probe.gl/env/dist/utils/globals.js
48290
+ // ../core/node_modules/@probe.gl/env/dist/utils/globals.js
48291
48291
  var VERSION5 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
48292
48292
  var isBrowser4 = isBrowser3();
48293
48293
 
48294
- // ../../node_modules/@probe.gl/log/dist/utils/local-storage.js
48294
+ // ../core/node_modules/@probe.gl/log/dist/utils/local-storage.js
48295
48295
  function getStorage(type) {
48296
48296
  try {
48297
48297
  const storage = window[type];
@@ -48335,7 +48335,7 @@ var LocalStorage = class {
48335
48335
  }
48336
48336
  };
48337
48337
 
48338
- // ../../node_modules/@probe.gl/log/dist/utils/formatters.js
48338
+ // ../core/node_modules/@probe.gl/log/dist/utils/formatters.js
48339
48339
  function formatTime(ms) {
48340
48340
  let formatted;
48341
48341
  if (ms < 10) {
@@ -48366,7 +48366,7 @@ function formatImage(image, message, scale) {
48366
48366
  return ["".concat(message, " %c+"), style];
48367
48367
  }
48368
48368
 
48369
- // ../../node_modules/@probe.gl/log/dist/utils/color.js
48369
+ // ../core/node_modules/@probe.gl/log/dist/utils/color.js
48370
48370
  var COLOR;
48371
48371
  (function(COLOR2) {
48372
48372
  COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
@@ -48408,7 +48408,7 @@ function addColor(string, color, background) {
48408
48408
  return string;
48409
48409
  }
48410
48410
 
48411
- // ../../node_modules/@probe.gl/log/dist/utils/autobind.js
48411
+ // ../core/node_modules/@probe.gl/log/dist/utils/autobind.js
48412
48412
  function autobind(obj) {
48413
48413
  let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
48414
48414
  const proto = Object.getPrototypeOf(obj);
@@ -48424,14 +48424,14 @@ function autobind(obj) {
48424
48424
  }
48425
48425
  }
48426
48426
 
48427
- // ../../node_modules/@probe.gl/log/dist/utils/assert.js
48427
+ // ../core/node_modules/@probe.gl/log/dist/utils/assert.js
48428
48428
  function assert4(condition, message) {
48429
48429
  if (!condition) {
48430
48430
  throw new Error(message || "Assertion failed");
48431
48431
  }
48432
48432
  }
48433
48433
 
48434
- // ../../node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js
48434
+ // ../core/node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js
48435
48435
  function getHiResTimestamp2() {
48436
48436
  let timestamp;
48437
48437
  if (isBrowser3() && window_3.performance) {
@@ -48447,7 +48447,7 @@ function getHiResTimestamp2() {
48447
48447
  return timestamp;
48448
48448
  }
48449
48449
 
48450
- // ../../node_modules/@probe.gl/log/dist/log.js
48450
+ // ../core/node_modules/@probe.gl/log/dist/log.js
48451
48451
  var originalConsole = {
48452
48452
  debug: isBrowser3() ? console.debug || console.log : console.log,
48453
48453
  log: console.log,
@@ -48780,7 +48780,7 @@ function getTableHeader(table) {
48780
48780
  return "empty";
48781
48781
  }
48782
48782
 
48783
- // ../../node_modules/@probe.gl/log/dist/index.js
48783
+ // ../core/node_modules/@probe.gl/log/dist/index.js
48784
48784
  var dist_default = new Log({
48785
48785
  id: "@probe.gl/log"
48786
48786
  });
@@ -49508,6 +49508,197 @@ function getTemporaryFilename(filename2) {
49508
49508
  var import_core10 = __toModule(require_es5());
49509
49509
  var import_geospatial6 = __toModule(require_es52());
49510
49510
 
49511
+ // ../tiles/node_modules/@probe.gl/stats/dist/utils/hi-res-timestamp.js
49512
+ function getHiResTimestamp3() {
49513
+ let timestamp;
49514
+ if (typeof window !== "undefined" && window.performance) {
49515
+ timestamp = window.performance.now();
49516
+ } else if (typeof process !== "undefined" && process.hrtime) {
49517
+ const timeParts = process.hrtime();
49518
+ timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
49519
+ } else {
49520
+ timestamp = Date.now();
49521
+ }
49522
+ return timestamp;
49523
+ }
49524
+
49525
+ // ../tiles/node_modules/@probe.gl/stats/dist/lib/stat.js
49526
+ var Stat2 = class {
49527
+ constructor(name10, type) {
49528
+ _defineProperty(this, "name", void 0);
49529
+ _defineProperty(this, "type", void 0);
49530
+ _defineProperty(this, "sampleSize", 1);
49531
+ _defineProperty(this, "time", 0);
49532
+ _defineProperty(this, "count", 0);
49533
+ _defineProperty(this, "samples", 0);
49534
+ _defineProperty(this, "lastTiming", 0);
49535
+ _defineProperty(this, "lastSampleTime", 0);
49536
+ _defineProperty(this, "lastSampleCount", 0);
49537
+ _defineProperty(this, "_count", 0);
49538
+ _defineProperty(this, "_time", 0);
49539
+ _defineProperty(this, "_samples", 0);
49540
+ _defineProperty(this, "_startTime", 0);
49541
+ _defineProperty(this, "_timerPending", false);
49542
+ this.name = name10;
49543
+ this.type = type;
49544
+ this.reset();
49545
+ }
49546
+ reset() {
49547
+ this.time = 0;
49548
+ this.count = 0;
49549
+ this.samples = 0;
49550
+ this.lastTiming = 0;
49551
+ this.lastSampleTime = 0;
49552
+ this.lastSampleCount = 0;
49553
+ this._count = 0;
49554
+ this._time = 0;
49555
+ this._samples = 0;
49556
+ this._startTime = 0;
49557
+ this._timerPending = false;
49558
+ return this;
49559
+ }
49560
+ setSampleSize(samples) {
49561
+ this.sampleSize = samples;
49562
+ return this;
49563
+ }
49564
+ incrementCount() {
49565
+ this.addCount(1);
49566
+ return this;
49567
+ }
49568
+ decrementCount() {
49569
+ this.subtractCount(1);
49570
+ return this;
49571
+ }
49572
+ addCount(value) {
49573
+ this._count += value;
49574
+ this._samples++;
49575
+ this._checkSampling();
49576
+ return this;
49577
+ }
49578
+ subtractCount(value) {
49579
+ this._count -= value;
49580
+ this._samples++;
49581
+ this._checkSampling();
49582
+ return this;
49583
+ }
49584
+ addTime(time) {
49585
+ this._time += time;
49586
+ this.lastTiming = time;
49587
+ this._samples++;
49588
+ this._checkSampling();
49589
+ return this;
49590
+ }
49591
+ timeStart() {
49592
+ this._startTime = getHiResTimestamp3();
49593
+ this._timerPending = true;
49594
+ return this;
49595
+ }
49596
+ timeEnd() {
49597
+ if (!this._timerPending) {
49598
+ return this;
49599
+ }
49600
+ this.addTime(getHiResTimestamp3() - this._startTime);
49601
+ this._timerPending = false;
49602
+ this._checkSampling();
49603
+ return this;
49604
+ }
49605
+ getSampleAverageCount() {
49606
+ return this.sampleSize > 0 ? this.lastSampleCount / this.sampleSize : 0;
49607
+ }
49608
+ getSampleAverageTime() {
49609
+ return this.sampleSize > 0 ? this.lastSampleTime / this.sampleSize : 0;
49610
+ }
49611
+ getSampleHz() {
49612
+ return this.lastSampleTime > 0 ? this.sampleSize / (this.lastSampleTime / 1e3) : 0;
49613
+ }
49614
+ getAverageCount() {
49615
+ return this.samples > 0 ? this.count / this.samples : 0;
49616
+ }
49617
+ getAverageTime() {
49618
+ return this.samples > 0 ? this.time / this.samples : 0;
49619
+ }
49620
+ getHz() {
49621
+ return this.time > 0 ? this.samples / (this.time / 1e3) : 0;
49622
+ }
49623
+ _checkSampling() {
49624
+ if (this._samples === this.sampleSize) {
49625
+ this.lastSampleTime = this._time;
49626
+ this.lastSampleCount = this._count;
49627
+ this.count += this._count;
49628
+ this.time += this._time;
49629
+ this.samples += this._samples;
49630
+ this._time = 0;
49631
+ this._count = 0;
49632
+ this._samples = 0;
49633
+ }
49634
+ }
49635
+ };
49636
+
49637
+ // ../tiles/node_modules/@probe.gl/stats/dist/lib/stats.js
49638
+ var Stats2 = class {
49639
+ constructor(options) {
49640
+ _defineProperty(this, "id", void 0);
49641
+ _defineProperty(this, "stats", {});
49642
+ this.id = options.id;
49643
+ this.stats = {};
49644
+ this._initializeStats(options.stats);
49645
+ Object.seal(this);
49646
+ }
49647
+ get(name10) {
49648
+ let type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "count";
49649
+ return this._getOrCreate({
49650
+ name: name10,
49651
+ type
49652
+ });
49653
+ }
49654
+ get size() {
49655
+ return Object.keys(this.stats).length;
49656
+ }
49657
+ reset() {
49658
+ for (const stat2 of Object.values(this.stats)) {
49659
+ stat2.reset();
49660
+ }
49661
+ return this;
49662
+ }
49663
+ forEach(fn) {
49664
+ for (const stat2 of Object.values(this.stats)) {
49665
+ fn(stat2);
49666
+ }
49667
+ }
49668
+ getTable() {
49669
+ const table = {};
49670
+ this.forEach((stat2) => {
49671
+ table[stat2.name] = {
49672
+ time: stat2.time || 0,
49673
+ count: stat2.count || 0,
49674
+ average: stat2.getAverageTime() || 0,
49675
+ hz: stat2.getHz() || 0
49676
+ };
49677
+ });
49678
+ return table;
49679
+ }
49680
+ _initializeStats() {
49681
+ let stats = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
49682
+ stats.forEach((stat2) => this._getOrCreate(stat2));
49683
+ }
49684
+ _getOrCreate(stat2) {
49685
+ const {
49686
+ name: name10,
49687
+ type
49688
+ } = stat2;
49689
+ let result = this.stats[name10];
49690
+ if (!result) {
49691
+ if (stat2 instanceof Stat2) {
49692
+ result = stat2;
49693
+ } else {
49694
+ result = new Stat2(name10, type);
49695
+ }
49696
+ this.stats[name10] = result;
49697
+ }
49698
+ return result;
49699
+ }
49700
+ };
49701
+
49511
49702
  // ../tiles/src/utils/doubly-linked-list-node.ts
49512
49703
  var DoublyLinkedListNode = class {
49513
49704
  constructor(item, previous, next) {
@@ -51074,7 +51265,7 @@ var Tileset3D = class {
51074
51265
  throttleRequests: this.options.throttleRequests,
51075
51266
  maxRequests: this.options.maxRequests
51076
51267
  });
51077
- this.stats = new Stats({ id: this.url });
51268
+ this.stats = new Stats2({ id: this.url });
51078
51269
  this._initializeStats();
51079
51270
  this.tilesetInitializationPromise = this._initializeTileSet(tileset);
51080
51271
  }
@@ -51091,8 +51282,7 @@ var Tileset3D = class {
51091
51282
  return this._frameNumber;
51092
51283
  }
51093
51284
  get queryParams() {
51094
- const search = new URLSearchParams(this._queryParams).toString();
51095
- return search ? `?${search}` : "";
51285
+ return new URLSearchParams(this._queryParams).toString();
51096
51286
  }
51097
51287
  setProps(props) {
51098
51288
  this.options = { ...this.options, ...props };
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports._typecheckI3SAttributesWorker = exports.Tile3dAttributesWorker = void 0;
7
7
  exports.transform3DTilesAttributesOnWorker = transform3DTilesAttributesOnWorker;
8
8
  var _workerUtils = require("@loaders.gl/worker-utils");
9
- var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
9
+ var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
10
10
  var Tile3dAttributesWorker = {
11
11
  id: '3d-tiles-attributes',
12
12
  name: '3DTiles Attributes Worker',
@@ -14,7 +14,7 @@ var _zip = require("@loaders.gl/zip");
14
14
  var _fileUtils = require("../lib/utils/file-utils");
15
15
  var _path = require("path");
16
16
  var _workerUtils = require("@loaders.gl/worker-utils");
17
- var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
17
+ var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
18
18
  var PGM_LINK = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip';
19
19
  var DepsInstaller = function () {
20
20
  function DepsInstaller() {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports._typecheckI3SAttributesWorker = exports.I3SAttributesWorker = void 0;
7
7
  exports.transformI3SAttributesOnWorker = transformI3SAttributesOnWorker;
8
8
  var _workerUtils = require("@loaders.gl/worker-utils");
9
- var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
9
+ var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
10
10
  var I3SAttributesWorker = {
11
11
  id: 'i3s-attributes',
12
12
  name: 'I3S Attributes Worker',
@@ -8,7 +8,7 @@ exports.PGMLoader = void 0;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _geoid = require("@math.gl/geoid");
11
- var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
11
+ var VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
12
12
  var PGMLoader = {
13
13
  name: 'PGM - Netpbm grayscale image format',
14
14
  id: 'pgm',
@@ -1,5 +1,5 @@
1
1
  import { processOnWorker } from '@loaders.gl/worker-utils';
2
- const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
2
+ const VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
3
3
  export const Tile3dAttributesWorker = {
4
4
  id: '3d-tiles-attributes',
5
5
  name: '3DTiles Attributes Worker',
@@ -3,7 +3,7 @@ import { ZipLoader } from '@loaders.gl/zip';
3
3
  import { writeFile } from '../lib/utils/file-utils';
4
4
  import { join } from 'path';
5
5
  import { ChildProcessProxy } from '@loaders.gl/worker-utils';
6
- const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
6
+ const VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
7
7
  const PGM_LINK = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip';
8
8
  export class DepsInstaller {
9
9
  async install() {
@@ -1,5 +1,5 @@
1
1
  import { processOnWorker } from '@loaders.gl/worker-utils';
2
- const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
2
+ const VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
3
3
  export const I3SAttributesWorker = {
4
4
  id: 'i3s-attributes',
5
5
  name: 'I3S Attributes Worker',
@@ -1,5 +1,5 @@
1
1
  import { parsePGM } from '@math.gl/geoid';
2
- const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
2
+ const VERSION = typeof "3.4.3" !== 'undefined' ? "3.4.3" : 'latest';
3
3
  export const PGMLoader = {
4
4
  name: 'PGM - Netpbm grayscale image format',
5
5
  id: 'pgm',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/tile-converter",
3
- "version": "3.4.1",
3
+ "version": "3.4.3",
4
4
  "description": "Converter",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -44,19 +44,19 @@
44
44
  "build-3d-tiles-attributes-worker": "esbuild src/workers/3d-tiles-attributes-worker.ts --outfile=dist/3d-tiles-attributes-worker.js --platform=node --target=esnext,node14 --external:join-images --minify --bundle --sourcemap --define:__VERSION__=\\\"$npm_package_version\\\""
45
45
  },
46
46
  "dependencies": {
47
- "@loaders.gl/3d-tiles": "3.4.1",
48
- "@loaders.gl/crypto": "3.4.1",
49
- "@loaders.gl/draco": "3.4.1",
50
- "@loaders.gl/gltf": "3.4.1",
51
- "@loaders.gl/i3s": "3.4.1",
52
- "@loaders.gl/images": "3.4.1",
53
- "@loaders.gl/loader-utils": "3.4.1",
54
- "@loaders.gl/polyfills": "3.4.1",
55
- "@loaders.gl/schema": "3.4.1",
56
- "@loaders.gl/textures": "3.4.1",
57
- "@loaders.gl/tiles": "3.4.1",
58
- "@loaders.gl/worker-utils": "3.4.1",
59
- "@loaders.gl/zip": "3.4.1",
47
+ "@loaders.gl/3d-tiles": "3.4.3",
48
+ "@loaders.gl/crypto": "3.4.3",
49
+ "@loaders.gl/draco": "3.4.3",
50
+ "@loaders.gl/gltf": "3.4.3",
51
+ "@loaders.gl/i3s": "3.4.3",
52
+ "@loaders.gl/images": "3.4.3",
53
+ "@loaders.gl/loader-utils": "3.4.3",
54
+ "@loaders.gl/polyfills": "3.4.3",
55
+ "@loaders.gl/schema": "3.4.3",
56
+ "@loaders.gl/textures": "3.4.3",
57
+ "@loaders.gl/tiles": "3.4.3",
58
+ "@loaders.gl/worker-utils": "3.4.3",
59
+ "@loaders.gl/zip": "3.4.3",
60
60
  "@math.gl/core": "^3.5.1",
61
61
  "@math.gl/culling": "^3.5.1",
62
62
  "@math.gl/geoid": "^3.5.1",
@@ -79,5 +79,5 @@
79
79
  "join-images": "^1.1.3",
80
80
  "sharp": "^0.31.3"
81
81
  },
82
- "gitHead": "2c39d1032c1a8b3678a6f09507b89ffe92ca9e1b"
82
+ "gitHead": "e60626daeaec1e08eae0009668736f85410f8323"
83
83
  }