Splats · interface

SplatSorterOptions

Explained in Gaussian splats.

interface SplatSorterOptions
import type { SplatSorterOptions } from '@driftengine/splats';

Properties

NameTypeDescription
splatsreadonlySplatDataThe capture. Its positions, extents and bounds are all read; its packed texels are not.
sortreadonlyoptionalSplatSortFnDefaults to a Blob worker, falling back to the main thread. See createDefaultSplatSort.
budgetreadonlyoptionalnumberThe most splats to draw. Zero, or anything at or above the capture's count, draws all of them.
More

defaultSplatBudget is what a consumer that has no number of its own should pass.

moveFractionreadonlyoptionalnumberOverrides RESORT_MOVE_FRACTION. Only consulted when there is a budget.
readyreadonlyoptional() => numberHow many of the capture's splats have actually arrived. Defaults to all of them.
More

A capability rather than a number, because it changes while a capture streams. A SplatCapture is allocated at its final count and filled block by block, so its unarrived tail is zeroed — every phantom splat sitting at the origin with no size. Sorting those would order a cloud of them into the middle of the capture and draw them, which reads as a corrupt file rather than as a load in progress. Pass () => capture.ready and this follows the load.