G-code Preview — API Reference
    Preparing search index...

    Reactive snapshot of the model viewer, derived from engine events. Immutable — every change replaces it.

    interface ModelPreviewState {
        bounds: null | ModelBounds;
        cameraState: null | CameraState;
        decimationApplied: number;
        error: null | { code: string; message: string };
        hasPlates: boolean;
        instancedCount: number;
        loading: boolean;
        materials: Confidence;
        objectCount: number;
        plates: null | { active?: number; list: ModelPlateSummary[] };
        progress: null | LoadProgress;
        ready: boolean;
        rendererSupported: boolean;
    }
    Index

    Properties

    bounds: null | ModelBounds

    Model bounds, or null before ready.

    cameraState: null | CameraState

    Current camera pose, or null before a source / when unsupported.

    decimationApplied: number

    Every-Nth-triangle decimation applied to fit the LOD budget (1 = none).

    error: null | { code: string; message: string }

    Last error (parse/loader/limit/renderer), or null.

    hasPlates: boolean

    Capability-aware convenience: the source declares plates (build a plate selector).

    instancedCount: number

    Instance placements drawn — > objectCount when geometry was reused ("N copies").

    loading: boolean

    A setSource is in flight (parse → build).

    materials: Confidence

    Material/colour capability tier of the source (honesty model).

    objectCount: number

    Objects in the current source (0 before ready).

    plates: null | { active?: number; list: ModelPlateSummary[] }

    Declared plate structure when the source declares plates (materials-style capability); else null.

    progress: null | LoadProgress

    Latest staged loading progress (DD-024), or null.

    ready: boolean

    A source has loaded successfully at least once and is currently shown.

    rendererSupported: boolean

    False when WebGL is unavailable — the handle is inert; fall back to a renderModelStill image.