G-code Preview — API Reference
    Preparing search index...
    interface RenderModelStillOptions {
        background?: ModelBackground;
        buildVolume?: BuildVolumeDef;
        cameraFov?: number;
        canvas: RenderTargetCanvas;
        createRenderer?: (canvas: RenderTargetCanvas) => GLRendererLike;
        envId?: string;
        filamentPalette?: readonly (string | undefined)[];
        height?: number;
        limits?: ModelLimits;
        renderScope?: RenderScope;
        theme?: Theme;
        view?: "iso";
        width?: number;
    }
    Index
    background?: ModelBackground

    Background: 'transparent' (default — composite on a card) or a solid CSS color / 0xRRGGBB.

    buildVolume?: BuildVolumeDef

    Draw a build plate under the model (DD-032 §4.3) — the full BuildVolumeDef (shape, min, excluded regions), so a saved thumbnail matches the live viewer. Omit for no plate (today's render). Where the part sits on it is decided honestly: see ModelPreviewState.placement.

    cameraFov?: number

    Perspective lens in degrees, [10, 120] (default 50); framing is lens-aware. Throws RangeError outside it.

    createRenderer?: (canvas: RenderTargetCanvas) => GLRendererLike
    envId?: string

    Override the environment id folded into the cache key (default: the three revision).

    filamentPalette?: readonly (string | undefined)[]

    Override the 3MF source-model filament palette (hex #RRGGBB per 0-based slot) used to colour paint_color facets, instead of the file's own project_settings.config. Niche: for consumers re-rendering a file with a corrected/richer palette. Ignored for STL and pre-built scenes.

    height?: number
    limits?: ModelLimits
    renderScope?: RenderScope

    Render only a subset of a multi-plate / multi-object source (DD-030 D2) — e.g. { plateId: 3 } to render just plate 3 of a project, framed to that plate. Omit to render the whole project (default). { plateId } is meaningful only when the source declares plates (plates: 'known'); on a source without plate structure it matches nothing and renders empty (the honest result).

    theme?: Theme

    Plate/backdrop look (DD-032), e.g. studioTheme('dark'). Only the plate and backdrop fields apply; lights and materialPreset are deliberately not (the model rig is unchanged). theme.background beats background (an explicit null omits it, falling through to background).

    view?: "iso"

    Preset angle; default 'iso'.

    width?: number