An opt-in current/adjacent-layer 2D view over the existing ToolpathIR, for low-GPU,
low-memory, or WebGL-blocked devices (old mobile, embedded printer UIs, locked-down browsers).
One parse, one IR, a second lightweight view — no second parser path, no three, no framework.
Per-segment color is single-sourced with the 3D renderer via @chestnutlabs/gcode-colors.
Re-exports the color model so 2D consumers get ColorMode/RGB from one import.
XY bounds of one layer's segments (both endpoints), in the origin-relative frame. Segments with a
non-finite XY endpoint are ignored (they are not drawn either), so one bad coordinate cannot blow the
frame up to ±Infinity.
@chestnutlabs/gcode-renderer-2d — low-resource Canvas 2D layer renderer (DD-014 / E8).
An opt-in current/adjacent-layer 2D view over the existing
ToolpathIR, for low-GPU, low-memory, or WebGL-blocked devices (old mobile, embedded printer UIs, locked-down browsers). One parse, one IR, a second lightweight view — no second parser path, nothree, no framework. Per-segment color is single-sourced with the 3D renderer via@chestnutlabs/gcode-colors.Re-exports the color model so 2D consumers get
ColorMode/RGBfrom one import.