# Examples

> `@typegpu/kit` 0.1.0. If it is installed, read `node_modules/@typegpu/kit/docs/` instead.

Each example runs full screen in a WebGPU browser at `examples/<name>/`. Its Markdown, `examples/<name>.md`, holds its description and every file, in reading order.

## Worlds

Lit scenes of models, shadows and post-processing.

- [Jelly world](examples/jelly-world.md): A ray-marched jelly slider to squish and stretch. Give it a few seconds.
- [Classroom](examples/classroom.md): Blender's Classroom with baked lightmaps and sunbeams through the dust.
- [Night market](examples/night-market.md): A potion stall on a rainy night, lit by a lantern, a fire and two lamps.
- [Afterimage](examples/afterimage.md): A Foucault pendulum in a sunlit concrete hall, drawn like a PS2-era game.
- [Cloister](examples/cloister.md): A cloister at the blue hour, its lanterns casting shadows through the arches.
- [Fireworks](examples/fireworks.md): Fireworks over a castle lake. Every burst lights up everything around it.
- [Hex isle](examples/hex-isle.md): A hex-tile island through a whole day, shot like a tilt-shift miniature.
- [Forest](examples/forest.md): 20 000 trees in the wind, culled on the GPU every frame.
- [Quiver trees](examples/quiver-trees.md): 8 000 scanned trees and boulders that turn into impostor cards past 40 m.
- [Kinetic](examples/kinetic.md): A Calder mobile turning under a GPU-baked sky, from noon to dusk.

## Simulations

Physics, growth and particles stepped on the GPU.

- [Falling sand](examples/falling-sand.md): Paint sand, water and lava into a cave lit only by its own glow.
- [Ocean](examples/ocean.md): A near gale at dusk, with FFT waves, foam on the crests and a low sun.
- [Censer](examples/censer.md): Incense smoke from a swinging censer, simulated in 3D on the GPU.
- [Slime mould](examples/slime-mould.md): 400 000 agents grow a slime mould network toward the food you drop.
- [Domino run](examples/dominoes.md): 1 474 dominoes in late sun. Tap one and the wave runs.
- [SPH sculpt](examples/sph-sculpt.md): Dig channels in clay and the spring water finds its way downhill.
- [Fish tank](examples/fishtank.md): 3 340 schooling fish as GPU boids. Press F to feed them.
- [Benthos](examples/benthos.md): Light through deep water and marine snow. Move the pointer to stir it.
- [Ember mirror](examples/ember-mirror.md): Move in front of the camera and your outline sheds embers.

## Animation

Skinned crowds, solved limbs and soft bodies.

- [Stampede](examples/stampede.md): 4 096 horses in a golden valley. Spook them and the panic spreads.
- [Skeletons](examples/skeletons.md): 300 skeletons brawling in a moonlit courtyard, run by a GPU state machine.
- [Jellies](examples/jellies.md): Translucent jellyfish drawn in any order. Tap one and it flashes.
- [Spider](examples/spider.md): A spider walking over GPU-made hills toward wherever you point.
- [Robot arm](examples/robot-arm.md): A toy robot arm stacking painted blocks by colour. Tap one to move it.

## Data

Picking, labels and lines.

- [Solar system](examples/solar-system.md): Planets wrapped in their own facts. Tap one and its details type out.
- [Star map](examples/star-map.md): 20 000 stars. Hover one and the GPU picks it in the same frame.
- [Survey model](examples/survey-model.md): An island as a stack of contour rings, traced on the GPU.

## Games

Something to play.

- [Platformer](examples/platformer.md): A pixel-art platformer printed on paper cards under a desk lamp.
- [Blockfall](examples/blockfall.md): A 3D falling-block puzzle in stone and glass. Clear a layer and it shatters.

## Techniques

One technique each, small enough to read in one sitting.

- [Lattice](examples/lattice.md): Thin beams and rising embers, smoothed over time with TAA.
- [Raymarch](examples/raymarch.md): Five balls melting into a cube, ray-marched in one pass.
- [Flow field](examples/flow-field.md): 65 536 particles flowing along Perlin noise.
- [Jump flood](examples/jump-flood.md): A map of 48 drifting towns whose borders redraw every frame.
