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

    Function sampleClusteredPositions

    • Sample count 3D positions from clusters gaussian blobs inside a [-bounds, bounds]^3 volume — the shared spatial scaffold for the points and gsplats generators (real microscopy / astronomy point sets are clumpy, and clustered depth structure is what makes depth-sorted blending measurably order-dependent).

      Cluster centers are uniform in the volume; per-cluster σ is 2–8 % of bounds. Deterministic for a given (rand-stream, count, clusters, bounds).

      Also returns the empirical min/max corner of the sampled positions (gaussians have unbounded tails, so consumers needing a bounding box must use the measured one, not ±bounds).

      Parameters

      • rand: () => number
      • count: number
      • clusters: number
      • bounds: number

      Returns {
          positions: Float32Array;
          min: [number, number, number];
          max: [number, number, number];
      }