G-code Preview — API Reference
    Preparing search index...

    A thin lifecycle wrapper binding a ToolpathIR to a <canvas>: pick a layer, pick a color mode, render(). It owns no WebGL context and holds no per-layer geometry — each render() clears and redraws the active layer (plus its dimmed "ghost" layers), so peak memory stays near one layer (DD-014 §6). The view frame is the whole-model XY bounds (cached on setToolpath), so scrubbing layers doesn't jump or rescale and ghosts overlay the active layer exactly. Adapter wiring (the renderer: '2d' | '3d' prop) arrives in a later E8 phase.

    Index

    Constructors

    Accessors

    Methods

    • Honest capability notes for the current IR (DD-014 §6/§11) — e.g. a non-planar/CNC toolpath the flat 2D view cannot fully represent. Empty for faithfully-representable (planar) input.

      Returns string[]

    • Number of preceding ghost layers drawn beneath the active one (clamped to ≥ 0).

      Parameters

      • n: number

      Returns void