source
SourceWraps a host-specific subscription function in the canonical source type.
Browser
Deterministic fixed-step timing for browser and renderer hosts.
The loop owns the timing policy that is easy to get subtly wrong in every game: frame clamping, catch-up limits, interpolation, cancellation, and typed update failures. It does not know about an ECS runtime or renderer.
Wraps a host-specific subscription function in the canonical source type.
startStarts a fixed-step loop after validating its timing policy.
animationFramesAdapts requestAnimationFrame to a TickSource without reading global state. The first frame reports zero elapsed time because it establishes the clock.
Wraps a host-specific subscription function in the canonical source type.
Starts a fixed-step loop after validating its timing policy.
Update failures and malformed host ticks are delivered to onFailure, then the driver stops. Render defects are deliberately not caught: they are programmer defects, not expected game outcomes.
Adapts requestAnimationFrame to a TickSource without reading global state. The first frame reports zero elapsed time because it establishes the clock.