OptionalupdateOptionalrenderCalled every frame after update. If fixedStep is set, receives an
alpha in [0, 1) for interpolating between fixed updates — useful for
smooth rendering at any framerate.
OptionalfixedSeconds per fixed tick (e.g. 1/60 for 60 Hz physics). When set, the
loop runs fixedUpdate 0..N times per frame to catch up to wall time.
Omit for a pure variable-step loop.
OptionalfixedCalled for each fixed tick when fixedStep is set. dt is exactly
fixedStep, every time — deterministic for physics.
OptionalmaxCap on per-frame elapsed time, in seconds. Prevents the "spiral of death"
after a tab pauses or the debugger trips. Default 0.25 (250 ms).
OptionalschedulerCustom scheduler — useful for tests or non-browser runtimes.
Called every frame with the elapsed seconds since the previous frame (
dt). Use for camera, input polling, UI tween, etc.