Foundations
Start with the quick start, then use these foundations to understand the project it created.
The model
Section titled “The model”- A project is its roots.
vgai.project.jsondeclares every mounted Three, Canvas, and DOM surface. - Source is the document. A first-party spatial world is TSX; React UI is JSX.
- The world node is the entity. There is no separate ECS or mirror tree.
- Behavior uses the world’s native idiom. R3F components call
useFrame; Pixi components calluseTick; an ingested game keeps its own loop. - Scenes compose; prefabs reuse. Replaceable compositions live under
src/scenes/. A story-backed component undersrc/prefabs/is independently placeable and reusable. - Libraries stay native. Use Three.js, Rapier, React, PixiJS, and Colyseus directly.
- Simulation and presentation are explicit. Fixed simulation phases run in order while presentation can run at display rate.
- Play mode is proof. A development game runs in the editor; exporting unlocks its standalone build.
Current lesson
Section titled “Current lesson”- World code in action — write a source
component with
useFrameand see it run in Play mode.
Continue with Worlds and roots and The game loop and phases for the exact contracts.