Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Function computeDrawOrder

    • Walk the scene and report the effective cross-node draw order of every VISIBLE data mesh: opaque meshes first — THREE renders its whole opaque list before the transparent list, so the bucket outranks renderOrder, which only orders meshes WITHIN a list — then renderOrder ascending. Residual ties keep traversal (scene-graph) order as a deterministic report order (THREE itself then compares material id / view-z, which this snapshot doesn't reproduce). Powers window.__luxarDebug.getDrawOrder().

      Reads live THREE state: the blending bucket + depthWrite from the mesh's material and the resolved renderOrder the depth-sort coordinator assigned. Hidden subtrees are pruned (like data/scene-loader/monitor/visible-counts.ts): renderOrder is only assigned to visible sorted meshes and never reset, so a toggled-off layer or inactive LOD level would otherwise report a stale order. Element counts reuse the same instanceCount / visible*Count source of truth as computeDebugState.

      Parameters

      • scene: Object3D

      Returns DrawOrderEntry[]