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

    GSplats data accumulator with FULL multi-type support

    CRITICAL FIX: camelCase choleskyFactors (not snake_case cholesky_factors)

    Handles Float32Array, Uint8Array, and Uint16Array for colors natively (no conversion) to maintain memory efficiency and consistency with multi-type GPU buffer pool.

    Type is detected on first fill() and remains fixed for the accumulator's lifetime.

    Implements

    Index
    centerBuffer: Float32Array
    amplitudeBuffer: Float32Array
    choleskyBuffer: Float32Array
    colorBuffer:
        | Uint8Array<ArrayBufferLike>
        | Float32Array<ArrayBufferLike>
        | Uint16Array<ArrayBufferLike>
    types: GSplatsAccumulatorTypes | null = null
    hasColors: boolean = false
    _disposed: boolean = false

    Flips to true on dispose(); fill/ensureCapacity then throw.

    usedCount: number = 0

    Highest splat index touched by any fill() call.

    capacity: number
    ndim: number
    choleskySize: number
    colorComponents: 3 | 4 = 3

    Components per color item: 3 (RGB) or 4 (RGBA — alpha = per-splat opacity).

    allocations: number = 0
    totalGrowths: number = 0
    • Declare the color layout (3 = RGB, 4 = RGBA) BEFORE the first color fill. The loader knows the layout from the zarr array shape at open time; the accumulator needs it to size every color buffer. Throws if colors were already written with a different layout — the layout is a property of the dataset, not of an individual load.

      Parameters

      • components: 3 | 4

      Returns void

    • Returns
          | Uint8Array<ArrayBufferLike>
          | Float32Array<ArrayBufferLike>
          | Uint16Array<ArrayBufferLike>

    • Parameters

      • buffer:
            | Uint8Array<ArrayBufferLike>
            | Float32Array<ArrayBufferLike>
            | Uint16Array<ArrayBufferLike>

      Returns void