Expand description
EngineState — the windowing-agnostic viewer state machine the host UI
programs against (R3): scene + camera + controls + settings + emphasis, plus
the whole event/command/query surface (run-history feed, pointer/wheel
ingestion, camera commands, picking, world→screen, visibility). No GPU, no
canvas — the wasm Engine and the winit desktop shell both wrap this; it is
fully unit-testable on native.
Everything crosses the R3 boundary as plain JSON/scalars: the host never holds a renderer object, only names, ids, and JSON.
Structs§
- Engine
State - RefSelect
State - The modal state of the reference-selection widget while it is ACTIVE: which feature-dialog field is being filled, what it accepts, and the running list of picked kernel names (the source of truth — added by picking in the view, removed via the per-line X). See the ref-select methods below.
- Selection
Filter - Which entity KINDS a plain viewport click may select.
- Sketch
Constraint Action - One applicable-constraint palette entry: the glyph passed back to
EngineState::sketch_add_constraintplus a human tooltip and a dimensional tag (whether it opens a value the solver seeds from the current measurement). - Sketch
Drag - One in-flight sketch drag (S2): the grabbed points and the anchor uv. A single
entry for a point grab; all of a geometry’s (deduped) points for a geometry
grab (a rigid translate). Each point tracks the cursor by an ABSOLUTE
orig + (uv - anchor)(never incremental — the solver moves points between frames, so incremental deltas would drift). - Sketch
Edit - The active engine-native sketch edit — the live session plus the state to restore when sketch mode exits.
- Sketch
Entity Row - One row in a sketch entity-LIST panel (Points / Curves / Constraints) — the
display label plus the
(kind, id)needed to select / hover / delete it, and its current selected/construction state for row styling. Built byEngineState::sketch_point_rows/sketch_geometry_rows/sketch_constraint_rows; the panel renders them and routes clicks back throughEngineState::sketch_select_entity/sketch_hover_entity. - Transform
Arm - The transform-controls gizmo controller state (see the impl block below).
Enums§
- Gizmo
Mode - Which of the two gizmos is currently armed for the feature.
Transformshows the move/rotate gizmo;Dimensionshows the on-canvas draggable dimension annotations (feature-dimensions FD-1). Expanding a feature armsDimension; the viewport sphere/center toggle flips toTransformand back. The two modes are EXCLUSIVE — the transform gizmo never renders inDimensionmode and vice-versa.