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

    Interface SortedIndexApplyCallbacks

    Lifecycle hooks for one staged ordering (the depth-sort coordinator wires these to its 'Depth Sort' profiler session so the pass spans the whole dispatch→applied lifecycle — issue #713). EXACTLY ONE fires per accepted ordering: onApplied after THREE renders the geometry with its selected buffer (post-upload/draw acknowledgement), or onAbandoned when it is dropped before that render (superseded as a held pending or selected slot, identity-written over, geometry disposed, node released, dataset switched, app disposed). Never both, never neither. They fire ONLY when writeSortedIndexOrdering accepts the ordering (returns > 0); a rejected write leaves session ownership with the caller.

    interface SortedIndexApplyCallbacks {
        onApplied?: () => void;
        onAbandoned?: () => void;
        owner?: object;
        requestFrame?: () => void;
        bypassBackPressure?: () => boolean;
    }
    Index
    onApplied?: () => void
    onAbandoned?: () => void
    owner?: object

    Who staged this ordering. Opaque here; the per-owner teardown sweep (cancelAllSortedIndexOrderingApplies with an owner) filters on it, so one depth-sort coordinator's dataset switch or dispose never abandons another coordinator's streams on the same page.

    requestFrame?: () => void

    "Request one more frame" after a slice upload or a drawn frame that flushed a device writer's target. A failed device write also uses it when releasing a held append draw. The coordinator does not spin on a stall while the mesh is culled; a real draw wakes its next pump. Per ordering rather than module-wide so it wakes the owning render loop.

    bypassBackPressure?: () => boolean

    When it returns true, applyNextSortedIndexChunk advances past the #715 upload-acknowledgement back-pressure. The depth-sort coordinator's offline-capture drain (resortForCapture) turns it on for its own streams: that drain never draws, so the ack that releases the stall can never fire and a multi-slice stream (>1 slice, e.g. a 3M-element node) would wedge the drain until its timeout on every captured frame. The stall exists only to bound the per-DRAWN-frame upload for interactive smoothness; offline, folding the slices into one upload on the capture's own render is exactly acceptable, and the range-union discipline keeps the pending span contiguous and current (a superset upload is correct, never stale).