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

    Function buildElementIdMap

    • Map visible-buffer slots back to the ON-DISK element indices the per-element label CSR (label_offsets / label_bytes) is keyed by.

      Parameters

      • ranges: readonly ElementIdRange[]

        The visible on-disk ranges, in ascending order, exactly as handed to the projection.

      • keptConcatIndices: ArrayLike<number> | null

        STRICTLY ascending concatenated-set indices that survived the visibility compaction, or null when no compaction ran. Validated: a non-ascending list is rejected rather than mapped to garbage.

      • count: number

        Final visible element count; the returned map's length.

      • logModule: string

        Modules.* value the fail-closed warnings are logged under (the calling producer's module).

      Returns Uint32Array<ArrayBufferLike> | undefined

      A count-long slot → on-disk map, or undefined when the identity holds (slot IS the on-disk index) or the inputs are inconsistent — in both cases callers fall back to the slot.