stats-gl 2.2.4 → 2.2.5

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.
Files changed (2) hide show
  1. package/lib/main.ts +5 -5
  2. package/package.json +1 -1
package/lib/main.ts CHANGED
@@ -138,11 +138,6 @@ class Stats {
138
138
  renderer.render = function (scene: THREE.Scene, camera: THREE.Camera) {
139
139
 
140
140
 
141
- if (statsInstance.info !== undefined) {
142
- statsInstance.totalGpuDuration = this.info.render.timestamp
143
- statsInstance.totalGpuDurationCompute = this.info.compute.timestamp
144
- }
145
-
146
141
  statsInstance.begin(); // Start tracking for this render call
147
142
 
148
143
  // Call the original render method
@@ -325,6 +320,11 @@ class Stats {
325
320
 
326
321
  if (this.info === undefined) {
327
322
  this.processGpuQueries();
323
+ } else {
324
+
325
+ this.totalGpuDuration = this.info.render.timestamp
326
+ this.totalGpuDurationCompute = this.info.compute.timestamp
327
+
328
328
  }
329
329
 
330
330
  this.endProfiling('cpu-started', 'cpu-finished', 'cpu-duration');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stats-gl",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "type": "module",
5
5
  "author": "Renaud ROHLINGER (https://github.com/RenaudRohlinger)",
6
6
  "homepage": "https://github.com/RenaudRohlinger/stats-gl",