Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    • Summarize a getState() snapshot into a capture-readiness verdict.

      Reads the totals from the FLAT DebugState shape — state.totalPoints, not state.performance.totalPoints. totalElements is max(snapshot total, sum of the four per-type totals): a missing total is re-derived from the per-type ones, and a present-but-stale total (the tool captures against whatever viewer build is served, so skew is possible) can only under-claim relative to itself, never contradict them. On a current viewer debug-state.ts sets the field to exactly that sum, so the max is inert and this is just the sum. (Trusting the snapshot's own field outright let a snapshot carrying totalTriangles: 1200, totalElements: 0 report a fully-loaded mesh scene as empty — the very symptom of royerlab/luxar#1579.)

      Parameters

      • state: Partial<DebugState> | null | undefined

        The object returned by window.__luxarDebug.getState(), or null/undefined when the debug interface was never installed (the URL lacked ?debug).

      Returns CaptureReadinessSummary

      A plain summary; ok is false with a reason for every not-ready case (no state, no totals at all, non-finite totals, empty scene, renderer-truncated scene, a refinement stop at the residency ceiling, a byte-budget GPU-pool eviction). A READY verdict can carry a reason too — as a caveat, when some per-type total was counted as 0 because it was non-finite or absent from the snapshot rather than because the scene has none of that type. Note that ok: true means the scene graph carries elements without renderer truncation, not that they are visible — see the module doc.