---
url: /pawn/docs/examples.md
description: The live showcase examples and where their sources are.
---

# Showcase

Every example below runs live in the [showcase](https://jakubprill.github.io/pawn/).
Their sources live in `apps/showcase/src` of the repository, one folder per
example, with the entry each card names; helpers used by several examples
sit in `shared/`. The racer is an app of its own, in `apps/racer`.

* [Cube](https://jakubprill.github.io/pawn/cube.html): Shapes, two views, clicks bubbling to one listener, `TweenOn` (vanilla TypeScript). Source: `apps/showcase/src/cube/`.
* [React](https://jakubprill.github.io/pawn/react.html): `<Pawn>`, `useSpawn`, `useSystem`, instanced `Shape`s and koota queries driving UI. Source: `apps/showcase/src/react/`.
* [Physics](https://jakubprill.github.io/pawn/physics.html): Rapier bodies in prefab variants, stepped in `fixedUpdate`; a sensor pad's `collisionstart`. Source: `apps/showcase/src/physics/`.
* [Solar](https://jakubprill.github.io/pawn/solar.html): Prefabs with named children: orbits inside orbits, `Spin`, `Clickable` and `TweenOn`. Source: `apps/showcase/src/solar/`.
* [Swarm](https://jakubprill.github.io/pawn/swarm.html): Thousands of entities with `Instance` and `InstanceBatch`. Source: `apps/showcase/src/swarm/`.
* [Maps](https://jakubprill.github.io/pawn/maps.html): The engine drawn into a Google vector map. Source: `apps/showcase/src/maps/`.
* [Views](https://jakubprill.github.io/pawn/views.html): One canvas drawing a view into every card of a page: `Hoverable`, `Clickable`, `Input`. Source: `apps/showcase/src/views/`.
* [Balloons](https://jakubprill.github.io/pawn/balloons.html): A tap-only game for little kids with a score and storm clouds to avoid: picking, tweens, physics confetti. Source: `apps/showcase/src/balloons/`.
* [Munch](https://jakubprill.github.io/pawn/munch.html): A drag-or-tap feeding game for little kids: `Draggable` on a plane, tweens, physics crumbs. Source: `apps/showcase/src/munch/`.
* [Energy](https://jakubprill.github.io/pawn/energy.html): A microgrid dashboard in React: node picking, `ChildOf` rotors, instanced power pulses, live charts. Source: `apps/showcase/src/energy/`.
* [CMS Health](https://jakubprill.github.io/pawn/cms.html): A Payload CMS site in 3D, fed by `@pawnjs/data`: instanced blocks, `EntityLabel`, `CameraRig`. Source: `apps/showcase/src/cms/`.
* [CMS Flow](https://jakubprill.github.io/pawn/cms-flow.html): The same CMS as a full-screen pipeline of tiles and pipes: feeds, tweens, `CameraRig`. Source: `apps/showcase/src/cms-flow/`.
* [Defense](https://jakubprill.github.io/pawn/defense.html): A tower defense built from prefabs, presets and behaviors: `Spawner` waves, `Grid`, `Actions`, `Sound`, `Debug`, tested headless. Source: `apps/showcase/src/defense/`.
* [Pawn. Racer](https://jakubprill.github.io/pawn/racer/): The racer's hub, linking the race and each micro demo below. Each racer scene (the race and every micro demo) opened with `?debug` shows the `Debug` overlay.
* [Racer hangar](https://jakubprill.github.io/pawn/racer/hangar.html): The ship prefab of an anti-gravity racer in five team liveries, on a turntable: `CameraRig`, shadows and tone mapping. Source: `apps/racer/src/hangar.ts`.
* [Racer track](https://jakubprill.github.io/pawn/racer/track.html): A three-lap race against four rivals who pass and bump, on the banked Vanta Loop, the climbing, diving Altair Drop, Zenith Wall straight up a wall, Vega Coil round a spring of road or Rigel Orbit upside down through a loop: `ChaseCamera`, `Actions` with tilt and on-screen buttons, synthesized engine `Sound`, a radar `View`, team names over the rivals with `Labels`. Source: `apps/racer/src/circuit.ts`.
* [Racer trackside](https://jakubprill.github.io/pawn/racer/trackside.html): The track's barriers and gates close up: holo grid fields and neon rings glowing through a bloom pass, or solid walls and beams, in any accent. Source: `apps/racer/src/trackside.ts`.
* [Racer stadium](https://jakubprill.github.io/pawn/racer/stadium.html): Stands by the track with LED ribbons that scroll a message; a plugin, installed through `usesPlugin`, moves their textures each frame. Type a message, set its speed and accent. Source: `apps/racer/src/stands.ts`.
* [Racer towers](https://jakubprill.github.io/pawn/racer/towers.html): Art deco towers along a climbing street, each a `definePrefab` whose look rebuilds when its layout trait is set (`rebuildOn`): height, setbacks, signs and accent. Source: `apps/racer/src/towers.ts`.
* [Racer sky](https://jakubprill.github.io/pawn/racer/sky.html): Night, dusk and day over a straight of triangle boost pads: a sky prefab with stars and a glowing sun, rebuilt when its layout trait is set; raise the sun, thin the stars, color the pads. Source: `apps/racer/src/skies.ts`.
* [Seabirds](https://jakubprill.github.io/pawn/birds.html): Low-poly birds soaring over a sea and a hill drawn in colored pencil: a `definePrefab` bird with two behaviors, flapping in bursts and flying a figure eight as a loose flock; tap to rouse it. Source: `apps/showcase/src/birds/`.
* [AI scene](https://jakubprill.github.io/pawn/ai-scene.html): A hall described in words and streamed in by Claude as `@pawnjs/json-render` lines of registered prefabs (prototype). Source: `apps/showcase/src/ai-scene/`.

To run them locally:

```bash
bun install
bunx turbo run dev --filter=pawn-showcase
```

The Maps example needs a Google Maps API key in `apps/showcase/.env.local`
(`VITE_GOOGLE_MAPS_API_KEY`, optionally `VITE_GOOGLE_MAPS_MAP_ID`).
