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

    Interface LoadedPointsData

    Loaded points data ready for GPU rendering. All arrays are properly aligned with the same point ordering. Arrays can be in different data types for memory efficiency.

    Named with "Loaded" prefix for consistency with LoadedLinesData and LoadedGSplatsData.

    interface LoadedPointsData {
        positions: PositionArray;
        colors?: ColorArray;
        colorComponents?: 3 | 4;
        radii?: ScalarArray;
        sharpness?: PointScalarArray;
        scalars?: PointScalarArray;
        elementIds?: Uint32Array<ArrayBufferLike>;
        elementIdsUnavailable?: boolean;
        pointCount: number;
        ndim: number;
        metadata: {
            totalPoints: number;
            loadedPoints: number;
            bounds: Box3;
            usedSpatialIndex: boolean;
            usedEffectiveRadius?: boolean;
            dtypes?: {
                positions?: string;
                colors?: string;
                radii?: string;
                sharpness?: string;
                scalars?: string;
            };
        };
    }
    Index
    positions: PositionArray

    3D positions extracted from nD space (size: numPoints * 3)

    colors?: ColorArray

    RGB or RGBA colors (size: numPoints * colorComponents, optional)

    colorComponents?: 3 | 4

    Components per color item: 3 = RGB, 4 = RGBA — the alpha column is per-point opacity (VOLUMETRIC_BLENDING_SPEC.md phase 3). Absent ⇒ 3. Mirrors LoadedGSplatsData.colorComponents.

    radii?: ScalarArray

    Point radii in world units (size: numPoints, optional)

    sharpness?: PointScalarArray

    Point sharpness values (size: numPoints, optional). Native Uint16 is kept dtype-preserving (like colors) and normalized on GPU upload.

    Per-point scalar values for colormap lookup (size: numPoints, optional).

    when present, the geometry binds a scalar attribute and the Point shader's USE_COLORMAP path samples the LUT at (scalar - uScalarMin) * uScalarScale. Without scalars, colormap mode falls back to vertex colours. The dtype matches the source zarr array (Float32 / Float16 / Uint8 / Uint16); the shader reads radius-style normalised attributes when the dtype is integer.

    elementIds?: Uint32Array<ArrayBufferLike>

    Visible-buffer slot → ON-DISK element index map (size: numPoints, optional).

    Produced by data/points/projection.ts::projectPointsTo3D and consumed at commit by data/scene-loader/commit/commit-points-geometry.ts, which forwards it to types/committed-data::setElementIdMap. Picking reads that MESH-level stamp — not this field — via rendering/picking/picking-system/element-id-map.ts, so hover string channels index their per-element CSR by the on-disk index rather than by the storage slot the pick shader reports. The two diverge after spatial range loading (only the visible ranges are concatenated) or effective-radius compaction (zero-radius points are dropped in place).

    OMITTED in three cases: when the node declares none of has_labels, has_image_labels, or has_keys (the map costs 4 B/point on the zero-allocation accumulator path and no string/image reader exists — the embedder selection event can still fire on such a node and keeps reporting the slot); when the identity holds — a single range starting at 0 with no compaction, i.e. the common plain-3D case; and when the map could not be built at all, in which case LoadedPointsData.elementIdsUnavailable is set (the slot is NOT a valid substitute — only the first two cases let a consumer use it directly).

    On an additive LOD ladder each level's map is in that LEVEL's on-disk index space. points-progressive-loader.ts::concatenatePointsData either composes the levels into the PARENT node's union string-channel CSR space (when the parent declares that CSR — the levelOffsets path, #1439) or publishes nothing at all.

    elementIdsUnavailable?: boolean

    Set (only when true) when a slot → on-disk map was WANTED — the node declares has_labels / has_image_labels / has_keys — but could not be built: the slot is NOT the on-disk index and there is no map to say what is.

    Distinct from a plain missing LoadedPointsData.elementIds, which usually means the identity holds. A consumer that composes this payload into a wider index space (the additive-ladder concat) must not substitute identity for it — it publishes no map instead. ONE exemption: a payload with pointCount === 0 contributes no slots to a composition, so it cannot corrupt one and does not veto its siblings' maps (both ladder-concat branches skip the flag there). That is not a suppression: with no map, picking reports the raw slot, which on a sliced payload is itself a wrong CSR row. It only guarantees the reported id is never one composed from data known to be inconsistent.

    pointCount: number

    Number of points loaded (top-level for consistency with Lines/GSplats)

    ndim: number

    Original nD dimensionality (top-level for consistency with Lines/GSplats)

    metadata: {
        totalPoints: number;
        loadedPoints: number;
        bounds: Box3;
        usedSpatialIndex: boolean;
        usedEffectiveRadius?: boolean;
        dtypes?: {
            positions?: string;
            colors?: string;
            radii?: string;
            sharpness?: string;
            scalars?: string;
        };
    }

    Metadata about the loaded data

    Type Declaration

    • totalPoints: number

      Total points in the full dataset

    • loadedPoints: number

      Number of points actually loaded (also available as top-level pointCount)

    • bounds: Box3

      Bounding box of loaded points

    • usedSpatialIndex: boolean

      Whether spatial index was used

    • OptionalusedEffectiveRadius?: boolean

      Whether effective radius calculation was applied

    • Optionaldtypes?: {
          positions?: string;
          colors?: string;
          radii?: string;
          sharpness?: string;
          scalars?: string;
      }

      Original data types from zarr (for proper conversion)