A React + TypeScript + Vite playground for procedural and assisted SVG workflows. It's a single-page app with a left-hand tool list and a split working area — pick a tool, tweak parameters, and generate or transform SVG output.
https://svg-graphics-experiments.vercel.app/
npm install
npm run dev # start the Vite dev server (typically http://localhost:5173/)Other scripts:
npm run build # tsc type-check + Vite production build
npm run lint # ESLint (zero warnings allowed)
npm run version:date # bump version to current date (YYYY.M.D)There are no tests.
Each tool renders in a split layout:
- Viewer — the SVG canvas / output area.
- Controls — parameters, toggles, and actions.
Tools follow a Provider → Controls + Viewer pattern, with all tool state held in a React context. Navigation is hash-based (#tool-id) — there is no router. Many tools share infrastructure for:
- Undo/redo — snapshot-based history with
Ctrl+Z/Ctrl+Y. - Parameter persistence — parameters auto-save to
localStorageand restore on reload. - Cross-tool handoff — send a tool's SVG output to another tool as its input via the handoff menu.
Tools are organized into groups in the left panel:
- Distribute & Fill — Object Along Path, Object Fill Pack, Primitive Points
- Typography — Text Noise Fill, Font Mixer
- Image-based — ASCII Art, Luminance Grid, Channel Split, Pixel SVG Canvas, Artbrush SVG Canvas, Grid Cell Wrapper, NES Glitch, Pixel Stretch
- Fields & Generative — Blob Field, Flow Field, Domain Warp, Topographic Map, Superformula, Symbol Generator
- Agents — Flow Agents, Path Agents
- Distortion — Lattice Deform, Point Distortion, Displacement Map, Distortion Grid
- Grids & Cells — Grid Editor, Nested Grid, Polar Grid Cells, Voronoi Diagram, Grid Cubes 3D, Silhouette Extractor, Volume Builder 3D
- Connections — Arc Connections, Rect Node Connections, Trait Connections
- Diagrams — 2D SVG Diagram
- Utilities — SVG to Raster
Some tools are gated as drafts: they're available in npm run dev but hidden from the live production build.
src/App.tsx— wires each tool'sProvider+Controls+Viewerbased on the active panel.src/components/tools/— per-tool code (contexts, viewers, controls, panels, styles).src/components/reusable/— shared UI and cross-tool components, includingPanelSelector(the tool list andPanelTypesource of truth).src/utils/— geometry/math, SVG parsing/rendering helpers, presets, persistence, and handoff utilities.src/hooks/— shared hooks (undo/redo, media query, handoff receivers, etc.).
clipper-lib— polygon boolean ops and offsettingd3-delaunay— Voronoi / Delaunay geometryopentype.js— font parsing and glyph path extractionthree— 3D rendering (Grid Cubes 3D, Volume Builder 3D)
- Add the typed panel id to
PanelTypeinsrc/components/reusable/PanelSelector.tsx. - Add its config entry (label/icon/group) to
PANEL_GROUPS. - Create the three tool files (
*Context.tsx,*Controls.tsx,*Viewer.tsx) insrc/components/tools/. - Wire the branch in
src/App.tsx.
User-facing feature changes go in src/changelogContent.ts in the same commit. See AGENTS.md and CLAUDE.md for fuller working notes.