Rengine / docsProject documentation

Reference

Scenes and Runtime Loop

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

Scenes are named collections of entities, and the engine state tracks both the list of scenes and the active scene. Scene helpers create scenes, activate them, add entities, and remove entities.

(et+1,St+1)=c(Δt,et,scenet,St)(e_{t+1}, S_{t+1}) = c(\Delta t, e_t, scene_t, S_t)
Component update. A component advances an entity and may also return a changed engine state.

The update model is component-oriented. Components receive delta time, the current entity, the scene, and previous engine state, then return an updated entity and state. Movement and animation logic stay attached to entities instead of leaking into the renderer.

Rengine does not implement a full entity-component-system with indexed component stores and query planning. Components are ordered functions on an entity. The smaller model is easier to read and sufficient for the project's goal: show how motion changes entity transforms before those transforms are projected into canvas or React output.

  • Demo components include rotations, velocities, square paths, and star paths.
  • The active scene is recreated when the selected sample changes.
  • The runtime tree is periodically synchronized back into the React inspector.