Splats · function
readSplatPly
Read a .ply Gaussian capture.
Explained in Gaussian splats.
function readSplatPly(buffer: ArrayBuffer): SplatDataimport { readSplatPly } from '@driftengine/splats';Parameters
| Parameter | Type | Description |
|---|---|---|
buffer | ArrayBuffer |
In depth
The encodings are the whole of this function's risk. Scale is stored as its logarithm and
opacity as its logit, so both are undone here — and here only, because packSplats documents
that it takes linear values. Getting the boundary wrong produces a capture that is either
invisible or a solid block, and both have been reported against other viewers as rendering bugs.
The file stores rotation as wxyz — rot_0 is the real part — and SplatSource takes xyzw,
so the reorder happens here for the same reason it happens in the .splat reader.