Rengine / docsProject documentation

Reference

Loop Scheduling

Look up syntax, contracts, layouts, algorithms, and exact behavior.

The loop has two modes: interval-based stepping and animation-frame stepping. In both modes the frame operation is the same: compute delta time, tick the active scene, apply the global update hook, and render the new engine state. Delta time is passed into every component so animation speed is independent of frame count.

timestamp
  |
  v
delta = timestamp - previousTimestamp
  |
  v
TickActiveScene(delta, state)
  |
  v
Lifecycle.update(delta, state)
  |
  v
render(state)
  |
  v
store state for next frame
Frame operation. The frame path is stable regardless of whether scheduling comes from requestAnimationFrame or an interval.
xt+Δt=xt+vΔtx_{t+\Delta t}=x_t+v\Delta t
Delta-time update. Velocity-style components update position from elapsed time rather than from an assumed frame rate.

The portfolio route caps large deltas before rendering so a suspended tab or stutter does not produce a single enormous movement step in the visible inspection surface.