G-code Preview — API Reference
    Preparing search index...
    interface GcodePreviewHandle {
        canvasRef: Ref<null | HTMLCanvasElement>;
        controls: GcodePreviewControls;
        raw: { renderer: () => null | PreviewRenderer; session: GcodeParseSession };
        state: Readonly<GcodePreviewState>;
        cancel(): void;
        capture(opts?: CaptureOptions): Promise<Blob>;
        clearProgress(): void;
        dispose(): void;
        observeProgress(obs: ProgressObservation): null | MappedProgress;
        onEvent(cb: (e: PreviewEvent) => void): () => void;
        parse(
            input: ArrayBuffer | Uint8Array<ArrayBufferLike> | File,
            opts?: WireParseOptions,
        ): Promise<ParseOutcome>;
        tickProgress(nowMs: number): null | MappedProgress;
    }
    Index

    Properties

    canvasRef: Ref<null | HTMLCanvasElement>

    Bind to a template ref; rebinding disposes and rebuilds safely.

    raw: { renderer: () => null | PreviewRenderer; session: GcodeParseSession }

    Escape hatches — the neutral objects themselves (advanced use; not reactive).

    state: Readonly<GcodePreviewState>

    Methods