Minimal example: procedural terrain, one dynamic physics sphere, and a small <GameObject place="…"> demo (terrain-sampled XZ + surface Y) with a child ParticleSystem. Entry is GAME.run() with default plugins. Use as a template for new Vite + VibeGame apps.
- Show the smallest
index.html+main.tsintegration - Demonstrate entity-centric placement (
placeattribute on<GameObject>) - Demonstrate physics with
<dynamic-part>
hello-world/
├── context.md # This file
├── src/
│ └── main.ts # Entry: GAME.run()
├── index.html # World XML (terrain, dynamic-part, entity + particles)
├── package.json
├── vite.config.ts
└── tsconfig.json
- In-scope: Declarative scene, default plugins, one placement demo
- Out-of-scope: GLB handoff, save/load, custom pipeline
src/main.ts:import * as GAME from 'vibegame'; GAME.run();index.html:<Scene>+ canvas + Vite module entry
<Terrain>— procedural LOD terrain<dynamic-part>— Rapier dynamic body (sphere)<GameObject place="at: x z; …">— deterministic XZ + terrain height;ParticleSystemas child (local transform)- Default plugins (physics, rendering, particles, spawner, etc.)
cd VibeGame/examples/hello-world
bun install
bun run dev- Spawner / placement behaviour:
../../src/plugins/spawner/context.md - Larger demo:
../simple-rpg/README.md
<GameObject place="at: 0 -12; base-y-offset: 0.02">
<ParticleSystem preset="fire"
rate="12"
transform="pos: 0 0.25 0"
></ParticleSystem>
</GameObject>The root entity is positioned on the terrain; emitters (or GLTFLoader, NPC, etc.) are children in the ECS hierarchy.