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

    Interface ChunkData

    A CPU-resident buffer holding one layer's data for one chunk of gaussians.

    A "chunk" is a row-range — a contiguous subset of gaussians; a ChunkData holds one layer's data for one such chunk (it carries a .layer, and you acquire and bind position/geometric/color/other separately). Buffers are acquired from a ChunkDataPool, filled by ChunkSource.read, used by consumers (writers, kernels that upload data to the GPU themselves), and then released back to the pool. The underlying ArrayBuffer is reused across subsequent acquisitions of the same byte size.

    count is the number of gaussians of valid data this buffer holds; it matches the source's chunkSize except for the final (short) chunk. The backing data buffer is allocated at full chunk capacity (chunkSize * stride), so the valid region is always the leading count * stride bytes. stride is the bytes per gaussian, dictated by the layer (and, for color and other, by the SH band count or extras schema).

    interface ChunkData {
        count: number;
        data: ArrayBuffer;
        fields: ChunkFieldMap;
        layer: ChunkLayer;
        stride: number;
        field(
            name: string,
        ): Float32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>;
        release(): void;
    }
    Index
    count: number

    Number of gaussians of valid data this buffer holds.

    CPU buffer holding this layer's interleaved per-gaussian records. Its capacity may exceed count * stride (it is sized for a full chunk); only the leading count * stride bytes are meaningful.

    Field name -> byte offset / component descriptor within the stride.

    layer: ChunkLayer

    Which layer this buffer holds.

    stride: number

    Bytes per gaussian for this buffer's layer.

    • Extract one named field as a tight (de-interleaved) typed-array over the valid rows. The result is a copy — fields are generally a sub-span of the stride, so a zero-copy view isn't possible.

      Parameters

      • name: string

      Returns Float32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>

    • Return this buffer to its ChunkDataPool for reuse. After this call the buffer must not be referenced again.

      Returns void