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, linear.MoreNot sRGB-decoded, which is what every reference viewer does and is also what is correct here: a capture's colour comes from a spherical-harmonic DC term, which is linear radiance, and this engine shades and composites in linear and grades once at the end. What would make it wrong is a capture authored by a tool that baked a display transform into the DC term — which produces a washed-out cloud, not a subtly wrong one. |
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 |