@luma.gl/engine 8.5.12 → 8.5.15

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 CHANGED
@@ -3585,7 +3585,7 @@ __webpack_require__.r(__webpack_exports__);
3585
3585
 
3586
3586
 
3587
3587
 
3588
- const VERSION = true ? "8.5.11" : undefined;
3588
+ const VERSION = true ? "8.5.14" : undefined;
3589
3589
  const isBrowser = Object(_lib_is_browser__WEBPACK_IMPORTED_MODULE_0__["default"])();
3590
3590
  //# sourceMappingURL=globals.js.map
3591
3591
 
@@ -10580,7 +10580,7 @@ __webpack_require__.r(__webpack_exports__);
10580
10580
 
10581
10581
 
10582
10582
 
10583
- const VERSION = true ? "8.5.11" : undefined;
10583
+ const VERSION = true ? "8.5.14" : undefined;
10584
10584
  const isBrowser = Object(_env_is_browser__WEBPACK_IMPORTED_MODULE_0__["default"])();
10585
10585
  //# sourceMappingURL=globals.js.map
10586
10586
 
@@ -22975,6 +22975,7 @@ class Resource {
22975
22975
  // Only meaningful for resources that allocate GPU memory
22976
22976
  this.byteLength = 0;
22977
22977
 
22978
+ this._initStats();
22978
22979
  this._addStats();
22979
22980
  }
22980
22981
 
@@ -23209,6 +23210,10 @@ class Resource {
23209
23210
  return this.gl.luma;
23210
23211
  }
23211
23212
 
23213
+ _initStats() {
23214
+ this.gl.stats = this.gl.stats || new _init__WEBPACK_IMPORTED_MODULE_1__["StatsManager"]();
23215
+ }
23216
+
23212
23217
  _addStats() {
23213
23218
  const name = this[Symbol.toStringTag];
23214
23219
  const stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get('Resource Counts');
@@ -23226,16 +23231,29 @@ class Resource {
23226
23231
  }
23227
23232
 
23228
23233
  _trackAllocatedMemory(bytes, name = this[Symbol.toStringTag]) {
23229
- const stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get('Memory Usage');
23234
+ this._doTrackAllocatedMemory(bytes, name);
23235
+ this._doTrackAllocatedMemory(bytes, name, this.gl.stats.get(`Memory Usage`));
23236
+ }
23230
23237
 
23238
+ _doTrackAllocatedMemory(
23239
+ bytes,
23240
+ name = this[Symbol.toStringTag],
23241
+ stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get(`Memory Usage`)
23242
+ ) {
23231
23243
  stats.get('GPU Memory').addCount(bytes);
23232
23244
  stats.get(`${name} Memory`).addCount(bytes);
23233
23245
  this.byteLength = bytes;
23234
23246
  }
23235
23247
 
23236
23248
  _trackDeallocatedMemory(name = this[Symbol.toStringTag]) {
23237
- const stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get('Memory Usage');
23249
+ this._doTrackDeallocatedMemory(name);
23250
+ this._doTrackDeallocatedMemory(name, this.gl.stats.get(`Memory Usage`));
23251
+ }
23238
23252
 
23253
+ _doTrackDeallocatedMemory(
23254
+ name = this[Symbol.toStringTag],
23255
+ stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get(`Memory Usage`)
23256
+ ) {
23239
23257
  stats.get('GPU Memory').subtractCount(this.byteLength);
23240
23258
  stats.get(`${name} Memory`).subtractCount(this.byteLength);
23241
23259
  this.byteLength = 0;
@@ -27516,11 +27534,12 @@ __webpack_require__.r(__webpack_exports__);
27516
27534
  /*!****************************!*\
27517
27535
  !*** ../webgl/src/init.js ***!
27518
27536
  \****************************/
27519
- /*! exports provided: lumaStats, default */
27537
+ /*! exports provided: StatsManager, lumaStats, default */
27520
27538
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
27521
27539
 
27522
27540
  "use strict";
27523
27541
  __webpack_require__.r(__webpack_exports__);
27542
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StatsManager", function() { return StatsManager; });
27524
27543
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lumaStats", function() { return lumaStats; });
27525
27544
  /* harmony import */ var _luma_gl_gltools__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @luma.gl/gltools */ "../gltools/src/index.js");
27526
27545
  /* harmony import */ var probe_gl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! probe.gl */ "../../node_modules/probe.gl/dist/esm/index.js");
@@ -27532,7 +27551,7 @@ __webpack_require__.r(__webpack_exports__);
27532
27551
  // Version detection using babel plugin
27533
27552
  /* global __VERSION__ */
27534
27553
  // @ts-ignore
27535
- const VERSION = true ? "8.5.11" : undefined;
27554
+ const VERSION = true ? "8.5.14" : undefined;
27536
27555
 
27537
27556
  const STARTUP_MESSAGE = 'set luma.log.level=1 (or higher) to trace rendering';
27538
27557
  // Assign luma.log.level in console to control logging: \