A minimal example project demonstrating Gaussian splat streaming with SparkJS. Features progressive LOD (Level of Detail) loading, VR support, and mobile touch controls.
https://sparklodstream.netlify.app/
- Streaming LOD: Progressively loads splat chunks (
-lod-0.spz,-lod-1.spz, etc.) based on camera distance - VR Support: WebXR with hand tracking via
SparkXr - Mobile Controls: Virtual joystick for touch devices
- Desktop Controls: WASD/arrow keys + mouse look via
SparkControls
npm install
npm run devnpm run build
npx netlify-cli deploy --prod --dir=distTo enable streaming for your own splats, use the paged: true option with a -lod-0.spz URL:
const splat = new SplatMesh({
url: "https://your-cdn.com/scene-lod-0.spz",
paged: true,
});The system will automatically fetch -lod-1.spz, -lod-2.spz, etc. as needed.
index.html - Entry point
main.js - Scene setup, controls, animation loop
mobile-controls.js - Virtual joystick for touch devices
lib/ - Local Spark build
spark.module.js
spark.module.js.map
spark_internal_rs_bg.wasm
To update the local Spark build from ~/projects/spark/:
./update-spark.shMIT
