Architecture Overview
ArrowCrab reads flat-packed GraphData, resolves compound
scopes, computes a layered orthogonal layout, and renders an interactive
scene.
Runtime pipeline
JSON text
└─ worker: parse → validate/model → layout → routing → snapshot
└─ main thread: model + snapshot → tile indexes → WebGL2/Canvas 2D scene src/lib/graph/validates records and resolves scopes.-
src/lib/layout/assigns layers, orders nodes, places scopes, and sizes compounds. -
src/lib/routing/allocates tracks and emits orthogonal routes. -
src/lib/scene/serializes geometry and builds exact tile indexes. -
src/lib/rendering/draws the scene and builds hit regions. -
src/lib/interaction/updates the viewport and selection. -
src/lib/worker/runs the pipeline and transfers route arrays.
WebGL2 draws structural geometry when available. Canvas 2D draws labels, ports, hit regions, and the fallback scene.
See Data Format for the input contract, Layout Algorithm for layout and routing, Rendering for scene construction, and Interaction for non-trivial input behavior.