fix: resolve fps counter showing increased fps when opened multiple times (@blru) (#5990)

This commit is contained in:
Blerru 2024-11-04 05:55:43 -05:00 committed by GitHub
parent 3df9ca4808
commit bf1f3202fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,7 +25,8 @@ export function start(): void {
stopLoop = false;
frameCount = 0;
startTime = performance.now();
fpsInterval = window.requestAnimationFrame(loop);
if (!fpsInterval) fpsInterval = window.requestAnimationFrame(loop);
el.classList.remove("hidden");
}