splat-transform API Reference - v2.4.0
    Preparing search index...

    Function simplifyGaussians

    • Simplifies a Gaussian splat DataTable to a target number of splats by progressive pair-wise merging of nearest-neighbor gaussians.

      The merge math is derived from sparkjsdev/spark gsplat.rs::new_merged (area·α weighted, mass-conserving opacity, no filter floor, opacity clamped at 1). It preserves color fidelity through multiple iterations far better than the NanoGS Porter-Duff opacity + volume-weighted formula does — color drift / over-saturation is essentially gone even at aggressive reductions.

      Parameters

      • dataTable: DataTable

        The input splat DataTable.

      • targetCount: number

        The desired number of output splats.

      • OptionalcreateDevice: DeviceCreator

        Optional factory yielding a GraphicsDevice. When supplied, KNN and edge-cost run on the GPU; otherwise the CPU KD-tree path is used.

      Returns Promise<DataTable>

      A new DataTable with approximately targetCount splats.