# AI prompt template

Paste this when asking an AI to extend or fork a game on this stack.

---

You are working in **ngin**, a static HTML + ES module Three.js 0.185 WebGPU sandbox. No npm, Vite, React, or OOP.

**Read first:** `docs/walking-module.md`, `docs/interaction-module.md`, `docs/vehicle-module.md`, `docs/glb-module.md`, `docs/pbr-module.md`, `docs/water-module.md`, reference `src/sandbox.js`, starter `src/games/template.js`.

**Stack to reuse (do not duplicate):**

- `src/engine/` — WebGPU loop
- `src/input/InputManager.js` — WASD, jump, crouch, sprint, mouse look, `wasPressed` (pass `engine`)
- `src/physics/PhysicsWorld.js` — Jolt 1.1.0 CharacterVirtual + static/dynamic bodies
- `src/physics/Water.js` — buoyancy volumes + water surface
- `src/camera/CameraManager.js` — first/third person
- `src/player/Player.js` + `src/player/CharacterModel.js` — R6 character + locomotion
- `src/player/Flashlight.js` — L toggles a camera spotlight
- `src/player/Use.js` — E/F/G look-at actions, carry, inventory
- `src/vehicle/Vehicle.js` — wheeled vehicles (`car`, `truck`, `bus`, `kenworth`)
- `src/vehicle/Boat.js` — buoyant boat
- `src/graphics/Environment.js`, `MaterialLibrary.js`, `PbrMaterial.js`, `ProceduralTextures.js`, `Particles.js`, `Weather.js`

**Rules:**

- Vanilla JS, functional style (factory functions, closures). No classes.
- Every solid mesh needs a matching collider (`addStaticBox`, `addStaticConvexHull`, or `addStaticMesh` for GLB).
- Do not replace the R6 character with GLB for the player unless explicitly asked.
- Props: `src/assets/AssetManager.js` + `src/assets/placeGltf.js` (clone, do not add `gltf.scene` raw).
- Run with `php -S localhost:8080`; sandbox is `game.html` → `src/main.js`.

**Task:** [describe your game — level layout, mechanics, UI]

**Deliver:** New module under `src/games/` and a one-line change to `src/main.js` if needed.

---
