Splats · interface
SplatSortRequest
One sort, as the worker protocol and as the function's own parameter list.
Explained in Gaussian splats.
interface SplatSortRequestimport type { SplatSortRequest } from '@driftengine/splats';In depth
One object rather than eleven arguments, and the worker is the reason. createSplatSortWorker
posts this and hands event.data straight to the sort, so the message shape and the call shape
cannot disagree — which is the failure the 2026-08-17 rule is about, in the one place here where
a decision genuinely does cross a thread boundary.
Properties
| Name | Type | Description |
|---|---|---|
positionsreadonly | Float32Array | Three per splat, in the capture's own space. |
extentsreadonly | Float32Array | One per splat: SplatData.extents, the largest sigma. Only read when there is a budget. |
countreadonly | number | |
dirXreadonly | number | The camera's forward in the capture's own space, unit length.MoreNot the world-space forward: a batch with a model matrix is looked at from a different
direction in its own frame, and |
dirYreadonly | number | |
dirZreadonly | number | |
originXreadonly | number | The camera's position in the capture's own space.MoreInvisible in the order and load-bearing in the budget. Shifting every splat by the same
amount cannot reorder them, so depth alone never needed this; the size key is |
originYreadonly | number | |
originZreadonly | number | |
budgetreadonly | number | The most splats to keep. Zero, or anything at or above count, keeps all of them. |
outreadonly | Uint32Array | The buffer to fill and hand back, so the pair can ping-pong rather than allocate. |