Coordinates
The editor works in two coordinate spaces: world (the scene's own units) and screen (canvas pixels). The Viewport defines the camera that maps between them via pan, zoom, and rotation.
Geometry
@oh-just-another/math is the L0 geometry toolkit underpinning the scene model. It is a pure, DOM-free collection of namespaced modules: vec2, scalar, matrix, bounds, hitTest, bezier, intersect, color, and polygon.
Grid
The background grid is a per-scene viewport setting. It controls how the canvas backdrop is painted and, together with snapping, where shapes settle.
Background colour
The canvas paper colour is a per-scene viewport setting: viewport.background (any CSS colour). Absent means DEFAULTCANVASBACKGROUND (#f5f5f5). It serialises with the document and reaches "with background" exports.
View toggles
Two editor-level switches hide parts of the canvas without touching the scene: Flow connectors (every link) and Comments (annotation pins). Both live on the editor โ not persisted, not exported โ and default to shown.
Snapping
@oh-just-another/scene ships a pluggable snap engine. The SnapEngine runs a list of contributors against a probe point and returns the best candidate within a threshold. Three built-in contributors cover the common cases: gridSnapper, anchorSnapper, and outlineSnapper.