Retained scene graph
Nodes hold style, box, transform. Mutations mark dirty bits — the frame loop recomputes only the cone that needs it.
Retained-mode canvas engine
limn is a platform-agnostic scene graph: declare nodes, change a style, three orthogonal dirty bits drive layout · paint · hit. Frontends (React / imperative) and backends (Canvas2D / mini-game) plug in at the edges.
Nodes hold style, box, transform. Mutations mark dirty bits — the frame loop recomputes only the cone that needs it.
Standard tags, className, style strings, DOM event names. Same markup on canvas or browser DOM.
React reconciler or imperative Scene API on the front; Canvas2D (and friends) on the back. Core stays pure.
Immediate-mode canvas redraws the world every frame.
limn marks PAINT, LAYOUT, or TRANSFORM and runs only the matching pass.
Left: full-frame paint · Right: limn dirty cone
Click a mutation. Immediate mode lights the whole tree; limn pulses only the dirty bit and its pass.
Tags, className, CSS cascade, pointer events — the web surface you already know.
Swap createRoot(canvas) for the DOM root when you need it.
Target: Canvas2D
Frontends feed the graph. The core runs dirty → layout → paint → hit. Backends consume draw ops. No DOM required in the middle.
See what each layer owns
React reconciler and imperative Scene API both call into the same Node graph.
Declare the tree. Mark the bit. Never repaint what you did not touch.
Browsers have a real DOM. Everywhere else you still want flex, cascade, and hit-test without hand-rolling every frame.
| Domain | Status | What you get |
|---|---|---|
| Layout | 40/40 domains |
flex · grid · table · float · sticky · multi-column |
| Paint | ✅ main path | box model · gradients · filter · clip/mask · 2D/3D projection |
| Text | ✅ main path | wrap · ellipsis · RTL · writing-mode · @font-face |
| CSS | ✅ subset | selectors · @media · var() · @container · cascade |
| Interaction | ✅ main path | hit · scroll · focus · forms · transition/animation |
Full table: Capability handbook · in-repo docs/CAPABILITY.md
One scene graph. Three dirty bits. Pluggable edges.