Type Alias GCodePreviewOptions

GCodePreviewOptions: {
    allowDragNDrop?: boolean;
    backgroundColor?: ColorRepresentation;
    buildVolume?: BuildVolume;
    canvas?: HTMLCanvasElement;
    debug?: boolean;
    devMode?: boolean | DevModeOptions;
    disableGradient?: 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;
    targetId?: string;
    toolColors?: Record<number, ColorRepresentation>;
    topLayerColor?: ColorRepresentation;
    travelColor?: ColorRepresentation;
}

Type declaration

  • OptionalallowDragNDrop?: boolean

    Please see the demo how to implement drag and drop.

  • OptionalbackgroundColor?: ColorRepresentation
  • OptionalbuildVolume?: BuildVolume
  • Optionalcanvas?: HTMLCanvasElement
  • Optionaldebug?: boolean
  • Optional ExperimentaldevMode?: boolean | DevModeOptions
  • OptionaldisableGradient?: boolean
  • OptionalendLayer?: number
  • OptionalextrusionColor?: ColorRepresentation | ColorRepresentation[]
  • OptionalextrusionWidth?: number
  • OptionalinitialCameraPosition?: number[]
  • OptionallastSegmentColor?: ColorRepresentation
  • OptionallineHeight?: number
  • OptionallineWidth?: number
  • OptionalminLayerThreshold?: number
  • OptionalnonTravelMoves?: string[]
  • OptionalrenderExtrusion?: boolean
  • OptionalrenderTravel?: boolean
  • OptionalrenderTubes?: boolean
  • OptionalstartLayer?: number
  • OptionaltargetId?: string

    Please use the canvas param instead.

  • OptionaltoolColors?: Record<number, ColorRepresentation>
  • OptionaltopLayerColor?: ColorRepresentation
  • OptionaltravelColor?: ColorRepresentation