@luma.gl/webgl 8.5.15 → 8.5.17
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.js +692 -816
- package/dist/dist.min.js +1 -1
- package/dist/es5/classes/accessor.js +31 -33
- package/dist/es5/classes/accessor.js.map +1 -1
- package/dist/es5/classes/buffer.js +24 -26
- package/dist/es5/classes/buffer.js.map +1 -1
- package/dist/es5/classes/clear.js.map +1 -1
- package/dist/es5/classes/copy-and-blit.js +3 -3
- package/dist/es5/classes/copy-and-blit.js.map +1 -1
- package/dist/es5/classes/framebuffer.js +70 -72
- package/dist/es5/classes/framebuffer.js.map +1 -1
- package/dist/es5/classes/program-configuration.js.map +1 -1
- package/dist/es5/classes/program.js +11 -13
- package/dist/es5/classes/program.js.map +1 -1
- package/dist/es5/classes/query.js +47 -49
- package/dist/es5/classes/query.js.map +1 -1
- package/dist/es5/classes/renderbuffer.js +37 -39
- package/dist/es5/classes/renderbuffer.js.map +1 -1
- package/dist/es5/classes/resource.js +29 -32
- package/dist/es5/classes/resource.js.map +1 -1
- package/dist/es5/classes/shader.js +38 -44
- package/dist/es5/classes/shader.js.map +1 -1
- package/dist/es5/classes/texture-2d.js +16 -17
- package/dist/es5/classes/texture-2d.js.map +1 -1
- package/dist/es5/classes/texture-3d.js +15 -17
- package/dist/es5/classes/texture-3d.js.map +1 -1
- package/dist/es5/classes/texture-cube.js +10 -12
- package/dist/es5/classes/texture-cube.js.map +1 -1
- package/dist/es5/classes/texture-formats.js +1 -1
- package/dist/es5/classes/texture.js +24 -26
- package/dist/es5/classes/texture.js.map +1 -1
- package/dist/es5/classes/transform-feedback.js +16 -22
- package/dist/es5/classes/transform-feedback.js.map +1 -1
- package/dist/es5/classes/uniform-buffer-layout.js.map +1 -1
- package/dist/es5/classes/uniforms.js +2 -2
- package/dist/es5/classes/vertex-array-object.js +69 -71
- package/dist/es5/classes/vertex-array-object.js.map +1 -1
- package/dist/es5/classes/vertex-array.js.map +1 -1
- package/dist/es5/debug/debug-program-configuration.js +1 -1
- package/dist/es5/debug/debug-program-configuration.js.map +1 -1
- package/dist/es5/debug/debug-uniforms.js +1 -1
- package/dist/es5/debug/debug-vertex-array.js.map +1 -1
- package/dist/es5/features/features.js +2 -2
- package/dist/es5/features/index.js +16 -16
- package/dist/es5/features/limits.js +1 -1
- package/dist/es5/glsl-utils/format-glsl-error.js.map +1 -1
- package/dist/es5/glsl-utils/index.js +11 -7
- package/dist/es5/index.js +104 -104
- package/dist/es5/init.d.ts +1 -1
- package/dist/es5/init.js +4 -4
- package/dist/es5/init.js.map +1 -1
- package/dist/es5/utils/array-utils-flat.js +2 -2
- package/dist/es5/utils/check-props.js.map +1 -1
- package/dist/es5/utils/format-value.js.map +1 -1
- package/dist/es5/utils/load-file.js +1 -1
- package/dist/es5/utils/utils.js +2 -2
- package/dist/es5/webgl-utils/attribute-utils.js +3 -3
- package/dist/es5/webgl-utils/attribute-utils.js.map +1 -1
- package/dist/es5/webgl-utils/constants-to-keys.js +1 -1
- package/dist/es5/webgl-utils/get-error.js +1 -1
- package/dist/es5/webgl-utils/request-animation-frame.js +1 -1
- package/dist/es5/webgl-utils/texture-utils.js.map +1 -1
- package/dist/es5/webgl-utils/typed-array-utils.js +1 -1
- package/dist/esm/classes/accessor.js +12 -3
- package/dist/esm/classes/accessor.js.map +1 -1
- package/dist/esm/classes/buffer.js +41 -28
- package/dist/esm/classes/buffer.js.map +1 -1
- package/dist/esm/classes/clear.js +14 -12
- package/dist/esm/classes/clear.js.map +1 -1
- package/dist/esm/classes/copy-and-blit.js +27 -21
- package/dist/esm/classes/copy-and-blit.js.map +1 -1
- package/dist/esm/classes/framebuffer.js +89 -64
- package/dist/esm/classes/framebuffer.js.map +1 -1
- package/dist/esm/classes/program.js +40 -32
- package/dist/esm/classes/program.js.map +1 -1
- package/dist/esm/classes/query.js +11 -6
- package/dist/esm/classes/query.js.map +1 -1
- package/dist/esm/classes/renderbuffer.js +25 -19
- package/dist/esm/classes/renderbuffer.js.map +1 -1
- package/dist/esm/classes/resource.js +39 -28
- package/dist/esm/classes/resource.js.map +1 -1
- package/dist/esm/classes/shader.js +13 -10
- package/dist/esm/classes/shader.js.map +1 -1
- package/dist/esm/classes/texture-2d.js +2 -1
- package/dist/esm/classes/texture-2d.js.map +1 -1
- package/dist/esm/classes/texture-3d.js +17 -14
- package/dist/esm/classes/texture-3d.js.map +1 -1
- package/dist/esm/classes/texture-cube.js +23 -19
- package/dist/esm/classes/texture-cube.js.map +1 -1
- package/dist/esm/classes/texture.js +47 -35
- package/dist/esm/classes/texture.js.map +1 -1
- package/dist/esm/classes/transform-feedback.js +12 -6
- package/dist/esm/classes/transform-feedback.js.map +1 -1
- package/dist/esm/classes/uniforms.js +6 -6
- package/dist/esm/classes/uniforms.js.map +1 -1
- package/dist/esm/classes/vertex-array-object.js +17 -9
- package/dist/esm/classes/vertex-array-object.js.map +1 -1
- package/dist/esm/classes/vertex-array.js +17 -7
- package/dist/esm/classes/vertex-array.js.map +1 -1
- package/dist/esm/debug/debug-program-configuration.js +4 -4
- package/dist/esm/debug/debug-program-configuration.js.map +1 -1
- package/dist/esm/debug/debug-uniforms.js +16 -14
- package/dist/esm/debug/debug-uniforms.js.map +1 -1
- package/dist/esm/debug/debug-vertex-array.js +16 -14
- package/dist/esm/debug/debug-vertex-array.js.map +1 -1
- package/dist/esm/features/check-glsl-extension.js +3 -2
- package/dist/esm/features/check-glsl-extension.js.map +1 -1
- package/dist/esm/features/check-old-ie.js +2 -1
- package/dist/esm/features/check-old-ie.js.map +1 -1
- package/dist/esm/features/features.js +1 -1
- package/dist/esm/features/features.js.map +1 -1
- package/dist/esm/features/webgl-features-table.js +1 -1
- package/dist/esm/features/webgl-features-table.js.map +1 -1
- package/dist/esm/glsl-utils/format-glsl-error.js +9 -7
- package/dist/esm/glsl-utils/format-glsl-error.js.map +1 -1
- package/dist/esm/glsl-utils/get-shader-name.js +2 -1
- package/dist/esm/glsl-utils/get-shader-name.js.map +1 -1
- package/dist/esm/init.d.ts +1 -1
- package/dist/esm/init.js +4 -4
- package/dist/esm/init.js.map +1 -1
- package/dist/esm/utils/array-utils-flat.js +7 -6
- package/dist/esm/utils/array-utils-flat.js.map +1 -1
- package/dist/esm/utils/check-props.js +4 -4
- package/dist/esm/utils/check-props.js.map +1 -1
- package/dist/esm/utils/format-value.js +4 -3
- package/dist/esm/utils/format-value.js.map +1 -1
- package/dist/esm/utils/is-old-ie.js +2 -1
- package/dist/esm/utils/is-old-ie.js.map +1 -1
- package/dist/esm/utils/load-file.js +3 -2
- package/dist/esm/utils/load-file.js.map +1 -1
- package/dist/esm/utils/stub-methods.js +2 -3
- package/dist/esm/utils/stub-methods.js.map +1 -1
- package/dist/esm/utils/utils.js +3 -2
- package/dist/esm/utils/utils.js.map +1 -1
- package/dist/esm/webgl-utils/attribute-utils.js +11 -8
- package/dist/esm/webgl-utils/attribute-utils.js.map +1 -1
- package/dist/esm/webgl-utils/constants-to-keys.js +3 -3
- package/dist/esm/webgl-utils/constants-to-keys.js.map +1 -1
- package/dist/esm/webgl-utils/get-error.js +1 -1
- package/dist/esm/webgl-utils/get-error.js.map +1 -1
- package/dist/esm/webgl-utils/texture-utils.js +1 -1
- package/dist/esm/webgl-utils/texture-utils.js.map +1 -1
- package/dist/esm/webgl-utils/typed-array-utils.js +19 -15
- package/dist/esm/webgl-utils/typed-array-utils.js.map +1 -1
- package/package.json +5 -5
- package/src/classes/framebuffer.js +1 -0
- package/src/classes/resource.js +11 -19
- package/src/classes/transform-feedback.js +1 -1
- package/src/classes/vertex-array-object.js +1 -1
- package/src/init.d.ts +1 -1
- package/src/init.js +1 -1
- package/src/webgl-utils/texture-utils.js +2 -0
package/dist/dist.js
CHANGED
|
@@ -96,10 +96,37 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
96
96
|
/************************************************************************/
|
|
97
97
|
/******/ ({
|
|
98
98
|
|
|
99
|
+
/***/ "../../node_modules/@babel/runtime/helpers/esm/defineProperty.js":
|
|
100
|
+
/*!************************************************************************************************!*\
|
|
101
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
|
|
102
|
+
\************************************************************************************************/
|
|
103
|
+
/*! exports provided: default */
|
|
104
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
105
|
+
|
|
106
|
+
"use strict";
|
|
107
|
+
__webpack_require__.r(__webpack_exports__);
|
|
108
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _defineProperty; });
|
|
109
|
+
function _defineProperty(obj, key, value) {
|
|
110
|
+
if (key in obj) {
|
|
111
|
+
Object.defineProperty(obj, key, {
|
|
112
|
+
value: value,
|
|
113
|
+
enumerable: true,
|
|
114
|
+
configurable: true,
|
|
115
|
+
writable: true
|
|
116
|
+
});
|
|
117
|
+
} else {
|
|
118
|
+
obj[key] = value;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return obj;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/***/ }),
|
|
125
|
+
|
|
99
126
|
/***/ "../../node_modules/@probe.gl/env/dist/esm/index.js":
|
|
100
|
-
|
|
101
|
-
!*** /Users/
|
|
102
|
-
|
|
127
|
+
/*!***********************************************************************************!*\
|
|
128
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/env/dist/esm/index.js ***!
|
|
129
|
+
\***********************************************************************************/
|
|
103
130
|
/*! exports provided: VERSION, self, window, global, document, process, console, isBrowser, isBrowserMainThread, getBrowser, isMobile, isElectron, assert */
|
|
104
131
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
105
132
|
|
|
@@ -148,9 +175,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
148
175
|
/***/ }),
|
|
149
176
|
|
|
150
177
|
/***/ "../../node_modules/@probe.gl/env/dist/esm/lib/get-browser.js":
|
|
151
|
-
|
|
152
|
-
!*** /Users/
|
|
153
|
-
|
|
178
|
+
/*!*********************************************************************************************!*\
|
|
179
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/env/dist/esm/lib/get-browser.js ***!
|
|
180
|
+
\*********************************************************************************************/
|
|
154
181
|
/*! exports provided: isMobile, default */
|
|
155
182
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
156
183
|
|
|
@@ -208,9 +235,9 @@ function getBrowser(mockUserAgent) {
|
|
|
208
235
|
/***/ }),
|
|
209
236
|
|
|
210
237
|
/***/ "../../node_modules/@probe.gl/env/dist/esm/lib/globals.js":
|
|
211
|
-
|
|
212
|
-
!*** /Users/
|
|
213
|
-
|
|
238
|
+
/*!*****************************************************************************************!*\
|
|
239
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/env/dist/esm/lib/globals.js ***!
|
|
240
|
+
\*****************************************************************************************/
|
|
214
241
|
/*! exports provided: self, window, global, document, process, console */
|
|
215
242
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
216
243
|
|
|
@@ -242,9 +269,9 @@ const console_ = console;
|
|
|
242
269
|
/***/ }),
|
|
243
270
|
|
|
244
271
|
/***/ "../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js":
|
|
245
|
-
|
|
246
|
-
!*** /Users/
|
|
247
|
-
|
|
272
|
+
/*!********************************************************************************************!*\
|
|
273
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/env/dist/esm/lib/is-browser.js ***!
|
|
274
|
+
\********************************************************************************************/
|
|
248
275
|
/*! exports provided: default, isBrowserMainThread */
|
|
249
276
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
250
277
|
|
|
@@ -267,9 +294,9 @@ function isBrowserMainThread() {
|
|
|
267
294
|
/***/ }),
|
|
268
295
|
|
|
269
296
|
/***/ "../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js":
|
|
270
|
-
|
|
271
|
-
!*** /Users/
|
|
272
|
-
|
|
297
|
+
/*!*********************************************************************************************!*\
|
|
298
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/env/dist/esm/lib/is-electron.js ***!
|
|
299
|
+
\*********************************************************************************************/
|
|
273
300
|
/*! exports provided: default */
|
|
274
301
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
275
302
|
|
|
@@ -300,9 +327,9 @@ function isElectron(mockUserAgent) {
|
|
|
300
327
|
/***/ }),
|
|
301
328
|
|
|
302
329
|
/***/ "../../node_modules/@probe.gl/env/dist/esm/utils/assert.js":
|
|
303
|
-
|
|
304
|
-
!*** /Users/
|
|
305
|
-
|
|
330
|
+
/*!******************************************************************************************!*\
|
|
331
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/env/dist/esm/utils/assert.js ***!
|
|
332
|
+
\******************************************************************************************/
|
|
306
333
|
/*! exports provided: default */
|
|
307
334
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
308
335
|
|
|
@@ -319,9 +346,9 @@ function assert(condition, message) {
|
|
|
319
346
|
/***/ }),
|
|
320
347
|
|
|
321
348
|
/***/ "../../node_modules/@probe.gl/env/dist/esm/utils/globals.js":
|
|
322
|
-
|
|
323
|
-
!*** /Users/
|
|
324
|
-
|
|
349
|
+
/*!*******************************************************************************************!*\
|
|
350
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/env/dist/esm/utils/globals.js ***!
|
|
351
|
+
\*******************************************************************************************/
|
|
325
352
|
/*! exports provided: self, window, global, document, process, console, VERSION, isBrowser */
|
|
326
353
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
327
354
|
|
|
@@ -345,533 +372,51 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
345
372
|
|
|
346
373
|
|
|
347
374
|
|
|
348
|
-
const VERSION = true ? "8.5.
|
|
375
|
+
const VERSION = true ? "8.5.16" : undefined;
|
|
349
376
|
const isBrowser = Object(_lib_is_browser__WEBPACK_IMPORTED_MODULE_0__["default"])();
|
|
350
377
|
//# sourceMappingURL=globals.js.map
|
|
351
378
|
|
|
352
379
|
/***/ }),
|
|
353
380
|
|
|
354
|
-
/***/ "../../node_modules/@probe.gl/
|
|
355
|
-
|
|
356
|
-
!*** /Users/
|
|
357
|
-
|
|
358
|
-
/*! exports provided:
|
|
359
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
360
|
-
|
|
361
|
-
"use strict";
|
|
362
|
-
__webpack_require__.r(__webpack_exports__);
|
|
363
|
-
/* harmony import */ var _lib_stats__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/stats */ "../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js");
|
|
364
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stats", function() { return _lib_stats__WEBPACK_IMPORTED_MODULE_0__["default"]; });
|
|
365
|
-
|
|
366
|
-
/* harmony import */ var _lib_stat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/stat */ "../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js");
|
|
367
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stat", function() { return _lib_stat__WEBPACK_IMPORTED_MODULE_1__["default"]; });
|
|
368
|
-
|
|
369
|
-
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/hi-res-timestamp */ "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js");
|
|
370
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_getHiResTimestamp", function() { return _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_2__["default"]; });
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
//# sourceMappingURL=index.js.map
|
|
376
|
-
|
|
377
|
-
/***/ }),
|
|
378
|
-
|
|
379
|
-
/***/ "../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js":
|
|
380
|
-
/*!*************************************************************************************!*\
|
|
381
|
-
!*** /Users/ibgreen/code/luma.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js ***!
|
|
382
|
-
\*************************************************************************************/
|
|
383
|
-
/*! exports provided: default */
|
|
384
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
385
|
-
|
|
386
|
-
"use strict";
|
|
387
|
-
__webpack_require__.r(__webpack_exports__);
|
|
388
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Stat; });
|
|
389
|
-
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/hi-res-timestamp */ "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js");
|
|
390
|
-
|
|
391
|
-
class Stat {
|
|
392
|
-
constructor(name, type) {
|
|
393
|
-
this.name = name;
|
|
394
|
-
this.type = type;
|
|
395
|
-
this.sampleSize = 1;
|
|
396
|
-
this.reset();
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
setSampleSize(samples) {
|
|
400
|
-
this.sampleSize = samples;
|
|
401
|
-
return this;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
incrementCount() {
|
|
405
|
-
this.addCount(1);
|
|
406
|
-
return this;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
decrementCount() {
|
|
410
|
-
this.subtractCount(1);
|
|
411
|
-
return this;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
addCount(value) {
|
|
415
|
-
this._count += value;
|
|
416
|
-
this._samples++;
|
|
417
|
-
|
|
418
|
-
this._checkSampling();
|
|
419
|
-
|
|
420
|
-
return this;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
subtractCount(value) {
|
|
424
|
-
this._count -= value;
|
|
425
|
-
this._samples++;
|
|
426
|
-
|
|
427
|
-
this._checkSampling();
|
|
428
|
-
|
|
429
|
-
return this;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
addTime(time) {
|
|
433
|
-
this._time += time;
|
|
434
|
-
this.lastTiming = time;
|
|
435
|
-
this._samples++;
|
|
436
|
-
|
|
437
|
-
this._checkSampling();
|
|
438
|
-
|
|
439
|
-
return this;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
timeStart() {
|
|
443
|
-
this._startTime = Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_0__["default"])();
|
|
444
|
-
this._timerPending = true;
|
|
445
|
-
return this;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
timeEnd() {
|
|
449
|
-
if (!this._timerPending) {
|
|
450
|
-
return this;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
this.addTime(Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_0__["default"])() - this._startTime);
|
|
454
|
-
this._timerPending = false;
|
|
455
|
-
|
|
456
|
-
this._checkSampling();
|
|
457
|
-
|
|
458
|
-
return this;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
getSampleAverageCount() {
|
|
462
|
-
return this.sampleSize > 0 ? this.lastSampleCount / this.sampleSize : 0;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
getSampleAverageTime() {
|
|
466
|
-
return this.sampleSize > 0 ? this.lastSampleTime / this.sampleSize : 0;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
getSampleHz() {
|
|
470
|
-
return this.lastSampleTime > 0 ? this.sampleSize / (this.lastSampleTime / 1000) : 0;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
getAverageCount() {
|
|
474
|
-
return this.samples > 0 ? this.count / this.samples : 0;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
getAverageTime() {
|
|
478
|
-
return this.samples > 0 ? this.time / this.samples : 0;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
getHz() {
|
|
482
|
-
return this.time > 0 ? this.samples / (this.time / 1000) : 0;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
reset() {
|
|
486
|
-
this.time = 0;
|
|
487
|
-
this.count = 0;
|
|
488
|
-
this.samples = 0;
|
|
489
|
-
this.lastTiming = 0;
|
|
490
|
-
this.lastSampleTime = 0;
|
|
491
|
-
this.lastSampleCount = 0;
|
|
492
|
-
this._count = 0;
|
|
493
|
-
this._time = 0;
|
|
494
|
-
this._samples = 0;
|
|
495
|
-
this._startTime = 0;
|
|
496
|
-
this._timerPending = false;
|
|
497
|
-
return this;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
_checkSampling() {
|
|
501
|
-
if (this._samples === this.sampleSize) {
|
|
502
|
-
this.lastSampleTime = this._time;
|
|
503
|
-
this.lastSampleCount = this._count;
|
|
504
|
-
this.count += this._count;
|
|
505
|
-
this.time += this._time;
|
|
506
|
-
this.samples += this._samples;
|
|
507
|
-
this._time = 0;
|
|
508
|
-
this._count = 0;
|
|
509
|
-
this._samples = 0;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
}
|
|
514
|
-
//# sourceMappingURL=stat.js.map
|
|
515
|
-
|
|
516
|
-
/***/ }),
|
|
517
|
-
|
|
518
|
-
/***/ "../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js":
|
|
519
|
-
/*!**************************************************************************************!*\
|
|
520
|
-
!*** /Users/ibgreen/code/luma.gl/node_modules/@probe.gl/stats/dist/esm/lib/stats.js ***!
|
|
521
|
-
\**************************************************************************************/
|
|
522
|
-
/*! exports provided: default */
|
|
523
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
524
|
-
|
|
525
|
-
"use strict";
|
|
526
|
-
__webpack_require__.r(__webpack_exports__);
|
|
527
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Stats; });
|
|
528
|
-
/* harmony import */ var _stat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./stat */ "../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js");
|
|
529
|
-
|
|
530
|
-
class Stats {
|
|
531
|
-
constructor({
|
|
532
|
-
id,
|
|
533
|
-
stats
|
|
534
|
-
}) {
|
|
535
|
-
this.id = id;
|
|
536
|
-
this.stats = {};
|
|
537
|
-
|
|
538
|
-
this._initializeStats(stats);
|
|
539
|
-
|
|
540
|
-
Object.seal(this);
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
get(name, type = 'count') {
|
|
544
|
-
return this._getOrCreate({
|
|
545
|
-
name,
|
|
546
|
-
type
|
|
547
|
-
});
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
get size() {
|
|
551
|
-
return Object.keys(this.stats).length;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
reset() {
|
|
555
|
-
for (const key in this.stats) {
|
|
556
|
-
this.stats[key].reset();
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
return this;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
forEach(fn) {
|
|
563
|
-
for (const key in this.stats) {
|
|
564
|
-
fn(this.stats[key]);
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
getTable() {
|
|
569
|
-
const table = {};
|
|
570
|
-
this.forEach(stat => {
|
|
571
|
-
table[stat.name] = {
|
|
572
|
-
time: stat.time || 0,
|
|
573
|
-
count: stat.count || 0,
|
|
574
|
-
average: stat.getAverageTime() || 0,
|
|
575
|
-
hz: stat.getHz() || 0
|
|
576
|
-
};
|
|
577
|
-
});
|
|
578
|
-
return table;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
_initializeStats(stats = []) {
|
|
582
|
-
stats.forEach(stat => this._getOrCreate(stat));
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
_getOrCreate(stat) {
|
|
586
|
-
if (!stat || !stat.name) {
|
|
587
|
-
return null;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
const {
|
|
591
|
-
name,
|
|
592
|
-
type
|
|
593
|
-
} = stat;
|
|
594
|
-
|
|
595
|
-
if (!this.stats[name]) {
|
|
596
|
-
if (stat instanceof _stat__WEBPACK_IMPORTED_MODULE_0__["default"]) {
|
|
597
|
-
this.stats[name] = stat;
|
|
598
|
-
} else {
|
|
599
|
-
this.stats[name] = new _stat__WEBPACK_IMPORTED_MODULE_0__["default"](name, type);
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
return this.stats[name];
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
}
|
|
607
|
-
//# sourceMappingURL=stats.js.map
|
|
608
|
-
|
|
609
|
-
/***/ }),
|
|
610
|
-
|
|
611
|
-
/***/ "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js":
|
|
612
|
-
/*!***************************************************************************************************!*\
|
|
613
|
-
!*** /Users/ibgreen/code/luma.gl/node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js ***!
|
|
614
|
-
\***************************************************************************************************/
|
|
615
|
-
/*! exports provided: default */
|
|
616
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
617
|
-
|
|
618
|
-
"use strict";
|
|
619
|
-
__webpack_require__.r(__webpack_exports__);
|
|
620
|
-
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getHiResTimestamp; });
|
|
621
|
-
function getHiResTimestamp() {
|
|
622
|
-
let timestamp;
|
|
623
|
-
|
|
624
|
-
if (typeof window !== 'undefined' && window.performance) {
|
|
625
|
-
timestamp = window.performance.now();
|
|
626
|
-
} else if (typeof process !== 'undefined' && process.hrtime) {
|
|
627
|
-
const timeParts = process.hrtime();
|
|
628
|
-
timestamp = timeParts[0] * 1000 + timeParts[1] / 1e6;
|
|
629
|
-
} else {
|
|
630
|
-
timestamp = Date.now();
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
return timestamp;
|
|
634
|
-
}
|
|
635
|
-
//# sourceMappingURL=hi-res-timestamp.js.map
|
|
636
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../process/browser.js */ "../../node_modules/process/browser.js")))
|
|
637
|
-
|
|
638
|
-
/***/ }),
|
|
639
|
-
|
|
640
|
-
/***/ "../../node_modules/probe.gl/dist/esm/env/get-browser.js":
|
|
641
|
-
/*!*************************************************************************************!*\
|
|
642
|
-
!*** /Users/ibgreen/code/luma.gl/node_modules/probe.gl/dist/esm/env/get-browser.js ***!
|
|
643
|
-
\*************************************************************************************/
|
|
644
|
-
/*! exports provided: isMobile, default */
|
|
645
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
646
|
-
|
|
647
|
-
"use strict";
|
|
648
|
-
__webpack_require__.r(__webpack_exports__);
|
|
649
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMobile", function() { return isMobile; });
|
|
650
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getBrowser; });
|
|
651
|
-
/* harmony import */ var _globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./globals */ "../../node_modules/probe.gl/dist/esm/env/globals.js");
|
|
652
|
-
/* harmony import */ var _is_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-browser */ "../../node_modules/probe.gl/dist/esm/env/is-browser.js");
|
|
653
|
-
/* harmony import */ var _is_electron__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-electron */ "../../node_modules/probe.gl/dist/esm/env/is-electron.js");
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
function isMobile() {
|
|
658
|
-
return typeof _globals__WEBPACK_IMPORTED_MODULE_0__["window"].orientation !== 'undefined';
|
|
659
|
-
}
|
|
660
|
-
function getBrowser(mockUserAgent) {
|
|
661
|
-
if (!mockUserAgent && !Object(_is_browser__WEBPACK_IMPORTED_MODULE_1__["default"])()) {
|
|
662
|
-
return 'Node';
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
if (Object(_is_electron__WEBPACK_IMPORTED_MODULE_2__["default"])(mockUserAgent)) {
|
|
666
|
-
return 'Electron';
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
const navigator_ = typeof navigator !== 'undefined' ? navigator : {};
|
|
670
|
-
const userAgent = mockUserAgent || navigator_.userAgent || '';
|
|
671
|
-
|
|
672
|
-
if (userAgent.indexOf('Edge') > -1) {
|
|
673
|
-
return 'Edge';
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
const isMSIE = userAgent.indexOf('MSIE ') !== -1;
|
|
677
|
-
const isTrident = userAgent.indexOf('Trident/') !== -1;
|
|
678
|
-
|
|
679
|
-
if (isMSIE || isTrident) {
|
|
680
|
-
return 'IE';
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
if (_globals__WEBPACK_IMPORTED_MODULE_0__["window"].chrome) {
|
|
684
|
-
return 'Chrome';
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
if (_globals__WEBPACK_IMPORTED_MODULE_0__["window"].safari) {
|
|
688
|
-
return 'Safari';
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
if (_globals__WEBPACK_IMPORTED_MODULE_0__["window"].mozInnerScreenX) {
|
|
692
|
-
return 'Firefox';
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
return 'Unknown';
|
|
696
|
-
}
|
|
697
|
-
//# sourceMappingURL=get-browser.js.map
|
|
698
|
-
|
|
699
|
-
/***/ }),
|
|
700
|
-
|
|
701
|
-
/***/ "../../node_modules/probe.gl/dist/esm/env/globals.js":
|
|
702
|
-
/*!*********************************************************************************!*\
|
|
703
|
-
!*** /Users/ibgreen/code/luma.gl/node_modules/probe.gl/dist/esm/env/globals.js ***!
|
|
704
|
-
\*********************************************************************************/
|
|
705
|
-
/*! exports provided: self, window, global, document, process, console */
|
|
706
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
707
|
-
|
|
708
|
-
"use strict";
|
|
709
|
-
__webpack_require__.r(__webpack_exports__);
|
|
710
|
-
/* WEBPACK VAR INJECTION */(function(global, process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "self", function() { return self_; });
|
|
711
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window_; });
|
|
712
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "global", function() { return global_; });
|
|
713
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "document", function() { return document_; });
|
|
714
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "process", function() { return process_; });
|
|
715
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "console", function() { return console_; });
|
|
716
|
-
const globals = {
|
|
717
|
-
self: typeof self !== 'undefined' && self,
|
|
718
|
-
window: typeof window !== 'undefined' && window,
|
|
719
|
-
global: typeof global !== 'undefined' && global,
|
|
720
|
-
document: typeof document !== 'undefined' && document,
|
|
721
|
-
process: typeof process === 'object' && process
|
|
722
|
-
};
|
|
723
|
-
const self_ = globals.self || globals.window || globals.global;
|
|
724
|
-
const window_ = globals.window || globals.self || globals.global;
|
|
725
|
-
const global_ = globals.global || globals.self || globals.window;
|
|
726
|
-
const document_ = globals.document || {};
|
|
727
|
-
const process_ = globals.process || {};
|
|
728
|
-
const console_ = console;
|
|
729
|
-
|
|
730
|
-
//# sourceMappingURL=globals.js.map
|
|
731
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../../../process/browser.js */ "../../node_modules/process/browser.js")))
|
|
732
|
-
|
|
733
|
-
/***/ }),
|
|
734
|
-
|
|
735
|
-
/***/ "../../node_modules/probe.gl/dist/esm/env/is-browser.js":
|
|
736
|
-
/*!************************************************************************************!*\
|
|
737
|
-
!*** /Users/ibgreen/code/luma.gl/node_modules/probe.gl/dist/esm/env/is-browser.js ***!
|
|
738
|
-
\************************************************************************************/
|
|
739
|
-
/*! exports provided: default, isBrowserMainThread */
|
|
740
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
741
|
-
|
|
742
|
-
"use strict";
|
|
743
|
-
__webpack_require__.r(__webpack_exports__);
|
|
744
|
-
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isBrowser; });
|
|
745
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowserMainThread", function() { return isBrowserMainThread; });
|
|
746
|
-
/* harmony import */ var _is_electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-electron */ "../../node_modules/probe.gl/dist/esm/env/is-electron.js");
|
|
747
|
-
|
|
748
|
-
function isBrowser() {
|
|
749
|
-
const isNode = typeof process === 'object' && String(process) === '[object process]' && !process.browser;
|
|
750
|
-
return !isNode || Object(_is_electron__WEBPACK_IMPORTED_MODULE_0__["default"])();
|
|
751
|
-
}
|
|
752
|
-
function isBrowserMainThread() {
|
|
753
|
-
return isBrowser() && typeof document !== 'undefined';
|
|
754
|
-
}
|
|
755
|
-
//# sourceMappingURL=is-browser.js.map
|
|
756
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../process/browser.js */ "../../node_modules/process/browser.js")))
|
|
757
|
-
|
|
758
|
-
/***/ }),
|
|
759
|
-
|
|
760
|
-
/***/ "../../node_modules/probe.gl/dist/esm/env/is-electron.js":
|
|
761
|
-
/*!*************************************************************************************!*\
|
|
762
|
-
!*** /Users/ibgreen/code/luma.gl/node_modules/probe.gl/dist/esm/env/is-electron.js ***!
|
|
763
|
-
\*************************************************************************************/
|
|
764
|
-
/*! exports provided: default */
|
|
765
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
766
|
-
|
|
767
|
-
"use strict";
|
|
768
|
-
__webpack_require__.r(__webpack_exports__);
|
|
769
|
-
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isElectron; });
|
|
770
|
-
function isElectron(mockUserAgent) {
|
|
771
|
-
if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') {
|
|
772
|
-
return true;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
if (typeof process !== 'undefined' && typeof process.versions === 'object' && Boolean(process.versions.electron)) {
|
|
776
|
-
return true;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
const realUserAgent = typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent;
|
|
780
|
-
const userAgent = mockUserAgent || realUserAgent;
|
|
781
|
-
|
|
782
|
-
if (userAgent && userAgent.indexOf('Electron') >= 0) {
|
|
783
|
-
return true;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
return false;
|
|
787
|
-
}
|
|
788
|
-
//# sourceMappingURL=is-electron.js.map
|
|
789
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../process/browser.js */ "../../node_modules/process/browser.js")))
|
|
790
|
-
|
|
791
|
-
/***/ }),
|
|
792
|
-
|
|
793
|
-
/***/ "../../node_modules/probe.gl/dist/esm/index.js":
|
|
794
|
-
/*!***************************************************************************!*\
|
|
795
|
-
!*** /Users/ibgreen/code/luma.gl/node_modules/probe.gl/dist/esm/index.js ***!
|
|
796
|
-
\***************************************************************************/
|
|
797
|
-
/*! exports provided: VERSION, self, window, global, document, process, console, isBrowser, isBrowserMainThread, getBrowser, isMobile, isElectron, assert, Log, COLOR, default, addColor, leftPad, rightPad, autobind, LocalStorage, getHiResTimestamp, Stats, Stat */
|
|
381
|
+
/***/ "../../node_modules/@probe.gl/log/dist/esm/index.js":
|
|
382
|
+
/*!***********************************************************************************!*\
|
|
383
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/log/dist/esm/index.js ***!
|
|
384
|
+
\***********************************************************************************/
|
|
385
|
+
/*! exports provided: default, Log, COLOR, addColor, leftPad, rightPad, autobind, LocalStorage, getHiResTimestamp */
|
|
798
386
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
799
387
|
|
|
800
388
|
"use strict";
|
|
801
389
|
__webpack_require__.r(__webpack_exports__);
|
|
802
|
-
/* harmony import */ var
|
|
803
|
-
/* harmony
|
|
804
|
-
/* harmony import */ var _utils_globals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/globals */ "../../node_modules/probe.gl/dist/esm/utils/globals.js");
|
|
805
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return _utils_globals__WEBPACK_IMPORTED_MODULE_2__["VERSION"]; });
|
|
806
|
-
|
|
807
|
-
/* harmony import */ var _env_globals__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./env/globals */ "../../node_modules/probe.gl/dist/esm/env/globals.js");
|
|
808
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "self", function() { return _env_globals__WEBPACK_IMPORTED_MODULE_3__["self"]; });
|
|
809
|
-
|
|
810
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _env_globals__WEBPACK_IMPORTED_MODULE_3__["window"]; });
|
|
811
|
-
|
|
812
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "global", function() { return _env_globals__WEBPACK_IMPORTED_MODULE_3__["global"]; });
|
|
813
|
-
|
|
814
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "document", function() { return _env_globals__WEBPACK_IMPORTED_MODULE_3__["document"]; });
|
|
815
|
-
|
|
816
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "process", function() { return _env_globals__WEBPACK_IMPORTED_MODULE_3__["process"]; });
|
|
817
|
-
|
|
818
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "console", function() { return _env_globals__WEBPACK_IMPORTED_MODULE_3__["console"]; });
|
|
819
|
-
|
|
820
|
-
/* harmony import */ var _env_is_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./env/is-browser */ "../../node_modules/probe.gl/dist/esm/env/is-browser.js");
|
|
821
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBrowser", function() { return _env_is_browser__WEBPACK_IMPORTED_MODULE_4__["default"]; });
|
|
822
|
-
|
|
823
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBrowserMainThread", function() { return _env_is_browser__WEBPACK_IMPORTED_MODULE_4__["isBrowserMainThread"]; });
|
|
824
|
-
|
|
825
|
-
/* harmony import */ var _env_get_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./env/get-browser */ "../../node_modules/probe.gl/dist/esm/env/get-browser.js");
|
|
826
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getBrowser", function() { return _env_get_browser__WEBPACK_IMPORTED_MODULE_5__["default"]; });
|
|
827
|
-
|
|
828
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isMobile", function() { return _env_get_browser__WEBPACK_IMPORTED_MODULE_5__["isMobile"]; });
|
|
829
|
-
|
|
830
|
-
/* harmony import */ var _env_is_electron__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./env/is-electron */ "../../node_modules/probe.gl/dist/esm/env/is-electron.js");
|
|
831
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isElectron", function() { return _env_is_electron__WEBPACK_IMPORTED_MODULE_6__["default"]; });
|
|
832
|
-
|
|
833
|
-
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/assert */ "../../node_modules/probe.gl/dist/esm/utils/assert.js");
|
|
834
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "assert", function() { return _utils_assert__WEBPACK_IMPORTED_MODULE_7__["default"]; });
|
|
835
|
-
|
|
836
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Log", function() { return _lib_log__WEBPACK_IMPORTED_MODULE_1__["default"]; });
|
|
837
|
-
|
|
838
|
-
/* harmony import */ var _utils_color__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/color */ "../../node_modules/probe.gl/dist/esm/utils/color.js");
|
|
839
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "COLOR", function() { return _utils_color__WEBPACK_IMPORTED_MODULE_8__["COLOR"]; });
|
|
840
|
-
|
|
841
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addColor", function() { return _utils_color__WEBPACK_IMPORTED_MODULE_8__["addColor"]; });
|
|
842
|
-
|
|
843
|
-
/* harmony import */ var _utils_formatters__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/formatters */ "../../node_modules/probe.gl/dist/esm/utils/formatters.js");
|
|
844
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "leftPad", function() { return _utils_formatters__WEBPACK_IMPORTED_MODULE_9__["leftPad"]; });
|
|
845
|
-
|
|
846
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rightPad", function() { return _utils_formatters__WEBPACK_IMPORTED_MODULE_9__["rightPad"]; });
|
|
847
|
-
|
|
848
|
-
/* harmony import */ var _utils_autobind__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/autobind */ "../../node_modules/probe.gl/dist/esm/utils/autobind.js");
|
|
849
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autobind", function() { return _utils_autobind__WEBPACK_IMPORTED_MODULE_10__["autobind"]; });
|
|
850
|
-
|
|
851
|
-
/* harmony import */ var _utils_local_storage__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/local-storage */ "../../node_modules/probe.gl/dist/esm/utils/local-storage.js");
|
|
852
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalStorage", function() { return _utils_local_storage__WEBPACK_IMPORTED_MODULE_11__["default"]; });
|
|
853
|
-
|
|
854
|
-
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/hi-res-timestamp */ "../../node_modules/probe.gl/dist/esm/utils/hi-res-timestamp.js");
|
|
855
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getHiResTimestamp", function() { return _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_12__["default"]; });
|
|
856
|
-
|
|
857
|
-
/* harmony import */ var _probe_gl_stats__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @probe.gl/stats */ "../../node_modules/@probe.gl/stats/dist/esm/index.js");
|
|
858
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stats", function() { return _probe_gl_stats__WEBPACK_IMPORTED_MODULE_13__["Stats"]; });
|
|
859
|
-
|
|
860
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stat", function() { return _probe_gl_stats__WEBPACK_IMPORTED_MODULE_13__["Stat"]; });
|
|
390
|
+
/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./log */ "../../node_modules/@probe.gl/log/dist/esm/log.js");
|
|
391
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Log", function() { return _log__WEBPACK_IMPORTED_MODULE_0__["default"]; });
|
|
861
392
|
|
|
393
|
+
/* harmony import */ var _utils_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/color */ "../../node_modules/@probe.gl/log/dist/esm/utils/color.js");
|
|
394
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "COLOR", function() { return _utils_color__WEBPACK_IMPORTED_MODULE_1__["COLOR"]; });
|
|
862
395
|
|
|
396
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addColor", function() { return _utils_color__WEBPACK_IMPORTED_MODULE_1__["addColor"]; });
|
|
863
397
|
|
|
398
|
+
/* harmony import */ var _utils_formatters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/formatters */ "../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js");
|
|
399
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "leftPad", function() { return _utils_formatters__WEBPACK_IMPORTED_MODULE_2__["leftPad"]; });
|
|
864
400
|
|
|
401
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rightPad", function() { return _utils_formatters__WEBPACK_IMPORTED_MODULE_2__["rightPad"]; });
|
|
865
402
|
|
|
403
|
+
/* harmony import */ var _utils_autobind__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/autobind */ "../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js");
|
|
404
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autobind", function() { return _utils_autobind__WEBPACK_IMPORTED_MODULE_3__["autobind"]; });
|
|
866
405
|
|
|
406
|
+
/* harmony import */ var _utils_local_storage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/local-storage */ "../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js");
|
|
407
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalStorage", function() { return _utils_local_storage__WEBPACK_IMPORTED_MODULE_4__["default"]; });
|
|
867
408
|
|
|
409
|
+
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/hi-res-timestamp */ "../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js");
|
|
410
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getHiResTimestamp", function() { return _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_5__["getHiResTimestamp"]; });
|
|
868
411
|
|
|
412
|
+
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./init */ "../../node_modules/@probe.gl/log/dist/esm/init.js");
|
|
413
|
+
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_init__WEBPACK_IMPORTED_MODULE_6__);
|
|
869
414
|
|
|
415
|
+
/* harmony default export */ __webpack_exports__["default"] = (new _log__WEBPACK_IMPORTED_MODULE_0__["default"]({
|
|
416
|
+
id: '@probe.gl/log'
|
|
417
|
+
}));
|
|
870
418
|
|
|
871
419
|
|
|
872
|
-
/* harmony default export */ __webpack_exports__["default"] = (new _lib_log__WEBPACK_IMPORTED_MODULE_1__["default"]({
|
|
873
|
-
id: 'probe.gl'
|
|
874
|
-
}));
|
|
875
420
|
|
|
876
421
|
|
|
877
422
|
|
|
@@ -882,26 +427,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
882
427
|
|
|
883
428
|
/***/ }),
|
|
884
429
|
|
|
885
|
-
/***/ "../../node_modules
|
|
886
|
-
|
|
887
|
-
!*** /Users/
|
|
888
|
-
|
|
889
|
-
/*! no exports
|
|
890
|
-
/***/ (function(module,
|
|
891
|
-
|
|
892
|
-
"use strict";
|
|
893
|
-
__webpack_require__.r(__webpack_exports__);
|
|
894
|
-
/* harmony import */ var _utils_globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/globals */ "../../node_modules/probe.gl/dist/esm/utils/globals.js");
|
|
430
|
+
/***/ "../../node_modules/@probe.gl/log/dist/esm/init.js":
|
|
431
|
+
/*!**********************************************************************************!*\
|
|
432
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/log/dist/esm/init.js ***!
|
|
433
|
+
\**********************************************************************************/
|
|
434
|
+
/*! no static exports found */
|
|
435
|
+
/***/ (function(module, exports) {
|
|
895
436
|
|
|
896
|
-
|
|
437
|
+
globalThis.probe = {};
|
|
897
438
|
//# sourceMappingURL=init.js.map
|
|
898
439
|
|
|
899
440
|
/***/ }),
|
|
900
441
|
|
|
901
|
-
/***/ "../../node_modules
|
|
902
|
-
|
|
903
|
-
!*** /Users/
|
|
904
|
-
|
|
442
|
+
/***/ "../../node_modules/@probe.gl/log/dist/esm/log.js":
|
|
443
|
+
/*!*********************************************************************************!*\
|
|
444
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/log/dist/esm/log.js ***!
|
|
445
|
+
\*********************************************************************************/
|
|
905
446
|
/*! exports provided: default, normalizeArguments */
|
|
906
447
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
907
448
|
|
|
@@ -909,13 +450,15 @@ _utils_globals__WEBPACK_IMPORTED_MODULE_0__["global"].probe = {};
|
|
|
909
450
|
__webpack_require__.r(__webpack_exports__);
|
|
910
451
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Log; });
|
|
911
452
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeArguments", function() { return normalizeArguments; });
|
|
912
|
-
/* harmony import */ var
|
|
913
|
-
/* harmony import */ var
|
|
914
|
-
/* harmony import */ var
|
|
915
|
-
/* harmony import */ var
|
|
916
|
-
/* harmony import */ var
|
|
917
|
-
/* harmony import */ var
|
|
918
|
-
/* harmony import */ var
|
|
453
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
454
|
+
/* harmony import */ var _probe_gl_env__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @probe.gl/env */ "../../node_modules/@probe.gl/env/dist/esm/index.js");
|
|
455
|
+
/* harmony import */ var _utils_local_storage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/local-storage */ "../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js");
|
|
456
|
+
/* harmony import */ var _utils_formatters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/formatters */ "../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js");
|
|
457
|
+
/* harmony import */ var _utils_color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/color */ "../../node_modules/@probe.gl/log/dist/esm/utils/color.js");
|
|
458
|
+
/* harmony import */ var _utils_autobind__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/autobind */ "../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js");
|
|
459
|
+
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/assert */ "../../node_modules/@probe.gl/log/dist/esm/utils/assert.js");
|
|
460
|
+
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/hi-res-timestamp */ "../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js");
|
|
461
|
+
|
|
919
462
|
|
|
920
463
|
|
|
921
464
|
|
|
@@ -924,7 +467,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
924
467
|
|
|
925
468
|
|
|
926
469
|
const originalConsole = {
|
|
927
|
-
debug:
|
|
470
|
+
debug: _probe_gl_env__WEBPACK_IMPORTED_MODULE_1__["isBrowser"] ? console.debug || console.log : console.log,
|
|
928
471
|
log: console.log,
|
|
929
472
|
info: console.info,
|
|
930
473
|
warn: console.warn,
|
|
@@ -941,32 +484,33 @@ const cache = {};
|
|
|
941
484
|
const ONCE = {
|
|
942
485
|
once: true
|
|
943
486
|
};
|
|
487
|
+
class Log {
|
|
488
|
+
constructor() {
|
|
489
|
+
let {
|
|
490
|
+
id
|
|
491
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
492
|
+
id: ''
|
|
493
|
+
};
|
|
944
494
|
|
|
945
|
-
|
|
946
|
-
for (const key in table) {
|
|
947
|
-
for (const title in table[key]) {
|
|
948
|
-
return title || 'untitled';
|
|
949
|
-
}
|
|
950
|
-
}
|
|
495
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "id", void 0);
|
|
951
496
|
|
|
952
|
-
|
|
953
|
-
|
|
497
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "VERSION", _probe_gl_env__WEBPACK_IMPORTED_MODULE_1__["VERSION"]);
|
|
498
|
+
|
|
499
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_startTs", Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_7__["getHiResTimestamp"])());
|
|
500
|
+
|
|
501
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_deltaTs", Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_7__["getHiResTimestamp"])());
|
|
502
|
+
|
|
503
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_storage", void 0);
|
|
504
|
+
|
|
505
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "userData", {});
|
|
506
|
+
|
|
507
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "LOG_THROTTLE_TIMEOUT", 0);
|
|
954
508
|
|
|
955
|
-
class Log {
|
|
956
|
-
constructor({
|
|
957
|
-
id
|
|
958
|
-
} = {
|
|
959
|
-
id: ''
|
|
960
|
-
}) {
|
|
961
509
|
this.id = id;
|
|
962
|
-
this.
|
|
963
|
-
this._startTs = Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_6__["default"])();
|
|
964
|
-
this._deltaTs = Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_6__["default"])();
|
|
965
|
-
this.LOG_THROTTLE_TIMEOUT = 0;
|
|
966
|
-
this._storage = new _utils_local_storage__WEBPACK_IMPORTED_MODULE_1__["default"]("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS);
|
|
510
|
+
this._storage = new _utils_local_storage__WEBPACK_IMPORTED_MODULE_2__["default"]("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS);
|
|
967
511
|
this.userData = {};
|
|
968
512
|
this.timeStamp("".concat(this.id, " started"));
|
|
969
|
-
Object(
|
|
513
|
+
Object(_utils_autobind__WEBPACK_IMPORTED_MODULE_5__["autobind"])(this);
|
|
970
514
|
Object.seal(this);
|
|
971
515
|
}
|
|
972
516
|
|
|
@@ -987,11 +531,11 @@ class Log {
|
|
|
987
531
|
}
|
|
988
532
|
|
|
989
533
|
getTotal() {
|
|
990
|
-
return Number((Object(
|
|
534
|
+
return Number((Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_7__["getHiResTimestamp"])() - this._startTs).toPrecision(10));
|
|
991
535
|
}
|
|
992
536
|
|
|
993
537
|
getDelta() {
|
|
994
|
-
return Number((Object(
|
|
538
|
+
return Number((Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_7__["getHiResTimestamp"])() - this._deltaTs).toPrecision(10));
|
|
995
539
|
}
|
|
996
540
|
|
|
997
541
|
set priority(newPriority) {
|
|
@@ -1006,7 +550,9 @@ class Log {
|
|
|
1006
550
|
return this.level;
|
|
1007
551
|
}
|
|
1008
552
|
|
|
1009
|
-
enable(
|
|
553
|
+
enable() {
|
|
554
|
+
let enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
555
|
+
|
|
1010
556
|
this._storage.updateConfiguration({
|
|
1011
557
|
enabled
|
|
1012
558
|
});
|
|
@@ -1022,8 +568,26 @@ class Log {
|
|
|
1022
568
|
return this;
|
|
1023
569
|
}
|
|
1024
570
|
|
|
571
|
+
get(setting) {
|
|
572
|
+
return this._storage.config[setting];
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
set(setting, value) {
|
|
576
|
+
this._storage.updateConfiguration({
|
|
577
|
+
[setting]: value
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
settings() {
|
|
582
|
+
if (console.table) {
|
|
583
|
+
console.table(this._storage.config);
|
|
584
|
+
} else {
|
|
585
|
+
console.log(this._storage.config);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
|
|
1025
589
|
assert(condition, message) {
|
|
1026
|
-
Object(
|
|
590
|
+
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_6__["default"])(condition, message);
|
|
1027
591
|
}
|
|
1028
592
|
|
|
1029
593
|
warn(message) {
|
|
@@ -1058,6 +622,10 @@ class Log {
|
|
|
1058
622
|
}
|
|
1059
623
|
|
|
1060
624
|
once(logLevel, message) {
|
|
625
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
626
|
+
args[_key - 2] = arguments[_key];
|
|
627
|
+
}
|
|
628
|
+
|
|
1061
629
|
return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
|
|
1062
630
|
}
|
|
1063
631
|
|
|
@@ -1071,18 +639,20 @@ class Log {
|
|
|
1071
639
|
return noop;
|
|
1072
640
|
}
|
|
1073
641
|
|
|
1074
|
-
image({
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
642
|
+
image(_ref) {
|
|
643
|
+
let {
|
|
644
|
+
logLevel,
|
|
645
|
+
priority,
|
|
646
|
+
image,
|
|
647
|
+
message = '',
|
|
648
|
+
scale = 1
|
|
649
|
+
} = _ref;
|
|
650
|
+
|
|
1081
651
|
if (!this._shouldLog(logLevel || priority)) {
|
|
1082
652
|
return noop;
|
|
1083
653
|
}
|
|
1084
654
|
|
|
1085
|
-
return
|
|
655
|
+
return _probe_gl_env__WEBPACK_IMPORTED_MODULE_1__["isBrowser"] ? logImageInBrowser({
|
|
1086
656
|
image,
|
|
1087
657
|
message,
|
|
1088
658
|
scale
|
|
@@ -1093,24 +663,6 @@ class Log {
|
|
|
1093
663
|
});
|
|
1094
664
|
}
|
|
1095
665
|
|
|
1096
|
-
settings() {
|
|
1097
|
-
if (console.table) {
|
|
1098
|
-
console.table(this._storage.config);
|
|
1099
|
-
} else {
|
|
1100
|
-
console.log(this._storage.config);
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
get(setting) {
|
|
1105
|
-
return this._storage.config[setting];
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
set(setting, value) {
|
|
1109
|
-
this._storage.updateConfiguration({
|
|
1110
|
-
[setting]: value
|
|
1111
|
-
});
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
666
|
time(logLevel, message) {
|
|
1115
667
|
return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
|
|
1116
668
|
}
|
|
@@ -1123,10 +675,11 @@ class Log {
|
|
|
1123
675
|
return this._getLogFunction(logLevel, message, console.timeStamp || noop);
|
|
1124
676
|
}
|
|
1125
677
|
|
|
1126
|
-
group(logLevel, message
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
678
|
+
group(logLevel, message) {
|
|
679
|
+
let opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
680
|
+
collapsed: false
|
|
681
|
+
};
|
|
682
|
+
const options = normalizeArguments({
|
|
1130
683
|
logLevel,
|
|
1131
684
|
message,
|
|
1132
685
|
opts
|
|
@@ -1134,11 +687,12 @@ class Log {
|
|
|
1134
687
|
const {
|
|
1135
688
|
collapsed
|
|
1136
689
|
} = opts;
|
|
1137
|
-
|
|
1138
|
-
return this._getLogFunction(
|
|
690
|
+
options.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
|
|
691
|
+
return this._getLogFunction(options);
|
|
1139
692
|
}
|
|
1140
693
|
|
|
1141
|
-
groupCollapsed(logLevel, message
|
|
694
|
+
groupCollapsed(logLevel, message) {
|
|
695
|
+
let opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1142
696
|
return this.group(logLevel, message, Object.assign({}, opts, {
|
|
1143
697
|
collapsed: true
|
|
1144
698
|
}));
|
|
@@ -1168,7 +722,7 @@ class Log {
|
|
|
1168
722
|
return this.isEnabled() && this.getLevel() >= normalizeLogLevel(logLevel);
|
|
1169
723
|
}
|
|
1170
724
|
|
|
1171
|
-
_getLogFunction(logLevel, message, method, args
|
|
725
|
+
_getLogFunction(logLevel, message, method, args, opts) {
|
|
1172
726
|
if (this._shouldLog(logLevel)) {
|
|
1173
727
|
opts = normalizeArguments({
|
|
1174
728
|
logLevel,
|
|
@@ -1177,15 +731,15 @@ class Log {
|
|
|
1177
731
|
opts
|
|
1178
732
|
});
|
|
1179
733
|
method = method || opts.method;
|
|
1180
|
-
Object(
|
|
734
|
+
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_6__["default"])(method);
|
|
1181
735
|
opts.total = this.getTotal();
|
|
1182
736
|
opts.delta = this.getDelta();
|
|
1183
|
-
this._deltaTs = Object(
|
|
737
|
+
this._deltaTs = Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_7__["getHiResTimestamp"])();
|
|
1184
738
|
const tag = opts.tag || opts.message;
|
|
1185
739
|
|
|
1186
740
|
if (opts.once) {
|
|
1187
741
|
if (!cache[tag]) {
|
|
1188
|
-
cache[tag] = Object(
|
|
742
|
+
cache[tag] = Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_7__["getHiResTimestamp"])();
|
|
1189
743
|
} else {
|
|
1190
744
|
return noop;
|
|
1191
745
|
}
|
|
@@ -1199,7 +753,8 @@ class Log {
|
|
|
1199
753
|
}
|
|
1200
754
|
|
|
1201
755
|
}
|
|
1202
|
-
|
|
756
|
+
|
|
757
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(Log, "VERSION", _probe_gl_env__WEBPACK_IMPORTED_MODULE_1__["VERSION"]);
|
|
1203
758
|
|
|
1204
759
|
function normalizeLogLevel(logLevel) {
|
|
1205
760
|
if (!logLevel) {
|
|
@@ -1221,7 +776,7 @@ function normalizeLogLevel(logLevel) {
|
|
|
1221
776
|
return 0;
|
|
1222
777
|
}
|
|
1223
778
|
|
|
1224
|
-
Object(
|
|
779
|
+
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_6__["default"])(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
|
|
1225
780
|
return resolvedLevel;
|
|
1226
781
|
}
|
|
1227
782
|
|
|
@@ -1235,8 +790,6 @@ function normalizeArguments(opts) {
|
|
|
1235
790
|
|
|
1236
791
|
while (args.length && args.shift() !== message) {}
|
|
1237
792
|
|
|
1238
|
-
opts.args = args;
|
|
1239
|
-
|
|
1240
793
|
switch (typeof logLevel) {
|
|
1241
794
|
case 'string':
|
|
1242
795
|
case 'function':
|
|
@@ -1259,25 +812,28 @@ function normalizeArguments(opts) {
|
|
|
1259
812
|
}
|
|
1260
813
|
|
|
1261
814
|
const messageType = typeof opts.message;
|
|
1262
|
-
Object(
|
|
1263
|
-
return Object.assign(opts,
|
|
815
|
+
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_6__["default"])(messageType === 'string' || messageType === 'object');
|
|
816
|
+
return Object.assign(opts, {
|
|
817
|
+
args
|
|
818
|
+
}, opts.opts);
|
|
1264
819
|
}
|
|
1265
820
|
|
|
1266
821
|
function decorateMessage(id, message, opts) {
|
|
1267
822
|
if (typeof message === 'string') {
|
|
1268
|
-
const time = opts.time ? Object(
|
|
823
|
+
const time = opts.time ? Object(_utils_formatters__WEBPACK_IMPORTED_MODULE_3__["leftPad"])(Object(_utils_formatters__WEBPACK_IMPORTED_MODULE_3__["formatTime"])(opts.total)) : '';
|
|
1269
824
|
message = opts.time ? "".concat(id, ": ").concat(time, " ").concat(message) : "".concat(id, ": ").concat(message);
|
|
1270
|
-
message = Object(
|
|
825
|
+
message = Object(_utils_color__WEBPACK_IMPORTED_MODULE_4__["addColor"])(message, opts.color, opts.background);
|
|
1271
826
|
}
|
|
1272
827
|
|
|
1273
828
|
return message;
|
|
1274
829
|
}
|
|
1275
830
|
|
|
1276
|
-
function logImageInNode({
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
831
|
+
function logImageInNode(_ref2) {
|
|
832
|
+
let {
|
|
833
|
+
image,
|
|
834
|
+
message = '',
|
|
835
|
+
scale = 1
|
|
836
|
+
} = _ref2;
|
|
1281
837
|
let asciify = null;
|
|
1282
838
|
|
|
1283
839
|
try {
|
|
@@ -1294,16 +850,18 @@ function logImageInNode({
|
|
|
1294
850
|
return noop;
|
|
1295
851
|
}
|
|
1296
852
|
|
|
1297
|
-
function logImageInBrowser({
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
853
|
+
function logImageInBrowser(_ref3) {
|
|
854
|
+
let {
|
|
855
|
+
image,
|
|
856
|
+
message = '',
|
|
857
|
+
scale = 1
|
|
858
|
+
} = _ref3;
|
|
859
|
+
|
|
1302
860
|
if (typeof image === 'string') {
|
|
1303
861
|
const img = new Image();
|
|
1304
862
|
|
|
1305
863
|
img.onload = () => {
|
|
1306
|
-
const args = Object(
|
|
864
|
+
const args = Object(_utils_formatters__WEBPACK_IMPORTED_MODULE_3__["formatImage"])(img, message, scale);
|
|
1307
865
|
console.log(...args);
|
|
1308
866
|
};
|
|
1309
867
|
|
|
@@ -1314,14 +872,14 @@ function logImageInBrowser({
|
|
|
1314
872
|
const element = image.nodeName || '';
|
|
1315
873
|
|
|
1316
874
|
if (element.toLowerCase() === 'img') {
|
|
1317
|
-
console.log(...Object(
|
|
875
|
+
console.log(...Object(_utils_formatters__WEBPACK_IMPORTED_MODULE_3__["formatImage"])(image, message, scale));
|
|
1318
876
|
return noop;
|
|
1319
877
|
}
|
|
1320
878
|
|
|
1321
879
|
if (element.toLowerCase() === 'canvas') {
|
|
1322
880
|
const img = new Image();
|
|
1323
881
|
|
|
1324
|
-
img.onload = () => console.log(...Object(
|
|
882
|
+
img.onload = () => console.log(...Object(_utils_formatters__WEBPACK_IMPORTED_MODULE_3__["formatImage"])(img, message, scale));
|
|
1325
883
|
|
|
1326
884
|
img.src = image.toDataURL();
|
|
1327
885
|
return noop;
|
|
@@ -1329,14 +887,24 @@ function logImageInBrowser({
|
|
|
1329
887
|
|
|
1330
888
|
return noop;
|
|
1331
889
|
}
|
|
890
|
+
|
|
891
|
+
function getTableHeader(table) {
|
|
892
|
+
for (const key in table) {
|
|
893
|
+
for (const title in table[key]) {
|
|
894
|
+
return title || 'untitled';
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
return 'empty';
|
|
899
|
+
}
|
|
1332
900
|
//# sourceMappingURL=log.js.map
|
|
1333
901
|
|
|
1334
902
|
/***/ }),
|
|
1335
903
|
|
|
1336
|
-
/***/ "../../node_modules
|
|
1337
|
-
|
|
1338
|
-
!*** /Users/
|
|
1339
|
-
|
|
904
|
+
/***/ "../../node_modules/@probe.gl/log/dist/esm/utils/assert.js":
|
|
905
|
+
/*!******************************************************************************************!*\
|
|
906
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/log/dist/esm/utils/assert.js ***!
|
|
907
|
+
\******************************************************************************************/
|
|
1340
908
|
/*! exports provided: default */
|
|
1341
909
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1342
910
|
|
|
@@ -1352,17 +920,18 @@ function assert(condition, message) {
|
|
|
1352
920
|
|
|
1353
921
|
/***/ }),
|
|
1354
922
|
|
|
1355
|
-
/***/ "../../node_modules
|
|
1356
|
-
|
|
1357
|
-
!*** /Users/
|
|
1358
|
-
|
|
923
|
+
/***/ "../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js":
|
|
924
|
+
/*!********************************************************************************************!*\
|
|
925
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/log/dist/esm/utils/autobind.js ***!
|
|
926
|
+
\********************************************************************************************/
|
|
1359
927
|
/*! exports provided: autobind */
|
|
1360
928
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1361
929
|
|
|
1362
930
|
"use strict";
|
|
1363
931
|
__webpack_require__.r(__webpack_exports__);
|
|
1364
932
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autobind", function() { return autobind; });
|
|
1365
|
-
function autobind(obj
|
|
933
|
+
function autobind(obj) {
|
|
934
|
+
let predefined = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['constructor'];
|
|
1366
935
|
const proto = Object.getPrototypeOf(obj);
|
|
1367
936
|
const propNames = Object.getOwnPropertyNames(proto);
|
|
1368
937
|
|
|
@@ -1378,10 +947,10 @@ function autobind(obj, predefined = ['constructor']) {
|
|
|
1378
947
|
|
|
1379
948
|
/***/ }),
|
|
1380
949
|
|
|
1381
|
-
/***/ "../../node_modules
|
|
1382
|
-
|
|
1383
|
-
!*** /Users/
|
|
1384
|
-
|
|
950
|
+
/***/ "../../node_modules/@probe.gl/log/dist/esm/utils/color.js":
|
|
951
|
+
/*!*****************************************************************************************!*\
|
|
952
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/log/dist/esm/utils/color.js ***!
|
|
953
|
+
\*****************************************************************************************/
|
|
1385
954
|
/*! exports provided: COLOR, addColor */
|
|
1386
955
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1387
956
|
|
|
@@ -1389,33 +958,35 @@ function autobind(obj, predefined = ['constructor']) {
|
|
|
1389
958
|
__webpack_require__.r(__webpack_exports__);
|
|
1390
959
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "COLOR", function() { return COLOR; });
|
|
1391
960
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addColor", function() { return addColor; });
|
|
1392
|
-
/* harmony import */ var
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
961
|
+
/* harmony import */ var _probe_gl_env__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @probe.gl/env */ "../../node_modules/@probe.gl/env/dist/esm/index.js");
|
|
962
|
+
|
|
963
|
+
let COLOR;
|
|
964
|
+
|
|
965
|
+
(function (COLOR) {
|
|
966
|
+
COLOR[COLOR["BLACK"] = 30] = "BLACK";
|
|
967
|
+
COLOR[COLOR["RED"] = 31] = "RED";
|
|
968
|
+
COLOR[COLOR["GREEN"] = 32] = "GREEN";
|
|
969
|
+
COLOR[COLOR["YELLOW"] = 33] = "YELLOW";
|
|
970
|
+
COLOR[COLOR["BLUE"] = 34] = "BLUE";
|
|
971
|
+
COLOR[COLOR["MAGENTA"] = 35] = "MAGENTA";
|
|
972
|
+
COLOR[COLOR["CYAN"] = 36] = "CYAN";
|
|
973
|
+
COLOR[COLOR["WHITE"] = 37] = "WHITE";
|
|
974
|
+
COLOR[COLOR["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
|
|
975
|
+
COLOR[COLOR["BRIGHT_RED"] = 91] = "BRIGHT_RED";
|
|
976
|
+
COLOR[COLOR["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
|
|
977
|
+
COLOR[COLOR["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
|
|
978
|
+
COLOR[COLOR["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
|
|
979
|
+
COLOR[COLOR["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
|
|
980
|
+
COLOR[COLOR["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
981
|
+
COLOR[COLOR["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
982
|
+
})(COLOR || (COLOR = {}));
|
|
1412
983
|
|
|
1413
984
|
function getColor(color) {
|
|
1414
985
|
return typeof color === 'string' ? COLOR[color.toUpperCase()] || COLOR.WHITE : color;
|
|
1415
986
|
}
|
|
1416
987
|
|
|
1417
988
|
function addColor(string, color, background) {
|
|
1418
|
-
if (!
|
|
989
|
+
if (!_probe_gl_env__WEBPACK_IMPORTED_MODULE_0__["isBrowser"] && typeof string === 'string') {
|
|
1419
990
|
if (color) {
|
|
1420
991
|
color = getColor(color);
|
|
1421
992
|
string = "\x1B[".concat(color, "m").concat(string, "\x1B[39m");
|
|
@@ -1433,10 +1004,10 @@ function addColor(string, color, background) {
|
|
|
1433
1004
|
|
|
1434
1005
|
/***/ }),
|
|
1435
1006
|
|
|
1436
|
-
/***/ "../../node_modules
|
|
1437
|
-
|
|
1438
|
-
!*** /Users/
|
|
1439
|
-
|
|
1007
|
+
/***/ "../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js":
|
|
1008
|
+
/*!**********************************************************************************************!*\
|
|
1009
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/log/dist/esm/utils/formatters.js ***!
|
|
1010
|
+
\**********************************************************************************************/
|
|
1440
1011
|
/*! exports provided: formatTime, leftPad, rightPad, formatValue, formatImage */
|
|
1441
1012
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1442
1013
|
|
|
@@ -1462,15 +1033,18 @@ function formatTime(ms) {
|
|
|
1462
1033
|
|
|
1463
1034
|
return formatted;
|
|
1464
1035
|
}
|
|
1465
|
-
function leftPad(string
|
|
1036
|
+
function leftPad(string) {
|
|
1037
|
+
let length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 8;
|
|
1466
1038
|
const padLength = Math.max(length - string.length, 0);
|
|
1467
1039
|
return "".concat(' '.repeat(padLength)).concat(string);
|
|
1468
1040
|
}
|
|
1469
|
-
function rightPad(string
|
|
1041
|
+
function rightPad(string) {
|
|
1042
|
+
let length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 8;
|
|
1470
1043
|
const padLength = Math.max(length - string.length, 0);
|
|
1471
1044
|
return "".concat(string).concat(' '.repeat(padLength));
|
|
1472
1045
|
}
|
|
1473
|
-
function formatValue(v
|
|
1046
|
+
function formatValue(v) {
|
|
1047
|
+
let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1474
1048
|
const EPSILON = 1e-16;
|
|
1475
1049
|
const {
|
|
1476
1050
|
isInteger = false
|
|
@@ -1496,182 +1070,486 @@ function formatValue(v, opts = {}) {
|
|
|
1496
1070
|
return v.toFixed(0);
|
|
1497
1071
|
}
|
|
1498
1072
|
|
|
1499
|
-
const string = v.toPrecision(2);
|
|
1500
|
-
const decimal = string.indexOf('.0');
|
|
1501
|
-
return decimal === string.length - 2 ? string.slice(0, -1) : string;
|
|
1502
|
-
}
|
|
1073
|
+
const string = v.toPrecision(2);
|
|
1074
|
+
const decimal = string.indexOf('.0');
|
|
1075
|
+
return decimal === string.length - 2 ? string.slice(0, -1) : string;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
function formatArrayValue(v, opts) {
|
|
1079
|
+
const {
|
|
1080
|
+
maxElts = 16,
|
|
1081
|
+
size = 1
|
|
1082
|
+
} = opts;
|
|
1083
|
+
let string = '[';
|
|
1084
|
+
|
|
1085
|
+
for (let i = 0; i < v.length && i < maxElts; ++i) {
|
|
1086
|
+
if (i > 0) {
|
|
1087
|
+
string += ",".concat(i % size === 0 ? ' ' : '');
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
string += formatValue(v[i], opts);
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
const terminator = v.length > maxElts ? '...' : ']';
|
|
1094
|
+
return "".concat(string).concat(terminator);
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
function formatImage(image, message, scale) {
|
|
1098
|
+
let maxWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 600;
|
|
1099
|
+
const imageUrl = image.src.replace(/\(/g, '%28').replace(/\)/g, '%29');
|
|
1100
|
+
|
|
1101
|
+
if (image.width > maxWidth) {
|
|
1102
|
+
scale = Math.min(scale, maxWidth / image.width);
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
const width = image.width * scale;
|
|
1106
|
+
const height = image.height * scale;
|
|
1107
|
+
const style = ['font-size:1px;', "padding:".concat(Math.floor(height / 2), "px ").concat(Math.floor(width / 2), "px;"), "line-height:".concat(height, "px;"), "background:url(".concat(imageUrl, ");"), "background-size:".concat(width, "px ").concat(height, "px;"), 'color:transparent;'].join('');
|
|
1108
|
+
return ["".concat(message, " %c+"), style];
|
|
1109
|
+
}
|
|
1110
|
+
//# sourceMappingURL=formatters.js.map
|
|
1111
|
+
|
|
1112
|
+
/***/ }),
|
|
1113
|
+
|
|
1114
|
+
/***/ "../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js":
|
|
1115
|
+
/*!****************************************************************************************************!*\
|
|
1116
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js ***!
|
|
1117
|
+
\****************************************************************************************************/
|
|
1118
|
+
/*! exports provided: getHiResTimestamp */
|
|
1119
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1120
|
+
|
|
1121
|
+
"use strict";
|
|
1122
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1123
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHiResTimestamp", function() { return getHiResTimestamp; });
|
|
1124
|
+
/* harmony import */ var _probe_gl_env__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @probe.gl/env */ "../../node_modules/@probe.gl/env/dist/esm/index.js");
|
|
1125
|
+
|
|
1126
|
+
function getHiResTimestamp() {
|
|
1127
|
+
let timestamp;
|
|
1128
|
+
|
|
1129
|
+
if (_probe_gl_env__WEBPACK_IMPORTED_MODULE_0__["isBrowser"] && 'performance' in _probe_gl_env__WEBPACK_IMPORTED_MODULE_0__["window"]) {
|
|
1130
|
+
var _window$performance, _window$performance$n;
|
|
1131
|
+
|
|
1132
|
+
timestamp = _probe_gl_env__WEBPACK_IMPORTED_MODULE_0__["window"] === null || _probe_gl_env__WEBPACK_IMPORTED_MODULE_0__["window"] === void 0 ? void 0 : (_window$performance = _probe_gl_env__WEBPACK_IMPORTED_MODULE_0__["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);
|
|
1133
|
+
} else if ('hrtime' in _probe_gl_env__WEBPACK_IMPORTED_MODULE_0__["process"]) {
|
|
1134
|
+
var _process$hrtime;
|
|
1135
|
+
|
|
1136
|
+
const timeParts = _probe_gl_env__WEBPACK_IMPORTED_MODULE_0__["process"] === null || _probe_gl_env__WEBPACK_IMPORTED_MODULE_0__["process"] === void 0 ? void 0 : (_process$hrtime = _probe_gl_env__WEBPACK_IMPORTED_MODULE_0__["process"].hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(_probe_gl_env__WEBPACK_IMPORTED_MODULE_0__["process"]);
|
|
1137
|
+
timestamp = timeParts[0] * 1000 + timeParts[1] / 1e6;
|
|
1138
|
+
} else {
|
|
1139
|
+
timestamp = Date.now();
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
return timestamp;
|
|
1143
|
+
}
|
|
1144
|
+
//# sourceMappingURL=hi-res-timestamp.js.map
|
|
1145
|
+
|
|
1146
|
+
/***/ }),
|
|
1147
|
+
|
|
1148
|
+
/***/ "../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js":
|
|
1149
|
+
/*!*************************************************************************************************!*\
|
|
1150
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/log/dist/esm/utils/local-storage.js ***!
|
|
1151
|
+
\*************************************************************************************************/
|
|
1152
|
+
/*! exports provided: default */
|
|
1153
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1154
|
+
|
|
1155
|
+
"use strict";
|
|
1156
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1157
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return LocalStorage; });
|
|
1158
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1159
|
+
|
|
1160
|
+
|
|
1161
|
+
function getStorage(type) {
|
|
1162
|
+
try {
|
|
1163
|
+
const storage = window[type];
|
|
1164
|
+
const x = '__storage_test__';
|
|
1165
|
+
storage.setItem(x, x);
|
|
1166
|
+
storage.removeItem(x);
|
|
1167
|
+
return storage;
|
|
1168
|
+
} catch (e) {
|
|
1169
|
+
return null;
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
class LocalStorage {
|
|
1174
|
+
constructor(id) {
|
|
1175
|
+
let defaultSettings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1176
|
+
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'sessionStorage';
|
|
1177
|
+
|
|
1178
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "storage", void 0);
|
|
1179
|
+
|
|
1180
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "id", void 0);
|
|
1181
|
+
|
|
1182
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "config", {});
|
|
1183
|
+
|
|
1184
|
+
this.storage = getStorage(type);
|
|
1185
|
+
this.id = id;
|
|
1186
|
+
this.config = {};
|
|
1187
|
+
Object.assign(this.config, defaultSettings);
|
|
1188
|
+
|
|
1189
|
+
this._loadConfiguration();
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
getConfiguration() {
|
|
1193
|
+
return this.config;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
setConfiguration(configuration) {
|
|
1197
|
+
this.config = {};
|
|
1198
|
+
return this.updateConfiguration(configuration);
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
updateConfiguration(configuration) {
|
|
1202
|
+
Object.assign(this.config, configuration);
|
|
1203
|
+
|
|
1204
|
+
if (this.storage) {
|
|
1205
|
+
const serialized = JSON.stringify(this.config);
|
|
1206
|
+
this.storage.setItem(this.id, serialized);
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
return this;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
_loadConfiguration() {
|
|
1213
|
+
let configuration = {};
|
|
1214
|
+
|
|
1215
|
+
if (this.storage) {
|
|
1216
|
+
const serializedConfiguration = this.storage.getItem(this.id);
|
|
1217
|
+
configuration = serializedConfiguration ? JSON.parse(serializedConfiguration) : {};
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
Object.assign(this.config, configuration);
|
|
1221
|
+
return this;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
}
|
|
1225
|
+
//# sourceMappingURL=local-storage.js.map
|
|
1226
|
+
|
|
1227
|
+
/***/ }),
|
|
1228
|
+
|
|
1229
|
+
/***/ "../../node_modules/@probe.gl/stats/dist/esm/index.js":
|
|
1230
|
+
/*!*************************************************************************************!*\
|
|
1231
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/stats/dist/esm/index.js ***!
|
|
1232
|
+
\*************************************************************************************/
|
|
1233
|
+
/*! exports provided: Stats, Stat, _getHiResTimestamp */
|
|
1234
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1235
|
+
|
|
1236
|
+
"use strict";
|
|
1237
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1238
|
+
/* harmony import */ var _lib_stats__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/stats */ "../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js");
|
|
1239
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stats", function() { return _lib_stats__WEBPACK_IMPORTED_MODULE_0__["default"]; });
|
|
1240
|
+
|
|
1241
|
+
/* harmony import */ var _lib_stat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/stat */ "../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js");
|
|
1242
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stat", function() { return _lib_stat__WEBPACK_IMPORTED_MODULE_1__["default"]; });
|
|
1243
|
+
|
|
1244
|
+
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/hi-res-timestamp */ "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js");
|
|
1245
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_getHiResTimestamp", function() { return _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_2__["default"]; });
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
//# sourceMappingURL=index.js.map
|
|
1251
|
+
|
|
1252
|
+
/***/ }),
|
|
1253
|
+
|
|
1254
|
+
/***/ "../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js":
|
|
1255
|
+
/*!****************************************************************************************!*\
|
|
1256
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js ***!
|
|
1257
|
+
\****************************************************************************************/
|
|
1258
|
+
/*! exports provided: default */
|
|
1259
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1260
|
+
|
|
1261
|
+
"use strict";
|
|
1262
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1263
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Stat; });
|
|
1264
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1265
|
+
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/hi-res-timestamp */ "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js");
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
class Stat {
|
|
1269
|
+
constructor(name, type) {
|
|
1270
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "name", void 0);
|
|
1271
|
+
|
|
1272
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "type", void 0);
|
|
1273
|
+
|
|
1274
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "sampleSize", 1);
|
|
1275
|
+
|
|
1276
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "time", void 0);
|
|
1277
|
+
|
|
1278
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "count", void 0);
|
|
1279
|
+
|
|
1280
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "samples", void 0);
|
|
1281
|
+
|
|
1282
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "lastTiming", void 0);
|
|
1283
|
+
|
|
1284
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "lastSampleTime", void 0);
|
|
1285
|
+
|
|
1286
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "lastSampleCount", void 0);
|
|
1287
|
+
|
|
1288
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_count", 0);
|
|
1289
|
+
|
|
1290
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_time", 0);
|
|
1291
|
+
|
|
1292
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_samples", 0);
|
|
1293
|
+
|
|
1294
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_startTime", 0);
|
|
1295
|
+
|
|
1296
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_timerPending", false);
|
|
1297
|
+
|
|
1298
|
+
this.name = name;
|
|
1299
|
+
this.type = type;
|
|
1300
|
+
this.reset();
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
setSampleSize(samples) {
|
|
1304
|
+
this.sampleSize = samples;
|
|
1305
|
+
return this;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
incrementCount() {
|
|
1309
|
+
this.addCount(1);
|
|
1310
|
+
return this;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
decrementCount() {
|
|
1314
|
+
this.subtractCount(1);
|
|
1315
|
+
return this;
|
|
1316
|
+
}
|
|
1503
1317
|
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
size = 1
|
|
1508
|
-
} = opts;
|
|
1509
|
-
let string = '[';
|
|
1318
|
+
addCount(value) {
|
|
1319
|
+
this._count += value;
|
|
1320
|
+
this._samples++;
|
|
1510
1321
|
|
|
1511
|
-
|
|
1512
|
-
if (i > 0) {
|
|
1513
|
-
string += ",".concat(i % size === 0 ? ' ' : '');
|
|
1514
|
-
}
|
|
1322
|
+
this._checkSampling();
|
|
1515
1323
|
|
|
1516
|
-
|
|
1324
|
+
return this;
|
|
1517
1325
|
}
|
|
1518
1326
|
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1327
|
+
subtractCount(value) {
|
|
1328
|
+
this._count -= value;
|
|
1329
|
+
this._samples++;
|
|
1522
1330
|
|
|
1523
|
-
|
|
1524
|
-
const imageUrl = image.src.replace(/\(/g, '%28').replace(/\)/g, '%29');
|
|
1331
|
+
this._checkSampling();
|
|
1525
1332
|
|
|
1526
|
-
|
|
1527
|
-
scale = Math.min(scale, maxWidth / image.width);
|
|
1333
|
+
return this;
|
|
1528
1334
|
}
|
|
1529
1335
|
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
}
|
|
1535
|
-
//# sourceMappingURL=formatters.js.map
|
|
1536
|
-
|
|
1537
|
-
/***/ }),
|
|
1336
|
+
addTime(time) {
|
|
1337
|
+
this._time += time;
|
|
1338
|
+
this.lastTiming = time;
|
|
1339
|
+
this._samples++;
|
|
1538
1340
|
|
|
1539
|
-
|
|
1540
|
-
/*!***********************************************************************************!*\
|
|
1541
|
-
!*** /Users/ibgreen/code/luma.gl/node_modules/probe.gl/dist/esm/utils/globals.js ***!
|
|
1542
|
-
\***********************************************************************************/
|
|
1543
|
-
/*! exports provided: self, window, global, document, process, console, VERSION, isBrowser */
|
|
1544
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1341
|
+
this._checkSampling();
|
|
1545
1342
|
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
|
|
1549
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowser", function() { return isBrowser; });
|
|
1550
|
-
/* harmony import */ var _env_is_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env/is-browser */ "../../node_modules/probe.gl/dist/esm/env/is-browser.js");
|
|
1551
|
-
/* harmony import */ var _env_globals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../env/globals */ "../../node_modules/probe.gl/dist/esm/env/globals.js");
|
|
1552
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "self", function() { return _env_globals__WEBPACK_IMPORTED_MODULE_1__["self"]; });
|
|
1343
|
+
return this;
|
|
1344
|
+
}
|
|
1553
1345
|
|
|
1554
|
-
|
|
1346
|
+
timeStart() {
|
|
1347
|
+
this._startTime = Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_1__["default"])();
|
|
1348
|
+
this._timerPending = true;
|
|
1349
|
+
return this;
|
|
1350
|
+
}
|
|
1555
1351
|
|
|
1556
|
-
|
|
1352
|
+
timeEnd() {
|
|
1353
|
+
if (!this._timerPending) {
|
|
1354
|
+
return this;
|
|
1355
|
+
}
|
|
1557
1356
|
|
|
1558
|
-
|
|
1357
|
+
this.addTime(Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_1__["default"])() - this._startTime);
|
|
1358
|
+
this._timerPending = false;
|
|
1559
1359
|
|
|
1560
|
-
|
|
1360
|
+
this._checkSampling();
|
|
1561
1361
|
|
|
1562
|
-
|
|
1362
|
+
return this;
|
|
1363
|
+
}
|
|
1563
1364
|
|
|
1365
|
+
getSampleAverageCount() {
|
|
1366
|
+
return this.sampleSize > 0 ? this.lastSampleCount / this.sampleSize : 0;
|
|
1367
|
+
}
|
|
1564
1368
|
|
|
1369
|
+
getSampleAverageTime() {
|
|
1370
|
+
return this.sampleSize > 0 ? this.lastSampleTime / this.sampleSize : 0;
|
|
1371
|
+
}
|
|
1565
1372
|
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1373
|
+
getSampleHz() {
|
|
1374
|
+
return this.lastSampleTime > 0 ? this.sampleSize / (this.lastSampleTime / 1000) : 0;
|
|
1375
|
+
}
|
|
1569
1376
|
|
|
1570
|
-
|
|
1377
|
+
getAverageCount() {
|
|
1378
|
+
return this.samples > 0 ? this.count / this.samples : 0;
|
|
1379
|
+
}
|
|
1571
1380
|
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
\********************************************************************************************/
|
|
1576
|
-
/*! exports provided: default */
|
|
1577
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1381
|
+
getAverageTime() {
|
|
1382
|
+
return this.samples > 0 ? this.time / this.samples : 0;
|
|
1383
|
+
}
|
|
1578
1384
|
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
/* harmony import */ var _globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./globals */ "../../node_modules/probe.gl/dist/esm/utils/globals.js");
|
|
1385
|
+
getHz() {
|
|
1386
|
+
return this.time > 0 ? this.samples / (this.time / 1000) : 0;
|
|
1387
|
+
}
|
|
1583
1388
|
|
|
1584
|
-
|
|
1585
|
-
|
|
1389
|
+
reset() {
|
|
1390
|
+
this.time = 0;
|
|
1391
|
+
this.count = 0;
|
|
1392
|
+
this.samples = 0;
|
|
1393
|
+
this.lastTiming = 0;
|
|
1394
|
+
this.lastSampleTime = 0;
|
|
1395
|
+
this.lastSampleCount = 0;
|
|
1396
|
+
this._count = 0;
|
|
1397
|
+
this._time = 0;
|
|
1398
|
+
this._samples = 0;
|
|
1399
|
+
this._startTime = 0;
|
|
1400
|
+
this._timerPending = false;
|
|
1401
|
+
return this;
|
|
1402
|
+
}
|
|
1586
1403
|
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1404
|
+
_checkSampling() {
|
|
1405
|
+
if (this._samples === this.sampleSize) {
|
|
1406
|
+
this.lastSampleTime = this._time;
|
|
1407
|
+
this.lastSampleCount = this._count;
|
|
1408
|
+
this.count += this._count;
|
|
1409
|
+
this.time += this._time;
|
|
1410
|
+
this.samples += this._samples;
|
|
1411
|
+
this._time = 0;
|
|
1412
|
+
this._count = 0;
|
|
1413
|
+
this._samples = 0;
|
|
1414
|
+
}
|
|
1594
1415
|
}
|
|
1595
1416
|
|
|
1596
|
-
return timestamp;
|
|
1597
1417
|
}
|
|
1598
|
-
//# sourceMappingURL=
|
|
1418
|
+
//# sourceMappingURL=stat.js.map
|
|
1599
1419
|
|
|
1600
1420
|
/***/ }),
|
|
1601
1421
|
|
|
1602
|
-
/***/ "../../node_modules
|
|
1422
|
+
/***/ "../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js":
|
|
1603
1423
|
/*!*****************************************************************************************!*\
|
|
1604
|
-
!*** /Users/
|
|
1424
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/stats/dist/esm/lib/stats.js ***!
|
|
1605
1425
|
\*****************************************************************************************/
|
|
1606
1426
|
/*! exports provided: default */
|
|
1607
1427
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1608
1428
|
|
|
1609
1429
|
"use strict";
|
|
1610
1430
|
__webpack_require__.r(__webpack_exports__);
|
|
1611
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
const storage = window[type];
|
|
1615
|
-
const x = '__storage_test__';
|
|
1616
|
-
storage.setItem(x, x);
|
|
1617
|
-
storage.removeItem(x);
|
|
1618
|
-
return storage;
|
|
1619
|
-
} catch (e) {
|
|
1620
|
-
return null;
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1431
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Stats; });
|
|
1432
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1433
|
+
/* harmony import */ var _stat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./stat */ "../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js");
|
|
1623
1434
|
|
|
1624
|
-
class LocalStorage {
|
|
1625
|
-
constructor(id, defaultSettings, type = 'sessionStorage') {
|
|
1626
|
-
this.storage = getStorage(type);
|
|
1627
|
-
this.id = id;
|
|
1628
|
-
this.config = {};
|
|
1629
|
-
Object.assign(this.config, defaultSettings);
|
|
1630
1435
|
|
|
1631
|
-
|
|
1632
|
-
|
|
1436
|
+
class Stats {
|
|
1437
|
+
constructor(options) {
|
|
1438
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "id", void 0);
|
|
1633
1439
|
|
|
1634
|
-
|
|
1635
|
-
|
|
1440
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "stats", {});
|
|
1441
|
+
|
|
1442
|
+
this.id = options.id;
|
|
1443
|
+
this.stats = {};
|
|
1444
|
+
|
|
1445
|
+
this._initializeStats(options.stats);
|
|
1446
|
+
|
|
1447
|
+
Object.seal(this);
|
|
1636
1448
|
}
|
|
1637
1449
|
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
return this.
|
|
1450
|
+
get(name) {
|
|
1451
|
+
let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'count';
|
|
1452
|
+
return this._getOrCreate({
|
|
1453
|
+
name,
|
|
1454
|
+
type
|
|
1455
|
+
});
|
|
1641
1456
|
}
|
|
1642
1457
|
|
|
1643
|
-
|
|
1644
|
-
Object.
|
|
1458
|
+
get size() {
|
|
1459
|
+
return Object.keys(this.stats).length;
|
|
1460
|
+
}
|
|
1645
1461
|
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
this.
|
|
1462
|
+
reset() {
|
|
1463
|
+
for (const key in this.stats) {
|
|
1464
|
+
this.stats[key].reset();
|
|
1649
1465
|
}
|
|
1650
1466
|
|
|
1651
1467
|
return this;
|
|
1652
1468
|
}
|
|
1653
1469
|
|
|
1654
|
-
|
|
1655
|
-
|
|
1470
|
+
forEach(fn) {
|
|
1471
|
+
for (const key in this.stats) {
|
|
1472
|
+
fn(this.stats[key]);
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1656
1475
|
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1476
|
+
getTable() {
|
|
1477
|
+
const table = {};
|
|
1478
|
+
this.forEach(stat => {
|
|
1479
|
+
table[stat.name] = {
|
|
1480
|
+
time: stat.time || 0,
|
|
1481
|
+
count: stat.count || 0,
|
|
1482
|
+
average: stat.getAverageTime() || 0,
|
|
1483
|
+
hz: stat.getHz() || 0
|
|
1484
|
+
};
|
|
1485
|
+
});
|
|
1486
|
+
return table;
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
_initializeStats() {
|
|
1490
|
+
let stats = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1491
|
+
stats.forEach(stat => this._getOrCreate(stat));
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
_getOrCreate(stat) {
|
|
1495
|
+
if (!stat || !stat.name) {
|
|
1496
|
+
return null;
|
|
1660
1497
|
}
|
|
1661
1498
|
|
|
1662
|
-
|
|
1663
|
-
|
|
1499
|
+
const {
|
|
1500
|
+
name,
|
|
1501
|
+
type
|
|
1502
|
+
} = stat;
|
|
1503
|
+
|
|
1504
|
+
if (!this.stats[name]) {
|
|
1505
|
+
if (stat instanceof _stat__WEBPACK_IMPORTED_MODULE_1__["default"]) {
|
|
1506
|
+
this.stats[name] = stat;
|
|
1507
|
+
} else {
|
|
1508
|
+
this.stats[name] = new _stat__WEBPACK_IMPORTED_MODULE_1__["default"](name, type);
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
return this.stats[name];
|
|
1664
1513
|
}
|
|
1665
1514
|
|
|
1666
1515
|
}
|
|
1667
|
-
//# sourceMappingURL=
|
|
1516
|
+
//# sourceMappingURL=stats.js.map
|
|
1517
|
+
|
|
1518
|
+
/***/ }),
|
|
1519
|
+
|
|
1520
|
+
/***/ "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js":
|
|
1521
|
+
/*!******************************************************************************************************!*\
|
|
1522
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js ***!
|
|
1523
|
+
\******************************************************************************************************/
|
|
1524
|
+
/*! exports provided: default */
|
|
1525
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1526
|
+
|
|
1527
|
+
"use strict";
|
|
1528
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1529
|
+
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getHiResTimestamp; });
|
|
1530
|
+
function getHiResTimestamp() {
|
|
1531
|
+
let timestamp;
|
|
1532
|
+
|
|
1533
|
+
if (typeof window !== 'undefined' && window.performance) {
|
|
1534
|
+
timestamp = window.performance.now();
|
|
1535
|
+
} else if (typeof process !== 'undefined' && process.hrtime) {
|
|
1536
|
+
const timeParts = process.hrtime();
|
|
1537
|
+
timestamp = timeParts[0] * 1000 + timeParts[1] / 1e6;
|
|
1538
|
+
} else {
|
|
1539
|
+
timestamp = Date.now();
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
return timestamp;
|
|
1543
|
+
}
|
|
1544
|
+
//# sourceMappingURL=hi-res-timestamp.js.map
|
|
1545
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../process/browser.js */ "../../node_modules/process/browser.js")))
|
|
1668
1546
|
|
|
1669
1547
|
/***/ }),
|
|
1670
1548
|
|
|
1671
1549
|
/***/ "../../node_modules/process/browser.js":
|
|
1672
|
-
|
|
1673
|
-
!*** /Users/
|
|
1674
|
-
|
|
1550
|
+
/*!**********************************************************************!*\
|
|
1551
|
+
!*** /Users/carto/git/visgl/luma.gl/node_modules/process/browser.js ***!
|
|
1552
|
+
\**********************************************************************/
|
|
1675
1553
|
/*! no static exports found */
|
|
1676
1554
|
/***/ (function(module, exports) {
|
|
1677
1555
|
|
|
@@ -5015,10 +4893,10 @@ function scaleY(y, ratio, height, yInvert) {
|
|
|
5015
4893
|
"use strict";
|
|
5016
4894
|
__webpack_require__.r(__webpack_exports__);
|
|
5017
4895
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "log", function() { return log; });
|
|
5018
|
-
/* harmony import */ var
|
|
4896
|
+
/* harmony import */ var _probe_gl_log__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @probe.gl/log */ "../../node_modules/@probe.gl/log/dist/esm/index.js");
|
|
5019
4897
|
|
|
5020
4898
|
|
|
5021
|
-
const log = new
|
|
4899
|
+
const log = new _probe_gl_log__WEBPACK_IMPORTED_MODULE_0__["Log"]({id: 'luma.gl'});
|
|
5022
4900
|
|
|
5023
4901
|
|
|
5024
4902
|
/***/ }),
|
|
@@ -5048,7 +4926,10 @@ function deepArrayEqual(x, y) {
|
|
|
5048
4926
|
}
|
|
5049
4927
|
const isArrayX = Array.isArray(x) || ArrayBuffer.isView(x);
|
|
5050
4928
|
const isArrayY = Array.isArray(y) || ArrayBuffer.isView(y);
|
|
4929
|
+
|
|
4930
|
+
// @ts-expect-error DataView...
|
|
5051
4931
|
if (isArrayX && isArrayY && x.length === y.length) {
|
|
4932
|
+
// @ts-expect-error DataView...
|
|
5052
4933
|
for (let i = 0; i < x.length; ++i) {
|
|
5053
4934
|
if (x[i] !== y[i]) {
|
|
5054
4935
|
return false;
|
|
@@ -6700,6 +6581,7 @@ class Framebuffer extends _resource__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
6700
6581
|
}
|
|
6701
6582
|
message = message || `Framebuffer ${this.id}`;
|
|
6702
6583
|
const image = Object(_copy_and_blit_js__WEBPACK_IMPORTED_MODULE_6__["copyToDataUrl"])(this, {targetMaxHeight: 100});
|
|
6584
|
+
// @ts-expect-error
|
|
6703
6585
|
_luma_gl_gltools__WEBPACK_IMPORTED_MODULE_1__["log"].image({logLevel, message, image}, message)();
|
|
6704
6586
|
return this;
|
|
6705
6587
|
}
|
|
@@ -7989,7 +7871,6 @@ class Resource {
|
|
|
7989
7871
|
// Only meaningful for resources that allocate GPU memory
|
|
7990
7872
|
this.byteLength = 0;
|
|
7991
7873
|
|
|
7992
|
-
this._initStats();
|
|
7993
7874
|
this._addStats();
|
|
7994
7875
|
}
|
|
7995
7876
|
|
|
@@ -8224,10 +8105,6 @@ class Resource {
|
|
|
8224
8105
|
return this.gl.luma;
|
|
8225
8106
|
}
|
|
8226
8107
|
|
|
8227
|
-
_initStats() {
|
|
8228
|
-
this.gl.stats = this.gl.stats || new _init__WEBPACK_IMPORTED_MODULE_1__["StatsManager"]();
|
|
8229
|
-
}
|
|
8230
|
-
|
|
8231
8108
|
_addStats() {
|
|
8232
8109
|
const name = this[Symbol.toStringTag];
|
|
8233
8110
|
const stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get('Resource Counts');
|
|
@@ -8245,29 +8122,26 @@ class Resource {
|
|
|
8245
8122
|
}
|
|
8246
8123
|
|
|
8247
8124
|
_trackAllocatedMemory(bytes, name = this[Symbol.toStringTag]) {
|
|
8248
|
-
this.
|
|
8249
|
-
this.
|
|
8125
|
+
this._trackAllocatedMemoryForContext(bytes, name);
|
|
8126
|
+
this._trackAllocatedMemoryForContext(bytes, name, this.gl.canvas && this.gl.canvas.id);
|
|
8250
8127
|
}
|
|
8251
8128
|
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get(`Memory Usage`)
|
|
8256
|
-
) {
|
|
8129
|
+
_trackAllocatedMemoryForContext(bytes, name = this[Symbol.toStringTag], id = '') {
|
|
8130
|
+
const stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get(`Memory Usage${id}`);
|
|
8131
|
+
|
|
8257
8132
|
stats.get('GPU Memory').addCount(bytes);
|
|
8258
8133
|
stats.get(`${name} Memory`).addCount(bytes);
|
|
8259
8134
|
this.byteLength = bytes;
|
|
8260
8135
|
}
|
|
8261
8136
|
|
|
8262
8137
|
_trackDeallocatedMemory(name = this[Symbol.toStringTag]) {
|
|
8263
|
-
this.
|
|
8264
|
-
this.
|
|
8138
|
+
this._trackDeallocatedMemoryForContext(name);
|
|
8139
|
+
this._trackDeallocatedMemoryForContext(name, this.gl.canvas && this.gl.canvas.id);
|
|
8265
8140
|
}
|
|
8266
8141
|
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
) {
|
|
8142
|
+
_trackDeallocatedMemoryForContext(name = this[Symbol.toStringTag], id = '') {
|
|
8143
|
+
const stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get(`Memory Usage${id}`);
|
|
8144
|
+
|
|
8271
8145
|
stats.get('GPU Memory').subtractCount(this.byteLength);
|
|
8272
8146
|
stats.get(`${name} Memory`).subtractCount(this.byteLength);
|
|
8273
8147
|
this.byteLength = 0;
|
|
@@ -9887,7 +9761,7 @@ class TransformFeedback extends _resource__WEBPACK_IMPORTED_MODULE_2__["default"
|
|
|
9887
9761
|
|
|
9888
9762
|
if (location < 0) {
|
|
9889
9763
|
this.unused[locationOrName] = buffer;
|
|
9890
|
-
_luma_gl_gltools__WEBPACK_IMPORTED_MODULE_1__["log"].warn(
|
|
9764
|
+
_luma_gl_gltools__WEBPACK_IMPORTED_MODULE_1__["log"].warn(`${this.id} unused varying buffer ${locationOrName}`)();
|
|
9891
9765
|
return this;
|
|
9892
9766
|
}
|
|
9893
9767
|
|
|
@@ -10517,7 +10391,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10517
10391
|
/* harmony import */ var _luma_gl_gltools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @luma.gl/gltools */ "../gltools/src/index.js");
|
|
10518
10392
|
/* harmony import */ var _utils_array_utils_flat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/array-utils-flat */ "./src/utils/array-utils-flat.js");
|
|
10519
10393
|
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/assert */ "./src/utils/assert.js");
|
|
10520
|
-
/* harmony import */ var
|
|
10394
|
+
/* harmony import */ var _probe_gl_env__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @probe.gl/env */ "../../node_modules/@probe.gl/env/dist/esm/index.js");
|
|
10521
10395
|
|
|
10522
10396
|
|
|
10523
10397
|
|
|
@@ -10537,7 +10411,7 @@ class VertexArrayObject extends _resource__WEBPACK_IMPORTED_MODULE_1__["default"
|
|
|
10537
10411
|
// Attribute 0 can not be disable on most desktop OpenGL based browsers
|
|
10538
10412
|
// and on iOS Safari browser.
|
|
10539
10413
|
if (options.constantAttributeZero) {
|
|
10540
|
-
return Object(_luma_gl_gltools__WEBPACK_IMPORTED_MODULE_3__["isWebGL2"])(gl) || Object(
|
|
10414
|
+
return Object(_luma_gl_gltools__WEBPACK_IMPORTED_MODULE_3__["isWebGL2"])(gl) || Object(_probe_gl_env__WEBPACK_IMPORTED_MODULE_6__["getBrowser"])() === 'Chrome';
|
|
10541
10415
|
}
|
|
10542
10416
|
|
|
10543
10417
|
// Whether additional objects can be created
|
|
@@ -12556,7 +12430,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12556
12430
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StatsManager", function() { return StatsManager; });
|
|
12557
12431
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lumaStats", function() { return lumaStats; });
|
|
12558
12432
|
/* harmony import */ var _luma_gl_gltools__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @luma.gl/gltools */ "../gltools/src/index.js");
|
|
12559
|
-
/* harmony import */ var
|
|
12433
|
+
/* harmony import */ var _probe_gl_stats__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @probe.gl/stats */ "../../node_modules/@probe.gl/stats/dist/esm/index.js");
|
|
12560
12434
|
/* harmony import */ var _probe_gl_env__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @probe.gl/env */ "../../node_modules/@probe.gl/env/dist/esm/index.js");
|
|
12561
12435
|
|
|
12562
12436
|
|
|
@@ -12565,7 +12439,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12565
12439
|
// Version detection using babel plugin
|
|
12566
12440
|
/* global __VERSION__ */
|
|
12567
12441
|
// @ts-ignore
|
|
12568
|
-
const VERSION = true ? "8.5.
|
|
12442
|
+
const VERSION = true ? "8.5.16" : undefined;
|
|
12569
12443
|
|
|
12570
12444
|
const STARTUP_MESSAGE = 'set luma.log.level=1 (or higher) to trace rendering';
|
|
12571
12445
|
// Assign luma.log.level in console to control logging: \
|
|
@@ -12579,7 +12453,7 @@ class StatsManager {
|
|
|
12579
12453
|
|
|
12580
12454
|
get(name) {
|
|
12581
12455
|
if (!this.stats.has(name)) {
|
|
12582
|
-
this.stats.set(name, new
|
|
12456
|
+
this.stats.set(name, new _probe_gl_stats__WEBPACK_IMPORTED_MODULE_1__["Stats"]({id: name}));
|
|
12583
12457
|
}
|
|
12584
12458
|
|
|
12585
12459
|
return this.stats.get(name);
|
|
@@ -13369,6 +13243,7 @@ function cloneTextureFrom(refTexture, overrides) {
|
|
|
13369
13243
|
|
|
13370
13244
|
const TextureType = refTexture.constructor;
|
|
13371
13245
|
|
|
13246
|
+
// @ts-expect-error
|
|
13372
13247
|
const {gl, width, height, format, type, dataFormat, border, mipmaps} = refTexture;
|
|
13373
13248
|
|
|
13374
13249
|
const textureOptions = Object.assign(
|
|
@@ -13385,6 +13260,7 @@ function cloneTextureFrom(refTexture, overrides) {
|
|
|
13385
13260
|
);
|
|
13386
13261
|
|
|
13387
13262
|
// TODO: move this to `Texture` class as instance method and use this.constructor
|
|
13263
|
+
// @ts-expect-error
|
|
13388
13264
|
return new TextureType(gl, textureOptions);
|
|
13389
13265
|
}
|
|
13390
13266
|
|