Splats · interface
SplatSource
A capture as a reader hands it over: linear values, one array per attribute.
Explained in Gaussian splats.
interface SplatSourceimport type { SplatSource } from '@driftengine/splats';In depth
Linear, and that boundary is load-bearing. A .ply from a training run stores scale as its
logarithm and opacity as its logit, and undoing both is the reader's job rather than this
one's. Getting the boundary wrong produces a capture that is either invisible or a solid block,
and both have been reported against other viewers — because both look like a rendering fault.
Properties
| Name | Type | Description |
|---|---|---|
countreadonly | number | |
positionsreadonly | Float32Array | Three per splat, in the capture's own space. |
scalesreadonly | Float32Array | Three per splat: the Gaussian's standard deviation along each of its own axes, in metres. |
rotationsreadonly | Float32Array | Four per splat, xyzw, normalised here rather than trusted.MoreBoth file formats store wxyz and this does not, which is a deliberate seam: |
colorsreadonly | Float32Array | Three per splat, 0 to 1, as the capture stores them: display values.MoreA capture is trained against photographs, so its spherical-harmonic DC term reproduces their
pixels when drawn as it is, which is what every reference viewer does. This engine composes in
linear light and grades once at the end, so the shader decodes the colour (after the
view-dependent term) and the frame's encode gives it back. Until 4.13.0 these were read as
linear, which drew the same under the old |
opacitiesreadonly | Float32Array | One per splat, 0 to 1, already through the logistic if the format stored a logit. |
sh1readonlyoptional | Float32Array | The l=1 spherical-harmonic band, nine per splat, or absent for a capture that has none.MoreInterleaved by basis function and then by channel — Raw coefficients, signed, in the same units the training run wrote — the band constant is the
shader's to apply, like |