# Pebble3D > Pebble3D is a browser 3D game engine: scenes are JSON files validated by a zod schema, rendered with the three.js WebGPU renderer and simulated by Rapier physics compiled from Rust to WebAssembly. To build a game: `git clone https://github.com/pebble3d/pebble3d`, run `pnpm i` (no Rust needed: the physics WASM is prebuilt), then follow `skills/make-a-game/SKILL.md`. Write a scene as JSON, drive it from TypeScript with `createGame`, and verify it with screenshots, determinism hashes and headless Node runs. Start with the getting-started guide, then keep the scene and API references open. `llms-full.txt` is every page below concatenated, generated by `pnpm docs:gen`. The scene JSON Schema is `packages/sdk/scene.schema.json`; its fields are already tabulated in the scene reference. ## Docs - [Getting started](docs/getting-started.md): from nothing to a JSON scene in the playground, then a minimal game app with a fixed-tick sim and `?demo=1` bot. - [AGENTS.md](AGENTS.md): working rules for coding agents: layout, commands, invariants and the before-you-finish checklist. - [Scene reference](docs/scene-reference.md): every scene JSON field with its type, default and meaning. - [API reference](docs/api-reference.md): `createGame`, the `Game` object, state buffers, raycasts, and the exports of `@pebble3d/sdk` and `@pebble3d/renderer`. - [Verification](docs/verification.md): prove a change works with `pnpm shot`, determinism hashes, demo bots and fps benches. - [Troubleshooting](docs/troubleshooting.md): error messages and symptoms, each with cause and fix. ## Cookbook - [scene-basics](docs/cookbook/scene-basics.md): A valid scene: ground, bounds, static and dynamic props, camera presets. - [prefabs-and-spawners](docs/cookbook/prefabs-and-spawners.md): Reusable entity templates; seeded streams of spawned bodies. - [bodies-impulses-velocity](docs/cookbook/bodies-impulses-velocity.md): Impulses, velocity, teleport, runtime spawn; reading pose and velocity. - [raycasts](docs/cookbook/raycasts.md): Ground probes, line of sight, picking; the three filters. - [character-and-camera](docs/cookbook/character-and-camera.md): A player character with `accel`, clips matched to speed, the third-person camera. - [splat-environments](docs/cookbook/splat-environments.md): A Gaussian-splat capture as the level, with colliders and shadows. - [post-and-toon-style](docs/cookbook/post-and-toon-style.md): Exposure, bloom, AO; the opt-in `post.style: "toon"`. - [depth-of-field](docs/cookbook/depth-of-field.md): Photo-mode blur with `renderer.dof`. - [deterministic-game-loop](docs/cookbook/deterministic-game-loop.md): Fixed-tick rules, input logs, replays and ghosts. - [demo-bot-and-captures](docs/cookbook/demo-bot-and-captures.md): A `?demo=1` autoplayer and a reproducible capture script. - [instanced-crowds-and-perf](docs/cookbook/instanced-crowds-and-perf.md): Instancing, crowds, workers, the `fast` build, budgets. - [audio-sfx](docs/cookbook/audio-sfx.md): Synthesised WebAudio cues without autoplay warnings. - [json-levels-and-headless-verify](docs/cookbook/json-levels-and-headless-verify.md): Levels as data, proven in Node with `pnpm --filter chain-reaction verify`. - [assets-and-licensing](docs/cookbook/assets-and-licensing.md): Adding a model, HDRI or splat through the asset manifest. - [sub-path-hosting](docs/cookbook/sub-path-hosting.md): Serving a game under `/some/path/`: Vite `--base`, the asset base, shared assets. - [custom-camera](docs/cookbook/custom-camera.md): Driving the camera yourself: removing the orbit controls, follow and spring-arm cameras. - [owning-the-world](docs/cookbook/owning-the-world.md): Worlds your code creates, steps and draws next to `createGame`; stale views; `stateHash`. ## Skills Agent playbooks for building a game with Pebble3D. For any request to make a game, start with make-a-game and follow it. - [make-a-game](skills/make-a-game/SKILL.md): the entry point; it runs the steps in this order, each with an exit check: interview, brief, scaffold, build, game feel, art pass, complete loop, verify. - [game-interview](skills/game-interview/SKILL.md): turn a vague idea into a short design brief the developer approves, with a non-interactive fallback. - [start-a-game](skills/start-a-game/SKILL.md): scaffold a new app under `apps/` the way the demos are laid out and prove it boots, captures and tests. - [verify-your-work](skills/verify-your-work/SKILL.md): what done means: tests, captures, sidecars, looking at every image, both backends. - [engine-pitfalls](skills/engine-pitfalls/SKILL.md): known engine traps as "if you see X, do Y", each linked to the full fix. - [game-feel](skills/game-feel/SKILL.md): hit-stop, shake, camera punch, particles, buffering and sound, tuned by watching capture sequences. - [art-direction](skills/art-direction/SKILL.md): commit to one look (palette, toon or PBR, lighting, post) and judge captures against it. - [complete-game-loop](skills/complete-game-loop/SKILL.md): title, play, results and restart, pause, HUD, a demo bot and a README. - [genre-playbooks](skills/genre-playbooks/SKILL.md): per-genre recipes that reuse the shipped demo for racers, platformers, tower defence and more. ## Examples - [Examples map](docs/examples.md): where each engine feature is used in the showcase games and the playground, by file and line range. ## Optional - [README](README.md): project overview, quickstart, showcase games and known limitations. - [LICENSE](LICENSE): the repository licence.