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.
- package/lib/main.ts +5 -5
- 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');
|