add updatesPerSecond

This commit is contained in:
James Turk 2024-07-09 03:19:24 -05:00
parent cf054b01d9
commit d42774ad1f

View File

@ -46,6 +46,10 @@ export class World {
} }
} }
get updatesPerSecond() {
return (this.numTicks / this.timer.time()) * 1000;
}
loopStep() { loopStep() {
window.requestAnimationFrame(() => this.loopStep()); window.requestAnimationFrame(() => this.loopStep());