Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    • End-to-end load for a colors array, encoded or unencoded, with native-type preservation and original_dtype restoration. Composes the helpers above to reproduce the load-color flow the geometry loaders run (points, lines, gsplats).

      Branches:

      1. Direct (unencoded, no array_ref): allocate or reuse a typed buffer of the right kind, stream raw values in via RangeLoader.loadDirectTyped.
      2. rgb_uint8 / rgb_uint16 encoded colors with a target buffer of the matching kind: skip the decode pipeline and stream raw bytes directly (downstream renderer normalizes 0-255 → 0-1).
      3. Anything else (quantized / LUT / broadcasted / array_ref): decode to Float32, optionally resolve array_ref against zarrStore, then cast back to original_dtype if the encoding records one.

      Channel count (3 = RGB, 4 = RGBA) is read from the array shape — the optional alpha column is per-element opacity (see VOLUMETRIC_BLENDING_SPEC.md). Use colorComponentsOf to learn which layout a loaded buffer uses.

      Parameters

      • array: Array<DataType, Readable>

        The colors zarr array.

      • ranges: ColorRange[]

        Item ranges to load (splats / vertices etc).

      • rangeLoader: RangeLoader

        Shared encoding-dispatch loader.

      • zarrStore: Readable

        Store used to resolve array_ref targets.

      • logPrefix: string

        Caller tag for the array_ref resolution log line.

      • OptionaltargetBuffer: ColorBuffer

        Optional pre-allocated buffer (zero-allocation path).

      Returns Promise<ColorBuffer>