The .drft container · interface

DrftSplatBlock

One block of a capture, as the reader hands it back.

Explained in The .drft container.

interface DrftSplatBlock
import type { DrftSplatBlock } from '@driftengine/drft';

In depth

Every block repeats the whole capture's count and bounds, which is twenty-eight bytes each and makes a block self-describing: a consumer that has only the first one can size its buffers and cull against the final extent, rather than waiting for a manifest it may already have passed.

Properties

NameTypeDescription
countreadonlynumberSplats in this block.
totalCountreadonlynumberSplats in the whole capture, so a reader allocates once from the first block it meets.
wordsPerSplatreadonlynumber
sphericalHarmonicsreadonlynumber
boundsMinreadonlyFloat32ArrayThe whole capture's extent, not this block's.
boundsMaxreadonlyFloat32Array
recordsreadonlyUint32ArrayA view over the file's own bytes: wordsPerSplat * count words, no copy.