Skip to content

Engine API

Systems run once per fixed tick in this exact order:

#PhaseConstantDescription
1inputPHASE.INPUTSample input devices (keyboard, mouse, gamepad) at the top of the frame.
2prePhysicsPHASE.PRE_PHYSICSApply forces/intents to rigid bodies before the physics step.
3physicsPHASE.PHYSICSStep the Rapier physics world (fixed timestep).
4postPhysicsPHASE.POST_PHYSICSRead physics results back; sync transforms from bodies to Object3D.
5gameLogicPHASE.GAME_LOGICGeneral gameplay behavior.
6animationPHASE.ANIMATIONAdvance animation graphs / mixers.
7preRenderPHASE.PRE_RENDERFinal per-frame fixups (cameras, HUD state) before drawing.
8renderPHASE.RENDERDraw the frame.