Splats · function

readSplatSog

Read a .sog capture into a SplatSource.

Explained in Gaussian splats.

function readSplatSog(files: SogFiles, decode: WebpDecoder): Promise<SplatData>
import { readSplatSog } from '@driftengine/splats';

Parameters

ParameterTypeDescription
filesSogFiles
decodeWebpDecoder

In depth

files is what unbundleSog returns for a bundle, or the files of an unbundled capture keyed by the names its meta.json uses. decode turns one WebP into texels; see browserWebpDecoder.

Every per-Gaussian property is co-located: the texel at (x, y) means the same Gaussian in every image, and the Gaussians run row-major from the top left. So one index walks all of them, which is the property that makes this reader a single loop and is also the property a reader that transposed one image would break silently.