gcode-preview - v3.0.0-alpha.3
    Preparing search index...

    Type Alias GCodePreviewOptions

    Options for configuring the G-code preview

    type GCodePreviewOptions = {
        backgroundColor?: ColorRepresentation;
        boundingBoxColor?: ColorRepresentation;
        buildVolume?: BuildVolumeDef;
        canvas?: HTMLCanvasElement;
        devMode?: boolean | DevModeOptions;
        disableGradient?: boolean;
        droppable?: boolean;
        endLayer?: number;
        extrusionColor?: ColorRepresentation | ColorRepresentation[];
        extrusionWidth?: number;
        initialCameraPosition?: number[];
        lastSegmentColor?: ColorRepresentation;
        lineHeight?: number;
        lineWidth?: number;
        minLayerThreshold?: number;
        nonTravelMoves?: string[];
        renderExtrusion?: boolean;
        renderTravel?: boolean;
        renderTubes?: boolean;
        startLayer?: number;
        toolColors?: Record<number, ColorRepresentation>;
        topLayerColor?: ColorRepresentation;
        travelColor?: ColorRepresentation;
    }
    Index

    Properties

    backgroundColor?: ColorRepresentation

    Background color of the preview

    boundingBoxColor?: ColorRepresentation

    Color for the bounding box. If undefined, the bounding box is not rendered.

    buildVolume?: BuildVolumeDef

    Build volume dimensions

    canvas?: HTMLCanvasElement

    Canvas element to render into

    devMode?: boolean | DevModeOptions

    Enable developer mode with additional controls

    disableGradient?: boolean

    Disable color gradient between layers

    droppable?: boolean

    Enable drag and drop file handling

    endLayer?: number

    Last layer to render (1-based index)

    extrusionColor?: ColorRepresentation | ColorRepresentation[]

    Color(s) for extruded paths

    extrusionWidth?: number

    Width of extruded material

    initialCameraPosition?: number[]

    Initial camera position [x, y, z]

    lastSegmentColor?: ColorRepresentation

    Color for the last segment of each path

    lineHeight?: number

    Height of extruded lines

    lineWidth?: number

    Width of rendered lines

    minLayerThreshold?: number

    Minimum layer height threshold

    nonTravelMoves?: string[]

    List of G-code commands considered non-travel moves

    renderExtrusion?: boolean

    Whether to render extrusion paths

    renderTravel?: boolean

    Whether to render travel moves

    renderTubes?: boolean

    Render paths as 3D tubes instead of lines

    startLayer?: number

    First layer to render (1-based index)

    toolColors?: Record<number, ColorRepresentation>

    Colors for different tools

    topLayerColor?: ColorRepresentation

    Color for the top layer

    travelColor?: ColorRepresentation

    Color for travel moves