The camera currently rendered/orbited (#150). Its concrete type follows
cameraMode, so external readers must treat it as the union — only
perspective cameras carry .fov (guard writes on cameraMode).
The active camera projection (#150).
Currently built chunk meshes: LineSegments (lines/travel) or Mesh (tubes).
True when the current IR carries M600 color-change boundaries (#147, DD-009 D2).
True when the current IR actually carries positioned retraction events.
Number of layers in the retained IR (slider bounds for consumers).
Current overlay presentation (DD-006 §4.5) — mirrors the last emitted mode.
Number of IR segments (scrub-slider bounds for consumers).
Progressive preview (#60): append a path-aligned partial slice as transient
geometry. Presentation is governed by progressivePreview (the #60 curtain):
'lines' (default): render the slice as lines (cheap, allocation-light) with
cumulative every-Nth decimation past the §4.4 thresholds; the eventual
setIR(finalIR) REPLACES the whole preview set. Preview meshes ignore
layer-range/scrub clipping (their indices are slice-local); kind visibility
still applies.'hold': track progress and emit previewAppend, but build/reveal NO preview
geometry — the viewer sees nothing until the final, correctly-coloured build
from setIR. A single clean reveal with a live progress signal.'off': no preview geometry and no previewAppend — the consumer drives its own
loading treatment; the old scene (if any) persists until setIR replaces it.Upload a bounded amount of work, then reschedule (§5.3/§8). Public for tests.
Capture the current view as an image Blob (DD-030 D1) — delegates to the shared stage. With
includeBuildVolume: false the whole build-volume group (grid/bed/origin/cage) is hidden for the
off-screen render only, so background:'transparent' yields a clean toolpath-only cutout (parity
with ModelRenderer thumbnails). The live view is untouched: the visibility is restored
synchronously before control returns to the event loop, so no intermediate frame is ever painted.
Optionalopts: CaptureOptionsSynchronously finish all pending uploads (tests; also useful before capture).
Fit the camera to the toolpath bounds (falls back to the preview bounds, then the build volume).
Read the current camera as a serializable CameraState (scene coords, #268).
The feature roles currently hidden via setFeatureRoleVisible (for state persistence).
The latest render-diagnostics snapshot (DD-027), or null before the first build. parseMs and
totalReadyMs are null on this renderer-produced snapshot — core fills them when it re-emits.
Capability gate (§4.6): feature coloring needs the IR to actually carry
feature roles — featureRoles: 'unavailable' means the UI must disable it,
not render fabricated colors. Single/tool modes are always available.
Pick the IR segment under a pointer, or null (#184 — click a segment → its G-code source line via
sourceLineOfSegment in @chestnutlabs/toolpath-core). ndcX/ndcY are normalized device coords (each in [-1, 1]); a
consumer converts a canvas click with (x/w)*2-1, -(y/h)*2+1. threshold is the world-space
line hit radius — auto-derived from the model size when omitted. Lines mode; tube meshes resolve
when they carry a vertex→segment table.
Optionalthreshold: numberApply a build volume after construction (DD-005 §4.2 amendment: parse →
discover machine geometry → apply, no renderer reconstruction). Accepts a
plain BuildVolumeDef or a discovered MachineGeometry (circular/polygon beds
render as their bounding volume in v1). Emits machine-geometry-mismatch
when a consumer-configured volume disagrees with a discovered one by >1 mm.
Show/hide the build-volume wireframe cage independently of the bed/plate (#306/#6). Toggles the
named volumeCage child in place (no geometry rebuild); persists so a later volume rebuild honors it.
Switch the camera projection (#150, DD-009 D3) — delegates to the shared stage.
Restore a CameraState verbatim (#268) — no re-fit to the current model's bounds.
Switch color mode (attribute rewrite, no geometry rebuild — §4.6). Returns false (and emits an error event) when the mode is capability-gated off.
Show or hide a single FeatureRole — e.g. hide Skirt/Brim to declutter a part preview,
or isolate Support. Feature roles live per-segment inside the extrusion geometry (unlike move
kinds, which are whole chunks), so hidden segments are collapsed to NaN positions and the GPU
discards them; the original positions are restored when the role is shown again.
Only meaningful when the file carried feature annotations (capabilities.featureRoles === 'known'
— gate the UI on it, like the feature color mode); on an unannotated file every segment is
Unknown and hiding a specific role is a no-op. Untouched geometry (no role hidden) is
byte-identical to before this call existed. Interacts cleanly with layer clip and scrub.
Frame the printed model vs. all extrusion (#306/#6, DD-026 D5/D6). 'object' excludes
skirt/prime/purge/tower via the modelBounds → objectBounds precedence so housekeeping doesn't
shrink the model in view — but only when the file is classifiable; when neither is available (a
genuinely unclassifiable file, e.g. an unmarked prime with no object channel) it discloses an
honest error and frames all extrusion. Re-frames.
Toggle interaction-aware quality (DD-020, #306/2) — delegates to the shared stage.
Toggle a move kind (extrusion/travel) on or off (whole-chunk visibility, §4.3).
Clip rendering to an inclusive layer range (§4.5). Draw-range trims on the existing chunk geometry only — no rebuild, no new allocations.
Live-progress overlay input (DD-006 §4.5): a MappedProgress from the core mapper, or
null to hide the overlay entirely. Presentation is decided by confidence — exact gets a
marker, approximate gets an uncertainty band, stale grays out, unavailable hides — and
every mode change emits progress-presentation-changed.
Set the during-parse preview curtain (#60): 'lines' | 'hold' | 'off'. Governs only the transient preview during the NEXT parse; no effect on an already-built scene, so no rebuild.
Change the quality tier; rebuilds from the retained IR when one is set.
Set the fidelity policy (DD-023 §4 D6) and rebuild: 'full' | 'adaptive' | 'fast'.
Scrub: render only segments with IR index <= segIndex (within the layer
range). null clears the scrub cut.
Opt-in retraction/deretraction markers (DD-009 D1, #148). Points at each
retract (warm) / unretract (cool) event; clipped by the same layer/scrub
window as the toolpath. Capability-honest: no markers when the IR carries no
retraction events (capabilities.retractions !== 'known').
Apply a bounded declarative theme (#153, DD-009 D4), replacing the current one: unspecified fields reset to DEFAULT_THEME. Restyles lights, background, the build-volume grid/box, and swaps the extrude (tube) material preset live — disposing replaced materials/geometry. Lines geometry and the semantic marker/ overlay/origin colors are unaffected.
Snap to a preset orientation (#268) — delegates to the shared stage.
The quality tier actually built (may differ from requested via auto/fallback).