Splats · interface

SplatSortResult

What a sort answers with: the filled buffer, and how many entries of it are real.

Explained in Gaussian splats.

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

In depth

The count is not the request's count once a budget bites, and it comes back rather than being recomputed, because only the sort knows how its ration of the straddling size bucket fell out. A caller that assumed the capture's own count would walk off the end of a valid order into whatever the buffer held before — stale indices drawn as splats, which reads as a corrupt capture rather than as an off-by-one.

Properties

NameTypeDescription
orderreadonlyUint32ArrayThe buffer that was handed in, or the same storage after a worker transferred it twice.
countreadonlynumber