This branch is a fresh starting point for fast canvas/WebGL prototypes. It keeps the tooling (Vite + vanilla JS) but strips out previous experiments so every new idea starts from the same clean slate.
- Install deps once:
npm install - Run locally:
npm run dev - Build for static hosting:
npm run build
- Make sure the base is up to date:
git switch main git pull
- Spin up a branch for your idea:
git switch -c proto/<idea>
- Edit files in
src/(or clone the template insrc/prototypes). Keep commits local to that branch. - Push/publish when you want to share:
git push -u origin proto/<idea>
- When the experiment is done, tag it or delete the branch—no merges back to
mainrequired.
src/core/host.js– wires canvases, the control panel, pointer events, and the RAF loop.src/core/canvas.js– DPI-aware helpers for 2D and WebGL contexts.src/core/controls.js– minimal UI renderer for sliders, colors, selects.src/prototypes/*.js– drop-in modules that expose{ id, title, controls, create() }.
See docs/prototypes.md for a deeper breakdown of the contract between the host and each prototype.