scale animation delta to seconds
This commit is contained in:
parent
f680d8082a
commit
82f5a75ecd
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue