Run tick(dt) on every animation frame; dt is seconds since the previous frame (0 on the first call). Returns a cancel function that stops the loop — no further ticks fire after it's called, even if one was already queued.
tick(dt)
dt
Run
tick(dt)on every animation frame;dtis seconds since the previous frame (0 on the first call). Returns a cancel function that stops the loop — no further ticks fire after it's called, even if one was already queued.