scale animation delta to seconds

This commit is contained in:
Tangent Wantwight 2024-01-23 23:54:30 -05:00
parent f680d8082a
commit 82f5a75ecd
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ export function tick(fps: number): Source<PhysicsTick | RenderTick> {
let animationFrame = requestAnimationFrame(function animationTick() {
const now = new Date().getTime();
callback(["render", now - lastPhysicsTick]);
callback(["render", (now - lastPhysicsTick) / 1000]);
animationFrame = requestAnimationFrame(animationTick);
});