
router
TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.
It shows how a complete game can be built without any external models, textures, fonts, or audio, while also demonstrating a structurally enforced NPR rendering pipeline, procedurally eroded terrain, and a deterministic review harness.
A cel-shaded downhill BMX racing game. Four riders, point to point, summit to valley floor. Built in Three.js and TypeScript.
Every asset in this repository is generated by the code in this repository. No downloaded models, textures, HDRIs, fonts, or audio. Every mesh is built from geometry primitives and procedural lathes in code. Every texture is rasterised with canvas 2D or evaluated in a shader. Every sound is synthesized with the Web Audio API. The mountain is noise plus a hydraulic erosion simulation. The letterforms in the HUD are drawn as paths.
npm install
npm run dev
That is the whole setup. Open the URL it prints and you are racing.
| W / ↑ | Pedal |
| A D / ← → | Steer |
| S / ↓ | Rear brake — locks the back wheel, scrubs speed, throws dirt |
| Q | Front brake |
| Space | Crouch → preload. Hold into a lip, release at the top for extra air. Also bunny-hops on flat ground. |
| J / K | Lean back / forward. Lean back on the flat to manual. |
| Shift + direction | Trick modifier 1 (tailwhip, x-up) |
| E + direction | Trick modifier 2 (superman, tabletop) |
| F | Boost — spends the meter you filled with tricks |
| R | Reset to the last checkpoint |
| C | Look back |
| V | Cycle camera |
| Esc | Pause |
| ` | Debug overlay |
A standard gamepad works too; the left stick bypasses the keyboard's input smoothing.
The one mechanic worth learning: preload and pump. Hold crouch on the approach to a lip and release it at the lip. Time it well and you leave the ground with substantially more vertical velocity than the ramp gave you. Release early and you go flat. There is a ~140ms window and it is the skill ceiling of the whole game.
One committed palette: dawn-gold alpine. A low sun at 21.5° raking across the mountain
from the east-southeast, cool violet-slate shadows, and a teal-shifted haze stacking the
far ridges into flat paper layers. Every colour in the game is declared in
src/npr/Palette.ts and nowhere else.
Three rules the code enforces structurally, not by convention:
MeshStandardMaterial anywhere in the
project and no code path that could construct one. Every surface is a CelMaterial
built from a RampPreset.Similar projects matched by category, topics, and programming language.

TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.
scriptc compiles ordinary TypeScript into small, fast native executables without needing Node.js, V8, or any JavaScript runtime in the binary.
A proof-of-concept that transfers files between two devices using only a screen and camera by encoding data as an endless stream of animated QR codes with fountain coding to handle dropped frames.