Core guide
Game timing
Drive deterministic update and draw loops with bounded deltas.
Live example
See Game timing in action
Watch motion advance from frame deltas supplied by the scheduler.
How it works
The scheduler supplies monotonic time to update callbacks. The default frame loop clamps large deltas, while fixed_step opts into bounded fixed updates and reports discarded catch-up time.
Public types
FrameSchedulerUpdateTimeFrameLoopStatemax_delta_secondsFixedStepOptions
Minimum viable example
const scheduler: FrameScheduler = {
request_frame: requestAnimationFrame,
cancel_frame: cancelAnimationFrame,
now_seconds: () => performance.now() / 1000,
};Scope and limitations
Interpolation, rollback, and scheduler integrations beyond the browser frame API are deferred.