From d42774ad1f8b8282ecc2382fc60414f73913ccc1 Mon Sep 17 00:00:00 2001 From: James Turk Date: Tue, 9 Jul 2024 03:19:24 -0500 Subject: [PATCH] add updatesPerSecond --- artworld/world.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/artworld/world.js b/artworld/world.js index 7e2d1e4..19cc69c 100644 --- a/artworld/world.js +++ b/artworld/world.js @@ -46,6 +46,10 @@ export class World { } } + get updatesPerSecond() { + return (this.numTicks / this.timer.time()) * 1000; + } + loopStep() { window.requestAnimationFrame(() => this.loopStep());