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

    Builder for points test data

    Index
    numPoints: number = 100
    dimensions: number = 3
    positions: Float32Array<ArrayBufferLike> | null = null
    colors: Float32Array<ArrayBufferLike> | null = null
    radii: Float32Array<ArrayBufferLike> | null = null
    sharpness: Float32Array<ArrayBufferLike> | null = null
    • Add specific positions

      Parameters

      • positions: number[] | Float32Array<ArrayBufferLike>

      Returns this

    • Add colors (random if not specified)

      Parameters

      • Optionalcolors: number[] | Float32Array<ArrayBufferLike>

      Returns this

    • Set radii.

      Accepts either:

      • a scalar (number) — broadcast to every point, OR
      • an explicit Float32Array / number[] of length numPoints — cloned into a fresh Float32Array so the builder owns its own buffer (a later mutation by the caller cannot leak in).

      Mismatched-length arrays throw a clear error rather than silently truncating or zero-extending.

      Parameters

      • radius: number | number[] | Float32Array<ArrayBufferLike>

      Returns this

    • Build the points data

      Returns {
          positions: Float32Array;
          colors: Float32Array<ArrayBufferLike> | null;
          radii: Float32Array<ArrayBufferLike> | null;
          sharpness: Float32Array<ArrayBufferLike> | null;
          numPoints: number;
          dimensions: number;
      }