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

    Builder for gsplats test data.

    Mirrors PointsBuilder. Required attributes are centers, amplitudes, and choleskyFactors. The Cholesky packing follows the lower-triangular layout used by the rest of the viewer: ndim*(ndim+1)/2 floats per splat.

    const gs = new GSplatsBuilder()
    .withSplats(200)
    .withDimensions(3)
    .withRandomCenters()
    .withAmplitudes(1.0)
    .withIsotropicCovariance(0.05)
    .build();
    Index
    numSplats: number = 100
    dimensions: number = 3
    centers: Float32Array<ArrayBufferLike> | null = null
    amplitudes: Float32Array<ArrayBufferLike> | null = null
    choleskyFactors: Float32Array<ArrayBufferLike> | null = null
    colors: Float32Array<ArrayBufferLike> | null = null
    • Provide explicit centers. Layout: numSplats * dimensions floats.

      Parameters

      • centers: number[] | Float32Array<ArrayBufferLike>

      Returns this

    • Set isotropic Gaussian covariance via a single sigma. The Cholesky factor for an isotropic Gaussian is sigma * I, so the lower-triangular packing is sigma on the diagonals and zero elsewhere.

      Packing (ndim=3): [L00, L10, L11, L20, L21, L22] → [sigma, 0, sigma, 0, 0, sigma].

      Parameters

      • sigma: number = 0.1

      Returns this

    • Provide explicit Cholesky factors (numSplats * ndim*(ndim+1)/2 floats).

      Parameters

      • factors: number[] | Float32Array<ArrayBufferLike>

      Returns this

    • Per-splat RGB colors. Random when no values are passed.

      Parameters

      • Optionalcolors: number[] | Float32Array<ArrayBufferLike>

      Returns this

    • Build the test fixture. centers is auto-populated with random values if unset; amplitudes defaults to 1.0; choleskyFactors defaults to isotropic sigma=0.1 if unset (all three are required attributes).

      Returns {
          centers: Float32Array;
          amplitudes: Float32Array;
          choleskyFactors: Float32Array;
          colors: Float32Array<ArrayBufferLike> | null;
          numSplats: number;
          dimensions: number;
      }