threejs-splats
Installation
SKILL.md
Gaussian splats
A Gaussian splat is a captured scene stored as millions of soft colored ellipsoids instead of triangles: real-world
places and objects with view-dependent lighting baked in. Use Spark (@sparkjsdev/spark 2.4, MIT, by World Labs):
it renders splats inside the normal three.js pipeline, sorts several splat objects together, mixes them with
meshes, and runs on mobile WebGL2. It needs WebGLRenderer; there is no WebGPU path.
Process
- Get the capture into a supported format:
.spz(smallest, preferred for the web),.ply(raw training output, often 50-500 MB), compressed.ply,.splat,.ksplat, or.sog. Convert large PLY files to SPZ before shipping (Spark'stranscodeSpz, or the capture tool's SPZ export). - Read
references/spark.mdand set upSparkRendererplus oneSplatMeshper capture. - Fix orientation once: most captures come out in a y-down convention, so they appear upside down until rotated
(
splat.quaternion.set(1, 0, 0, 0)flips them). Set scale and position on theSplatMeshlike anyObject3D. - Wait for
await splat.initializedbefore framing the camera or reading bounds. - For large scenes, turn on level of detail (
lod: trueon the mesh,enableLodon the renderer) and paging for multi-million-splat captures, and cap the pixel ratio; splats are fill-rate heavy. - Check on a phone: splat count and screen coverage decide frame rate, not file size alone.