G-code Preview — API Reference
    Preparing search index...
    interface RenderStillOptions {
        background?: ThemeColor;
        buildVolume?: BuildVolumeDef | MachineGeometry;
        camera?: StillCameraPose;
        cameraMode?: CameraMode;
        canvas: RenderTargetCanvas;
        colorMode?: ColorMode;
        coreBudget?: number;
        createGeometryWorker?: () => GeometryWorkerLike;
        createRenderer?: (canvas: RenderTargetCanvas) => GLRendererLike;
        createWorker?: WorkerLike | (() => WorkerLike);
        frameContent?: "object" | "all";
        geometryConcurrency?: number | "off" | "auto";
        geometryMemoryBudgetBytes?: number;
        height?: number;
        layerRange?: [number, number];
        parseOptions?: WireParseOptions;
        quality?: "auto" | QualityMode;
        scrub?: null | number;
        showTravel?: boolean;
        showWipe?: boolean;
        theme?: Theme;
        tube?: TubeOptions;
        tubeByteBudget?: number;
        width?: number;
    }
    Index

    Properties

    background?: ThemeColor

    Presentation-card convenience (#306): 'transparent' composites the still on the consumer's card (creates an alpha GL context so the unset scene background shows through), or a solid ThemeColor paints a themed backdrop. Shorthand for wiring theme.background + an alpha createRenderer yourself; an explicit theme.background or createRenderer you pass takes precedence.

    Bed geometry — a renderer volume or discovered MachineGeometry.

    Camera: an explicit pose, or omitted for deterministic bounds framing.

    cameraMode?: CameraMode

    Camera projection (#150, DD-009 D3); default 'perspective'.

    Target surface: an OffscreenCanvas (worker/headless) or a DOM canvas. Required.

    colorMode?: ColorMode
    coreBudget?: number

    Concurrency cap from the deployment's ACTUAL CPU grant (DD-028). navigator.hardwareConcurrency reports the visible cores, which over-reports a CFS-throttled container (e.g. 4 visible / 2.0-CPU quota → 2× oversubscription). A containerized caller (the sidecar) reads its cgroup cpu.max and passes the quota here; the pool sizes to min(hardwareConcurrency, this) − 1. Omit off-container.

    createGeometryWorker?: () => GeometryWorkerLike

    Geometry-worker factory override (tests / exotic hosts). Defaults to the browser Web Worker when Worker is available and geometryConcurrency !== 'off'.

    createRenderer?: (canvas: RenderTargetCanvas) => GLRendererLike

    GL backend injection (tests / exotic hosts). Default: WebGLRenderer.

    createWorker?: WorkerLike | (() => WorkerLike)

    Worker factory for the bytes path (batteries default when omitted).

    frameContent?: "object" | "all"

    Framing target (#306/#6): 'all' extrusion (default) or the printed 'object' (excludes skirt/prime).

    geometryConcurrency?: number | "off" | "auto"

    Parallel tube-geometry build for a big-plate still (DD-028 Phase 4). Default 'auto' — in a browser-class context with Worker (the headless-Chromium sidecar, an Electron window) the batteries -included browser Web Worker pool builds tube chunks in parallel, byte-identical to serial. 'off' forces the synchronous path. No effect where Worker is absent.

    geometryMemoryBudgetBytes?: number

    Max in-flight tube-geometry bytes for the parallel build (DD-028 memory backpressure). A memory- limited container (e.g. 2 GiB) passes a fraction of its limit; the pool never exceeds it.

    height?: number
    layerRange?: [number, number]

    Inclusive layer clip [start, end]. Omitted → whole model.

    parseOptions?: WireParseOptions

    Wire parse options for the bytes path (dialects/containers/plate/limits).

    quality?: "auto" | QualityMode

    Quality tier (default 'auto': tubes ≤ 1 M segments, else lines).

    scrub?: null | number

    Draw only up to this segment (progress-style clip). null/omitted → whole model.

    showTravel?: boolean

    Include travel moves (default false — a still is a clean model-only image by default).

    showWipe?: boolean

    Include slicer wipe moves (default false — same clean-still default as showTravel).

    theme?: Theme

    Bounded declarative theme (#153, DD-009 D4); headless stills theme identically.

    tubeByteBudget?: number

    Total CPU byte budget for the FINAL tube geometry (RR-006). This is a different axis from geometryMemoryBudgetBytes (which caps the parallel build's in-flight working set): this bounds the whole retained tube mesh and so decides whether a large plate renders as full tubes or degrades to lines. The default is deliberately conservative (~450 MB CPU / ~900 MB peak once uploaded), so a big full-sheet plate silently falls to lines even when the deployment has RAM to spare. A caller whose resource policy says the RAM is available raises this to retain tubes on large plates (peak RAM ≈ 2× the budget; the library does not read the container — sizing is the deployment's policy). Omit for the default.

    width?: number

    Output size. Defaults to the canvas's current width/height.