|

Documentation

The demos are disposable. The classes underneath them are not.

Every demo on this site is a thin harness over a shared library. A demo composes classes, wires up controls, and renders; it owns no drawing logic of its own. This section documents the library — the contracts, the parameters, and why they are shaped the way they are.

Each major class, or each group of closely related classes, gets its own page. Behaviour shared across a group is written down once on that group’s page rather than repeated per class, so that adding a new member to the group means checking it against a single list.

Pages

  • Stroke DefinitionStrokeDef: the points, the width model, and the renderer reference.
  • Renderers — the contract every stroke renderer honours, and RibbonStrokeRenderer.
  • Curves — natural and Hobby curve constructions over resampled knots.
  • Path Effects — generators that derive new paths from a base path.
  • Palette — OKLCH palette generation and selection.
  • Drawing Tool — the reusable instrument: setupDrawingTool, the tool registry, and the mark builder.
  • Initializers — compositions that fill a fresh canvas.
  • Player — the drawing log, and the standalone playback and recording engine.
  • Writing Style — the conventions every explanation on this site follows.

Layout

public/lib/ holds library code. public/demos/<name>/ holds demos. Demos import from the library by relative path; the library never imports from a demo.

Documentation pages describe the library only. What a particular demo does, and what it taught us, stays on that demo's own page.