Fit bounds into a width×height canvas with uniform scale, centered, padding px inset,
and the Y axis flipped so higher printer-Y draws higher on screen. Degenerate (zero-span or
empty) bounds fall back to scale 1 centered at the canvas middle.
@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.