- Introduce a new 5-minute "The Reef" scene registered in the menu, drifting along a sunlit coral reef - Add `pathTrack` (Catmull-Rom 2D path) to Timeline and a reusable `Stamp` buffer for outlined, tinted creature rendering - Build three parallax reef layers with procedurally generated corals, swaying anemones/fans/kelp, plus water, caustics, god rays, marine snow, bubbles and floor shadows - Animate clownfish, sunfish, a gliding stingray, jellyfish, fish schools, and a baby turtle meeting two adults before they swim off together - Bundle the scene's music track (public/audio/the-reef.mp3) |
||
|---|---|---|
| docker | ||
| public/audio | ||
| scripts | ||
| src | ||
| .dockerignore | ||
| .gitignore | ||
| Dockerfile | ||
| README.md | ||
| docker-check.png | ||
| docker-compose.yml | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| sample.env | ||
| tsconfig.json | ||
| vite.config.ts | ||
README.md
Pixeltation
Calm pixel art meditations for the browser. Pick a journey from the main menu, settle in, and watch.
Run
With Node (local)
npm install
npm run dev # http://localhost:5173
npm run build # static site in dist/
With Docker Compose
docker compose up --build -d # production build served by nginx → http://localhost:8080
docker compose --profile dev up --build dev # Vite dev server with hot reload → http://localhost:5173
docker compose down # stop
Change the host ports with PIXELTATION_PORT / PIXELTATION_DEV_PORT, either inline
(e.g. PIXELTATION_PORT=3000 docker compose up -d) or by copying sample.env to .env and editing it. The dev service bind-mounts the project,
so edits on the host reload in the browser; don't run it and npm run dev on the same port at once.
| File | Purpose |
|---|---|
Dockerfile |
Multi-stage: deps → dev (Vite) / build (typecheck + bundle) → runtime (nginx) |
docker-compose.yml |
web service (default) and dev service (dev profile) |
docker/nginx.conf |
Static serving, gzip, long-cache for fingerprinted /assets |
Meditations
| id | Title | Length |
|---|---|---|
northern-cabin |
Northern Cabin — winter sunset by a quiet lake | 5 min |
mediterranean-coast |
Mediterranean Coast — clearing skies over a jungle cove | 5 min |
the-reef |
The Reef — drifting along a sunlit coral reef | 5 min |
Each meditation lives in src/meditations/<id>/ and is registered in src/meditations/registry.ts.
A scene is a pure function of time (render(surface, t)), drawn pixel by pixel into a 320×180 buffer
that is scaled up crisply, so all art is generated in code.
Music and ambience
Audio lives in public/audio/ and is configured per meditation in its index.ts:
music: 'audio/<file>.mp3'— background track; fades in at the start and out over the last 10 seconds.ambience: { src: 'audio/<file>.mp3', volume }— a seamless loop (Web Audio) locked to the scene clock, so visuals keyed to it stay in sync, including after pause and skip. Mediterranean Coast usesfx-waves.mp3; its wave crashes are timed to the peaks listed inmediterranean-coast/waves.ts(re-measure them if the file changes).
With Docker, rebuild the web image (docker compose up --build -d) after adding audio so it's included.
Dev tools
#/m/northern-cabin?t=150&speed=10starts at 150 s and plays at 10× (dev server only).[/]skip back/forward 10 s while playing (dev server only).npm run snapshot -- northern-cabin 0 120 200renders frames tosnapshots/as PNGs without a browser.