mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Merge a193867e53
into 5b9000155d
This commit is contained in:
commit
e1591f1719
@ -42,7 +42,7 @@ export class DynamicTickrate {
|
||||
const now = performance.now();
|
||||
const timeDuration = now - this.accumulatedFpsLastUpdate;
|
||||
if (timeDuration > fpsAccumulationTime) {
|
||||
const avgFps = (this.accumulatedFps / fpsAccumulationTime) * 1000;
|
||||
const avgFps = (this.accumulatedFps / timeDuration) * 1000;
|
||||
this.averageFps = avgFps;
|
||||
this.accumulatedFps = 0;
|
||||
this.accumulatedFpsLastUpdate = now;
|
||||
|
Loading…
Reference in New Issue
Block a user