@luma.gl/core 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
 
@@ -26665,6 +26665,7 @@ class Resource {
26665
26665
  // Only meaningful for resources that allocate GPU memory
26666
26666
  this.byteLength = 0;
26667
26667
 
26668
+ this._initStats();
26668
26669
  this._addStats();
26669
26670
  }
26670
26671
 
@@ -26899,6 +26900,10 @@ class Resource {
26899
26900
  return this.gl.luma;
26900
26901
  }
26901
26902
 
26903
+ _initStats() {
26904
+ this.gl.stats = this.gl.stats || new _init__WEBPACK_IMPORTED_MODULE_1__["StatsManager"]();
26905
+ }
26906
+
26902
26907
  _addStats() {
26903
26908
  const name = this[Symbol.toStringTag];
26904
26909
  const stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get('Resource Counts');
@@ -26916,16 +26921,29 @@ class Resource {
26916
26921
  }
26917
26922
 
26918
26923
  _trackAllocatedMemory(bytes, name = this[Symbol.toStringTag]) {
26919
- const stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get('Memory Usage');
26924
+ this._doTrackAllocatedMemory(bytes, name);
26925
+ this._doTrackAllocatedMemory(bytes, name, this.gl.stats.get(`Memory Usage`));
26926
+ }
26920
26927
 
26928
+ _doTrackAllocatedMemory(
26929
+ bytes,
26930
+ name = this[Symbol.toStringTag],
26931
+ stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get(`Memory Usage`)
26932
+ ) {
26921
26933
  stats.get('GPU Memory').addCount(bytes);
26922
26934
  stats.get(`${name} Memory`).addCount(bytes);
26923
26935
  this.byteLength = bytes;
26924
26936
  }
26925
26937
 
26926
26938
  _trackDeallocatedMemory(name = this[Symbol.toStringTag]) {
26927
- const stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get('Memory Usage');
26939
+ this._doTrackDeallocatedMemory(name);
26940
+ this._doTrackDeallocatedMemory(name, this.gl.stats.get(`Memory Usage`));
26941
+ }
26928
26942
 
26943
+ _doTrackDeallocatedMemory(
26944
+ name = this[Symbol.toStringTag],
26945
+ stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get(`Memory Usage`)
26946
+ ) {
26929
26947
  stats.get('GPU Memory').subtractCount(this.byteLength);
26930
26948
  stats.get(`${name} Memory`).subtractCount(this.byteLength);
26931
26949
  this.byteLength = 0;
@@ -31206,11 +31224,12 @@ __webpack_require__.r(__webpack_exports__);
31206
31224
  /*!****************************!*\
31207
31225
  !*** ../webgl/src/init.js ***!
31208
31226
  \****************************/
31209
- /*! exports provided: lumaStats, default */
31227
+ /*! exports provided: StatsManager, lumaStats, default */
31210
31228
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
31211
31229
 
31212
31230
  "use strict";
31213
31231
  __webpack_require__.r(__webpack_exports__);
31232
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StatsManager", function() { return StatsManager; });
31214
31233
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lumaStats", function() { return lumaStats; });
31215
31234
  /* harmony import */ var _luma_gl_gltools__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @luma.gl/gltools */ "../gltools/src/index.js");
31216
31235
  /* harmony import */ var probe_gl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! probe.gl */ "../../node_modules/probe.gl/dist/esm/index.js");
@@ -31222,7 +31241,7 @@ __webpack_require__.r(__webpack_exports__);
31222
31241
  // Version detection using babel plugin
31223
31242
  /* global __VERSION__ */
31224
31243
  // @ts-ignore
31225
- const VERSION = true ? "8.5.11" : undefined;
31244
+ const VERSION = true ? "8.5.14" : undefined;
31226
31245
 
31227
31246
  const STARTUP_MESSAGE = 'set luma.log.level=1 (or higher) to trace rendering';
31228
31247
  // Assign luma.log.level in console to control logging: \