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

    Options for an interactive view capture. All optional; sensible defaults match the live view.

    interface CaptureOptions {
        background?: ThemeColor;
        format?: "image/png" | "image/jpeg" | "image/webp";
        height?: number;
        includeBuildVolume?: boolean;
        quality?: number;
        width?: number;
    }
    Index

    Properties

    background?: ThemeColor

    Background for the capture: 'transparent', or a solid color. Default: the live scene background.

    format?: "image/png" | "image/jpeg" | "image/webp"

    Encoded image type (default 'image/png').

    height?: number

    Output height in pixels (default: the current drawing-buffer height).

    includeBuildVolume?: boolean

    Include the build-volume group (grid + bed surface + origin + cage) in the capture. Default true (the live view). Set false to exclude it for the off-screen render only — with background:'transparent' this yields a clean toolpath-only cutout (parity with ModelRenderer thumbnails), without disturbing the live view. Honored by the 3D toolpath renderer; a no-op where there is no build volume (ModelViewer) or no capture (the 2D renderer).

    quality?: number

    Quality 0..1 for lossy formats (jpeg/webp); ignored for png.

    width?: number

    Output width in pixels (default: the current drawing-buffer width).