@luma.gl/core 9.0.5 → 9.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,6 +66,10 @@ export declare abstract class RenderPipeline extends Resource<RenderPipelineProp
66
66
  abstract draw(options: {
67
67
  /** Render pass to draw into (targeting screen or framebuffer) */
68
68
  renderPass?: RenderPass;
69
+ /** Parameters to be set during draw call. Note that most parameters can only be overridden in WebGL. */
70
+ parameters?: RenderPipelineParameters;
71
+ /** Topology. Note can only be overridden in WebGL. */
72
+ topology?: PrimitiveTopology;
69
73
  /** vertex attributes */
70
74
  vertexArray: VertexArray;
71
75
  /** Number of "rows" in index buffer */
@@ -1 +1 @@
1
- {"version":3,"file":"render-pipeline.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/render-pipeline.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,MAAM,EAAC,qBAAkB;AACtC,OAAO,KAAK,EAAC,YAAY,EAAC,0BAAuB;AACjD,OAAO,KAAK,EAAC,iBAAiB,EAAE,wBAAwB,EAAC,+BAA4B;AACrF,OAAO,KAAK,EAAC,YAAY,EAAE,OAAO,EAAC,kCAA+B;AAClE,OAAO,KAAK,EAAC,YAAY,EAAC,kCAA+B;AAEzD,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,sBAAmB;AACnD,OAAO,KAAK,EAAC,MAAM,EAAC,oBAAiB;AACrC,OAAO,KAAK,EAAC,UAAU,EAAC,yBAAsB;AAC9C,OAAO,EAAC,WAAW,EAAC,0BAAuB;AAC3C,OAAO,EAAC,iBAAiB,EAAC,gCAA6B;AAEvD,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG;IAGhD,6BAA6B;IAC7B,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qGAAqG;IACrG,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,E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,+BAA+B;QAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,kCAAkC;QAClC,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,sCAAsC;QACtC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;KACvC,GAAG,OAAO;IAIX;;;;;OAKG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,IAAI;CAG/D"}
@@ -113,6 +113,8 @@ export type RenderPassParameters = {
113
113
  blendConstant?: number[];
114
114
  /** Stencil operation "replace" sets the value to stencilReference */
115
115
  stencilReference?: number;
116
+ /** Bitmask controlling which channels are are written to when drawing/clearing. defaulting to 0xF */
117
+ colorMask?: number;
116
118
  };
117
119
  export type RenderPipelineParameters = RasterizationParameters & DepthStencilParameters & ColorParameters & MultisampleParameters;
118
120
  export type Parameters = _RenderParameters & DepthStencilParameters & ColorParameters & MultisampleParameters;
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../src/adapter/types/parameters.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,yBAAyB,EAAC,6BAA0B;AAE5D,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,MAAM,GACN,OAAO,GACP,YAAY,GACZ,SAAS,GACT,WAAW,GACX,eAAe,GACf,QAAQ,CAAC;AAIb,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,WAAW,GACX,YAAY;AACd,kBAAkB;GAChB,iBAAiB,GACjB,eAAe,GACf,gBAAgB;AAClB,kBAAkB;GAChB,oBAAoB,CAAC;AAEzB,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE9C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AACjD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,IAAI,CAAC;AACrC,MAAM,MAAM,WAAW,GAAG,M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AC"}
package/dist/dist.dev.js CHANGED
@@ -97,39 +97,37 @@ var __exports__ = (() => {
97
97
  uid: () => uid
98
98
  });
99
99
 
100
+ // ../../node_modules/@probe.gl/env/dist/lib/globals.js
101
+ var window_ = globalThis;
102
+ var document_ = globalThis.document || {};
103
+ var process_ = globalThis.process || {};
104
+ var console_ = globalThis.console;
105
+ var navigator_ = globalThis.navigator || {};
106
+
100
107
  // ../../node_modules/@probe.gl/env/dist/lib/is-electron.js
101
108
  function isElectron(mockUserAgent) {
102
- if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
109
+ if (typeof window !== "undefined" && window.process?.type === "renderer") {
103
110
  return true;
104
111
  }
105
- if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions["electron"])) {
112
+ if (typeof process !== "undefined" && Boolean(process.versions?.["electron"])) {
106
113
  return true;
107
114
  }
108
- const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
115
+ const realUserAgent = typeof navigator !== "undefined" && navigator.userAgent;
109
116
  const userAgent = mockUserAgent || realUserAgent;
110
- if (userAgent && userAgent.indexOf("Electron") >= 0) {
111
- return true;
112
- }
113
- return false;
117
+ return Boolean(userAgent && userAgent.indexOf("Electron") >= 0);
114
118
  }
115
119
 
116
120
  // ../../node_modules/@probe.gl/env/dist/lib/is-browser.js
117
121
  function isBrowser() {
118
- const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
122
+ const isNode = (
123
+ // @ts-expect-error
124
+ typeof process === "object" && String(process) === "[object process]" && !process?.browser
125
+ );
119
126
  return !isNode || isElectron();
120
127
  }
121
128
 
122
- // ../../node_modules/@probe.gl/env/dist/lib/globals.js
123
- var self_ = globalThis.self || globalThis.window || globalThis.global;
124
- var window_ = globalThis.window || globalThis.self || globalThis.global;
125
- var document_ = globalThis.document || {};
126
- var process_ = globalThis.process || {};
127
- var console_ = globalThis.console;
128
- var navigator_ = globalThis.navigator || {};
129
-
130
- // ../../node_modules/@probe.gl/env/dist/utils/globals.js
131
- var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
132
- var isBrowser2 = isBrowser();
129
+ // ../../node_modules/@probe.gl/env/dist/index.js
130
+ var VERSION = true ? "4.0.7" : "untranspiled source";
133
131
 
134
132
  // ../../node_modules/@probe.gl/log/dist/utils/local-storage.js
135
133
  function getStorage(type) {
@@ -144,11 +142,7 @@ var __exports__ = (() => {
144
142
  }
145
143
  }
146
144
  var LocalStorage = class {
147
- constructor(id, defaultConfig) {
148
- let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
149
- this.storage = void 0;
150
- this.id = void 0;
151
- this.config = void 0;
145
+ constructor(id, defaultConfig, type = "sessionStorage") {
152
146
  this.storage = getStorage(type);
153
147
  this.id = id;
154
148
  this.config = defaultConfig;
@@ -164,6 +158,7 @@ var __exports__ = (() => {
164
158
  this.storage.setItem(this.id, serialized);
165
159
  }
166
160
  }
161
+ // Get config from persistent store, if available
167
162
  _loadConfiguration() {
168
163
  let configuration = {};
169
164
  if (this.storage) {
@@ -189,22 +184,10 @@ var __exports__ = (() => {
189
184
  }
190
185
  return formatted;
191
186
  }
192
- function leftPad(string) {
193
- let length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 8;
187
+ function leftPad(string, length = 8) {
194
188
  const padLength = Math.max(length - string.length, 0);
195
189
  return `${" ".repeat(padLength)}${string}`;
196
190
  }
197
- function formatImage(image, message, scale) {
198
- let maxWidth = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 600;
199
- const imageUrl = image.src.replace(/\(/g, "%28").replace(/\)/g, "%29");
200
- if (image.width > maxWidth) {
201
- scale = Math.min(scale, maxWidth / image.width);
202
- }
203
- const width = image.width * scale;
204
- const height = image.height * scale;
205
- const style = ["font-size:1px;", `padding:${Math.floor(height / 2)}px ${Math.floor(width / 2)}px;`, `line-height:${height}px;`, `background:url(${imageUrl});`, `background-size:${width}px ${height}px;`, "color:transparent;"].join("");
206
- return [`${message} %c+`, style];
207
- }
208
191
 
209
192
  // ../../node_modules/@probe.gl/log/dist/utils/color.js
210
193
  var COLOR;
@@ -249,8 +232,7 @@ var __exports__ = (() => {
249
232
  }
250
233
 
251
234
  // ../../node_modules/@probe.gl/log/dist/utils/autobind.js
252
- function autobind(obj) {
253
- let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
235
+ function autobind(obj, predefined = ["constructor"]) {
254
236
  const proto = Object.getPrototypeOf(obj);
255
237
  const propNames = Object.getOwnPropertyNames(proto);
256
238
  const object = obj;
@@ -275,11 +257,9 @@ var __exports__ = (() => {
275
257
  function getHiResTimestamp() {
276
258
  let timestamp;
277
259
  if (isBrowser() && window_.performance) {
278
- var _window$performance, _window$performance$n;
279
- timestamp = window_ === null || window_ === void 0 ? void 0 : (_window$performance = window_.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);
260
+ timestamp = window_?.performance?.now?.();
280
261
  } else if ("hrtime" in process_) {
281
- var _process$hrtime;
282
- const timeParts = process_ === null || process_ === void 0 ? void 0 : (_process$hrtime = process_.hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(process_);
262
+ const timeParts = process_?.hrtime?.();
283
263
  timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
284
264
  } else {
285
265
  timestamp = Date.now();
@@ -302,21 +282,12 @@ var __exports__ = (() => {
302
282
  function noop() {
303
283
  }
304
284
  var cache = {};
305
- var ONCE = {
306
- once: true
307
- };
285
+ var ONCE = { once: true };
308
286
  var Log = class {
309
- constructor() {
310
- let {
311
- id
312
- } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
313
- id: ""
314
- };
315
- this.id = void 0;
287
+ constructor({ id } = { id: "" }) {
316
288
  this.VERSION = VERSION;
317
289
  this._startTs = getHiResTimestamp();
318
290
  this._deltaTs = getHiResTimestamp();
319
- this._storage = void 0;
320
291
  this.userData = {};
321
292
  this.LOG_THROTTLE_TIMEOUT = 0;
322
293
  this.id = id;
@@ -338,42 +309,44 @@ var __exports__ = (() => {
338
309
  getLevel() {
339
310
  return this._storage.config.level;
340
311
  }
312
+ /** @return milliseconds, with fractions */
341
313
  getTotal() {
342
314
  return Number((getHiResTimestamp() - this._startTs).toPrecision(10));
343
315
  }
316
+ /** @return milliseconds, with fractions */
344
317
  getDelta() {
345
318
  return Number((getHiResTimestamp() - this._deltaTs).toPrecision(10));
346
319
  }
320
+ /** @deprecated use logLevel */
347
321
  set priority(newPriority) {
348
322
  this.level = newPriority;
349
323
  }
324
+ /** @deprecated use logLevel */
350
325
  get priority() {
351
326
  return this.level;
352
327
  }
328
+ /** @deprecated use logLevel */
353
329
  getPriority() {
354
330
  return this.level;
355
331
  }
356
- enable() {
357
- let enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
358
- this._storage.setConfiguration({
359
- enabled
360
- });
332
+ // Configure
333
+ enable(enabled = true) {
334
+ this._storage.setConfiguration({ enabled });
361
335
  return this;
362
336
  }
363
337
  setLevel(level) {
364
- this._storage.setConfiguration({
365
- level
366
- });
338
+ this._storage.setConfiguration({ level });
367
339
  return this;
368
340
  }
341
+ /** return the current status of the setting */
369
342
  get(setting) {
370
343
  return this._storage.config[setting];
371
344
  }
345
+ // update the status of the setting
372
346
  set(setting, value) {
373
- this._storage.setConfiguration({
374
- [setting]: value
375
- });
347
+ this._storage.setConfiguration({ [setting]: value });
376
348
  }
349
+ /** Logs the current settings as a table */
377
350
  settings() {
378
351
  if (console.table) {
379
352
  console.table(this._storage.config);
@@ -381,8 +354,11 @@ var __exports__ = (() => {
381
354
  console.log(this._storage.config);
382
355
  }
383
356
  }
357
+ // Unconditional logging
384
358
  assert(condition, message) {
385
- assert(condition, message);
359
+ if (!condition) {
360
+ throw new Error(message || "Assertion failed");
361
+ }
386
362
  }
387
363
  warn(message) {
388
364
  return this._getLogFunction(0, message, originalConsole.warn, arguments, ONCE);
@@ -390,9 +366,11 @@ var __exports__ = (() => {
390
366
  error(message) {
391
367
  return this._getLogFunction(0, message, originalConsole.error, arguments);
392
368
  }
369
+ /** Print a deprecation warning */
393
370
  deprecated(oldUsage, newUsage) {
394
371
  return this.warn(`\`${oldUsage}\` is deprecated and will be removed in a later version. Use \`${newUsage}\` instead`);
395
372
  }
373
+ /** Print a removal warning */
396
374
  removed(oldUsage, newUsage) {
397
375
  return this.error(`\`${oldUsage}\` has been removed. Use \`${newUsage}\` instead`);
398
376
  }
@@ -411,6 +389,7 @@ var __exports__ = (() => {
411
389
  once(logLevel, message) {
412
390
  return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
413
391
  }
392
+ /** Logs an object as a table */
414
393
  table(logLevel, table, columns) {
415
394
  if (table) {
416
395
  return this._getLogFunction(logLevel, table, console.table || noop, columns && [columns], {
@@ -419,27 +398,6 @@ var __exports__ = (() => {
419
398
  }
420
399
  return noop;
421
400
  }
422
- image(_ref) {
423
- let {
424
- logLevel,
425
- priority,
426
- image,
427
- message = "",
428
- scale = 1
429
- } = _ref;
430
- if (!this._shouldLog(logLevel || priority)) {
431
- return noop;
432
- }
433
- return isBrowser() ? logImageInBrowser({
434
- image,
435
- message,
436
- scale
437
- }) : logImageInNode({
438
- image,
439
- message,
440
- scale
441
- });
442
- }
443
401
  time(logLevel, message) {
444
402
  return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
445
403
  }
@@ -449,30 +407,19 @@ var __exports__ = (() => {
449
407
  timeStamp(logLevel, message) {
450
408
  return this._getLogFunction(logLevel, message, console.timeStamp || noop);
451
409
  }
452
- group(logLevel, message) {
453
- let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
454
- collapsed: false
455
- };
456
- const options = normalizeArguments({
457
- logLevel,
458
- message,
459
- opts
460
- });
461
- const {
462
- collapsed
463
- } = opts;
410
+ group(logLevel, message, opts = { collapsed: false }) {
411
+ const options = normalizeArguments({ logLevel, message, opts });
412
+ const { collapsed } = opts;
464
413
  options.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
465
414
  return this._getLogFunction(options);
466
415
  }
467
- groupCollapsed(logLevel, message) {
468
- let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
469
- return this.group(logLevel, message, Object.assign({}, opts, {
470
- collapsed: true
471
- }));
416
+ groupCollapsed(logLevel, message, opts = {}) {
417
+ return this.group(logLevel, message, Object.assign({}, opts, { collapsed: true }));
472
418
  }
473
419
  groupEnd(logLevel) {
474
420
  return this._getLogFunction(logLevel, "", console.groupEnd || noop);
475
421
  }
422
+ // EXPERIMENTAL
476
423
  withGroup(logLevel, message, func) {
477
424
  this.group(logLevel, message)();
478
425
  try {
@@ -486,17 +433,14 @@ var __exports__ = (() => {
486
433
  console.trace();
487
434
  }
488
435
  }
436
+ // PRIVATE METHODS
437
+ /** Deduces log level from a variety of arguments */
489
438
  _shouldLog(logLevel) {
490
439
  return this.isEnabled() && this.getLevel() >= normalizeLogLevel(logLevel);
491
440
  }
492
441
  _getLogFunction(logLevel, message, method, args, opts) {
493
442
  if (this._shouldLog(logLevel)) {
494
- opts = normalizeArguments({
495
- logLevel,
496
- message,
497
- args,
498
- opts
499
- });
443
+ opts = normalizeArguments({ logLevel, message, args, opts });
500
444
  method = method || opts.method;
501
445
  assert(method);
502
446
  opts.total = this.getTotal();
@@ -536,10 +480,7 @@ var __exports__ = (() => {
536
480
  return resolvedLevel;
537
481
  }
538
482
  function normalizeArguments(opts) {
539
- const {
540
- logLevel,
541
- message
542
- } = opts;
483
+ const { logLevel, message } = opts;
543
484
  opts.logLevel = normalizeLogLevel(logLevel);
544
485
  const args = opts.args ? Array.from(opts.args) : [];
545
486
  while (args.length && args.shift() !== message) {
@@ -562,9 +503,7 @@ var __exports__ = (() => {
562
503
  }
563
504
  const messageType = typeof opts.message;
564
505
  assert(messageType === "string" || messageType === "object");
565
- return Object.assign(opts, {
566
- args
567
- }, opts.opts);
506
+ return Object.assign(opts, { args }, opts.opts);
568
507
  }
569
508
  function decorateMessage(id, message, opts) {
570
509
  if (typeof message === "string") {
@@ -574,43 +513,6 @@ var __exports__ = (() => {
574
513
  }
575
514
  return message;
576
515
  }
577
- function logImageInNode(_ref2) {
578
- let {
579
- image,
580
- message = "",
581
- scale = 1
582
- } = _ref2;
583
- console.warn("removed");
584
- return noop;
585
- }
586
- function logImageInBrowser(_ref3) {
587
- let {
588
- image,
589
- message = "",
590
- scale = 1
591
- } = _ref3;
592
- if (typeof image === "string") {
593
- const img = new Image();
594
- img.onload = () => {
595
- const args = formatImage(img, message, scale);
596
- console.log(...args);
597
- };
598
- img.src = image;
599
- return noop;
600
- }
601
- const element = image.nodeName || "";
602
- if (element.toLowerCase() === "img") {
603
- console.log(...formatImage(image, message, scale));
604
- return noop;
605
- }
606
- if (element.toLowerCase() === "canvas") {
607
- const img = new Image();
608
- img.onload = () => console.log(...formatImage(img, message, scale));
609
- img.src = image.toDataURL();
610
- return noop;
611
- }
612
- return noop;
613
- }
614
516
  function getTableHeader(table) {
615
517
  for (const key in table) {
616
518
  for (const title in table[key]) {
@@ -620,10 +522,11 @@ var __exports__ = (() => {
620
522
  return "empty";
621
523
  }
622
524
 
525
+ // ../../node_modules/@probe.gl/log/dist/init.js
526
+ globalThis.probe = {};
527
+
623
528
  // ../../node_modules/@probe.gl/log/dist/index.js
624
- var dist_default = new Log({
625
- id: "@probe.gl/log"
626
- });
529
+ var dist_default = new Log({ id: "@probe.gl/log" });
627
530
 
628
531
  // src/utils/log.ts
629
532
  var log = new Log({ id: "luma.gl" });
@@ -645,8 +548,6 @@ var __exports__ = (() => {
645
548
  // ../../node_modules/@probe.gl/stats/dist/lib/stat.js
646
549
  var Stat = class {
647
550
  constructor(name2, type) {
648
- this.name = void 0;
649
- this.type = void 0;
650
551
  this.sampleSize = 1;
651
552
  this.time = 0;
652
553
  this.count = 0;
@@ -681,26 +582,31 @@ var __exports__ = (() => {
681
582
  this.sampleSize = samples;
682
583
  return this;
683
584
  }
585
+ /** Call to increment count (+1) */
684
586
  incrementCount() {
685
587
  this.addCount(1);
686
588
  return this;
687
589
  }
590
+ /** Call to decrement count (-1) */
688
591
  decrementCount() {
689
592
  this.subtractCount(1);
690
593
  return this;
691
594
  }
595
+ /** Increase count */
692
596
  addCount(value) {
693
597
  this._count += value;
694
598
  this._samples++;
695
599
  this._checkSampling();
696
600
  return this;
697
601
  }
602
+ /** Decrease count */
698
603
  subtractCount(value) {
699
604
  this._count -= value;
700
605
  this._samples++;
701
606
  this._checkSampling();
702
607
  return this;
703
608
  }
609
+ /** Add an arbitrary timing and bump the count */
704
610
  addTime(time) {
705
611
  this._time += time;
706
612
  this.lastTiming = time;
@@ -708,11 +614,13 @@ var __exports__ = (() => {
708
614
  this._checkSampling();
709
615
  return this;
710
616
  }
617
+ /** Start a timer */
711
618
  timeStart() {
712
619
  this._startTime = getHiResTimestamp2();
713
620
  this._timerPending = true;
714
621
  return this;
715
622
  }
623
+ /** End a timer. Adds to time and bumps the timing count. */
716
624
  timeEnd() {
717
625
  if (!this._timerPending) {
718
626
  return this;
@@ -725,18 +633,22 @@ var __exports__ = (() => {
725
633
  getSampleAverageCount() {
726
634
  return this.sampleSize > 0 ? this.lastSampleCount / this.sampleSize : 0;
727
635
  }
636
+ /** Calculate average time / count for the previous window */
728
637
  getSampleAverageTime() {
729
638
  return this.sampleSize > 0 ? this.lastSampleTime / this.sampleSize : 0;
730
639
  }
640
+ /** Calculate counts per second for the previous window */
731
641
  getSampleHz() {
732
642
  return this.lastSampleTime > 0 ? this.sampleSize / (this.lastSampleTime / 1e3) : 0;
733
643
  }
734
644
  getAverageCount() {
735
645
  return this.samples > 0 ? this.count / this.samples : 0;
736
646
  }
647
+ /** Calculate average time / count */
737
648
  getAverageTime() {
738
649
  return this.samples > 0 ? this.time / this.samples : 0;
739
650
  }
651
+ /** Calculate counts per second */
740
652
  getHz() {
741
653
  return this.time > 0 ? this.samples / (this.time / 1e3) : 0;
742
654
  }
@@ -757,23 +669,20 @@ var __exports__ = (() => {
757
669
  // ../../node_modules/@probe.gl/stats/dist/lib/stats.js
758
670
  var Stats = class {
759
671
  constructor(options) {
760
- this.id = void 0;
761
672
  this.stats = {};
762
673
  this.id = options.id;
763
674
  this.stats = {};
764
675
  this._initializeStats(options.stats);
765
676
  Object.seal(this);
766
677
  }
767
- get(name2) {
768
- let type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "count";
769
- return this._getOrCreate({
770
- name: name2,
771
- type
772
- });
678
+ /** Acquire a stat. Create if it doesn't exist. */
679
+ get(name2, type = "count") {
680
+ return this._getOrCreate({ name: name2, type });
773
681
  }
774
682
  get size() {
775
683
  return Object.keys(this.stats).length;
776
684
  }
685
+ /** Reset all stats */
777
686
  reset() {
778
687
  for (const stat of Object.values(this.stats)) {
779
688
  stat.reset();
@@ -797,15 +706,11 @@ var __exports__ = (() => {
797
706
  });
798
707
  return table;
799
708
  }
800
- _initializeStats() {
801
- let stats = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
709
+ _initializeStats(stats = []) {
802
710
  stats.forEach((stat) => this._getOrCreate(stat));
803
711
  }
804
712
  _getOrCreate(stat) {
805
- const {
806
- name: name2,
807
- type
808
- } = stat;
713
+ const { name: name2, type } = stat;
809
714
  let result = this.stats[name2];
810
715
  if (!result) {
811
716
  if (stat instanceof Stat) {