Skip to content

Showcase ​

Every example below runs live in the showcase. 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 exampleCubeShapes, two views, clicks bubbling to one listener, TweenOn (vanilla TypeScript)apps/showcase/src/cube/React exampleReact<Pawn>, useSpawn, useSystem, instanced Shapes and koota queries driving UIapps/showcase/src/react/Physics examplePhysicsRapier bodies in prefab variants, stepped in fixedUpdate; a sensor pad's collisionstartapps/showcase/src/physics/Solar exampleSolarPrefabs with named children: orbits inside orbits, Spin, Clickable and TweenOnapps/showcase/src/solar/Swarm exampleSwarmThousands of entities with Instance and InstanceBatchapps/showcase/src/swarm/
Needs a Google Maps key
MapsThe engine drawn into a Google vector mapapps/showcase/src/maps/
Views exampleViewsOne canvas drawing a view into every card of a page: Hoverable, Clickable, Inputapps/showcase/src/views/Balloons exampleBalloonsA tap-only game for little kids with a score and storm clouds to avoid: picking, tweens, physics confettiapps/showcase/src/balloons/Munch exampleMunchA drag-or-tap feeding game for little kids: Draggable on a plane, tweens, physics crumbsapps/showcase/src/munch/Energy exampleEnergyA microgrid dashboard in React: node picking, ChildOf rotors, instanced power pulses, live chartsapps/showcase/src/energy/CMS Health exampleCMS HealthA Payload CMS site in 3D, fed by @pawnjs/data: instanced blocks, EntityLabel, CameraRigapps/showcase/src/cms/CMS Flow exampleCMS FlowThe same CMS as a full-screen pipeline of tiles and pipes: feeds, tweens, CameraRigapps/showcase/src/cms-flow/Defense exampleDefenseA tower defense built from prefabs, presets and behaviors: Spawner waves, Grid, Actions, Sound, Debug, tested headlessapps/showcase/src/defense/Pawn. Racer examplePawn. RacerAn anti-gravity racer built prefab by prefab: a three-lap race against four rivals on five circuits (ChaseCamera, Actions with tilt and on-screen buttons, engine Sound, a radar View, rival tags with Labels), and its hangar, trackside, stadium, towers and skies close up (rebuildOn, usesPlugin)apps/racer/src/Seabirds exampleSeabirdsLow-poly birds over a sea drawn in colored pencil: a definePrefab bird with two behaviors, flapping in bursts and flying as a loose flockapps/showcase/src/birds/AI scene exampleAI sceneA hall described in words and streamed in by Claude as @pawnjs/json-render lines of registered prefabs (prototype)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).