mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
minor fps fix
This commit is contained in:
parent
679e7f168c
commit
a193867e53
@ -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