Homesplat-transform API Reference - v3.0.0
    Preparing search index...

    Function decimateSource

    • Chunk-native, memory-bounded decimation to an exact target count.

      Design: positions resident; KD blocks as an IO pattern only; per-block exact global 16-NN + edge costs (GPU when a device is supplied) reduced to K resident candidates; global bucketed greedy matching with chain closure; a second heavy pass moment-matches groups and streams the output.

      The returned source supports a single sequential pass (it computes the merge stream on demand) — the PLY-terminal consumption model. Its close releases the input source and any intermediate spill files. Deep targets run multiple generations; intermediates land in RAM when small enough, else in temp PLY spills under opts.spill.scratchDir.

      Parameters

      • source: ChunkSource

        Input (consumed: the returned source owns it). Single LOD, gaussian layers required.

      • pool: ChunkDataPool

        Chunk-data pool; its chunk size must match the source's.

      • opts: DecimateOptions

        Options.

      Returns Promise<ChunkSource>

      The decimated stream-once source with exact metadata.