The .drft container · interface
DrftSplats
A capture, as the writer is handed it.
Explained in The .drft container.
interface DrftSplatsimport type { DrftSplats } from '@driftengine/drft';In depth
positions is read and never stored, which is the one surprising field here. The writer
needs them to decide the coarse-first block layout, and the reader gets them back out of the
records — so writing them a second time would be twelve bytes a splat of duplicate in the one
place this format is trying hardest to be small.
Properties
| Name | Type | Description |
|---|---|---|
countreadonly | number | |
positionsreadonly | Float32Array | Three per splat, in the capture's own space. Read for layout only. |
recordsreadonly | Uint32Array | wordsPerSplat u32s per splat, in count order. Opaque here. |
wordsPerSplatreadonly | number | |
boundsMinreadonly | Float32Array | |
boundsMaxreadonly | Float32Array | |
sphericalHarmonicsreadonlyoptional | number | Coefficients the source carried and the packer did not read. Carried as a number. |
blocksreadonlyoptional | number | How many blocks to split the capture into, or absent for a size this writer chooses.MoreMore blocks means a capture that opens sooner and a longer chunk table; each entry is sixteen bytes, so even thirty-two blocks is half a kilobyte against megabytes of records. |