14 / 20Graphics & canvas
Infinite Canvas
A Figma-style whiteboard: pan, zoom, draw shapes, select and transform, with undo.
- Canvas 2D
- Coordinate systems
- Hit testing
- Undo/redo
- Pointer events
stirling.lab/infinite-canvas Live demo
Loading demo…
What to notice
- Smooth pan and zoom-to-cursor with trackpad pinch and wheel support
- Rectangles, ellipses, arrows, text and freehand ink
- Marquee select, multi-select transform handles, snapping guides
- Unlimited undo/redo via a command stack
How it's built
- World and screen coordinates are kept separate with a single affine camera matrix.
- Hit testing walks shapes in reverse z-order with per-shape geometry tests.
Hand-built in React 19 + TypeScript, with no UI or chart libraries.