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

    A single immutable render-diagnostics snapshot (DD-027 §4).

    interface RenderStats {
        backend: "3d-webgl" | "2d-canvas";
        buildParallelism: "main" | "pool";
        capability: RenderCapability;
        decimationApplied: number;
        disclosures: string[];
        drawCalls: null | number;
        firstRenderMs: null | number;
        geometryBuildMs: null | number;
        geometryMode: "tubes" | "lines";
        gpuRenderer: null | string;
        gpuVendor: null | string;
        parseMs: null | number;
        qualityMode: "full" | "adaptive" | "fast";
        renderedSegmentCount: number;
        sourceSegmentCount: number;
        totalReadyMs: null | number;
        tubeByteBudget: null | number;
        tubeBytes: null | number;
        vertexCount: null | number;
        webglVersion: null | 1 | 2;
        workerCount: number;
    }
    Index

    Properties

    backend: "3d-webgl" | "2d-canvas"

    Which rendering backend produced this frame.

    buildParallelism: "main" | "pool"

    How the geometry was built (DD-028): 'main' = synchronous main thread; 'pool' = worker pool.

    capability: RenderCapability

    Hardware / software / unknown, from the DD-023 classifier over the unmasked renderer string.

    decimationApplied: number

    Reduction factor applied to the LINES overview; 1 = nothing dropped (tubes are never decimated).

    disclosures: string[]

    Honest degradation reasons already emitted for this build (decimation, tubes→lines fallback); may be empty.

    drawCalls: null | number

    Geometry draw batches (≈ chunk count); null when not meaningful (2D).

    firstRenderMs: null | number

    Time from build start to the first frame rendered.

    geometryBuildMs: null | number

    CPU-side geometry build duration (build start → build complete).

    geometryMode: "tubes" | "lines"

    The geometry representation actually built.

    gpuRenderer: null | string

    Raw UNMASKED_RENDERER_WEBGL (e.g. "ANGLE (NVIDIA ... RTX 4070 ..., D3D11)"); null when the WEBGL_debug_renderer_info extension is gated/absent or the backend is 2D.

    gpuVendor: null | string

    Raw UNMASKED_VENDOR_WEBGL; null under the same conditions as gpuRenderer.

    parseMs: null | number

    Parse duration — null on the renderer snapshot (core fills it; DD-027 Phase 2).

    qualityMode: "full" | "adaptive" | "fast"

    The fidelity policy in force (DD-023).

    renderedSegmentCount: number

    Segments actually built into geometry (after decimation / travel-hide).

    sourceSegmentCount: number

    Segments present in the IR.

    totalReadyMs: null | number

    Parse-start → first full render — null on the renderer snapshot (core fills it; Phase 2).

    tubeByteBudget: null | number

    The tube byte budget that actually constrained the build (coarsened the cross-section or forced the tubes→lines fallback); null when the budget did not bind.

    tubeBytes: null | number

    Bytes of tube geometry uploaded, when geometryMode === 'tubes'; null for lines / 2D.

    vertexCount: null | number

    Vertices in the built geometry, summed across chunks; null if not derivable.

    webglVersion: null | 1 | 2

    WebGL major version, or null on the 2D backend / when the context type is unknown.

    workerCount: number

    Worker count when buildParallelism === 'pool', else 0.