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

    Interface ChunkDataPool

    A pool-backed allocator for ChunkData buffers.

    The pool owns a single chunkSize (the gaussians-per-chunk granularity); every buffer it hands out is backed by an ArrayBuffer of full capacity (chunkSize * stride). A short final chunk's buffer therefore shares a pool slot with full-chunk buffers of the same layer stride — the pool keys on the buffer's byte size, so reuse is by capacity, not by the (possibly smaller) count.

    No GraphicsDevice is required: these are CPU buffers. A consumer that needs GPU-resident data uploads chunkData.data itself.

    Pool growth is bounded by maxPooledBytes (default 2 GB). On release, if pooling the buffer would exceed the cap, it is dropped (left to the garbage collector) instead. Call ChunkDataPool.trim to free pooled buffers down to a target.

    interface ChunkDataPool {
        bytesInUse: number;
        bytesPooled: number;
        chunkSize: number;
        acquire(layer: ChunkLayer, layout: LayerLayout, count: number): ChunkData;
        destroy(): void;
        trim(targetBytes: number): void;
    }
    Index
    bytesInUse: number

    Total bytes currently held by callers (not in the pool).

    bytesPooled: number

    Total bytes free-listed and ready to be reused.

    chunkSize: number

    Gaussians-per-chunk granularity this pool allocates for.

    • Drop all pooled buffers. Buffers in use are unaffected.

      Returns void

    • Free pooled buffers until bytesPooled <= targetBytes.

      Parameters

      • targetBytes: number

      Returns void