G-code Preview — API Reference
    Preparing search index...
    interface GcodePreviewHandle {
        canvasRef: Ref<null | HTMLCanvasElement>;
        controls: GcodePreviewControls;
        raw: {
            renderer: () => null | ToolpathRenderer;
            session: GcodeParseSession;
        };
        state: Readonly<GcodePreviewState>;
        cancel(): void;
        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 | ToolpathRenderer; session: GcodeParseSession }

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

    state: Readonly<GcodePreviewState>

    Methods