# splat (WebGL Gaussian Splat Viewer)

- Author: Kevin Kwok (antimatter15)
- Source: https://github.com/antimatter15/splat
- Commit: ba182b51b7c2ad5738cdd6741cd63336d27470fb (main; the project has no build step, these are the published files)
- Licence: MIT (./LICENSE)
- Vendored files: index.html, main.js (both unchanged, kept as published), LICENSE
- Added by Web Curio: stage.html, main.stage.js, scene.splat, make-scene.mjs, this file
- Scene: the original loads `train.splat` (a ~30 MB capture) from huggingface.co. That file is not bundled.
  Instead `scene.splat` (≈195k splats, 6.2 MB) is a procedural scene — a floating island with a blossom tree,
  pond, waterfall, rocks and drifting pollen — generated from noise and geometry by `make-scene.mjs`
  (`node make-scene.mjs scene.splat`, deterministic seed). It contains no captured data; the museum
  dedicates scene.splat and make-scene.mjs to the public domain (CC0).
- Modifications to the original (only in the copy main.stage.js; main.js is untouched):
  1. the default file is `scene.splat` resolved against the page URL instead of
     `train.splat` on https://huggingface.co/cakewalk/splat-data/resolve/main/ (the `?url=` parameter still works
     for same-site files);
  2. the streaming loop grows its buffer when the server sends no content-length (or a compressed one); the
     original assumes an exact content-length and fails with "RangeError: offset is out of bounds" otherwise.
  stage.html is index.html with `main.js` replaced by `main.stage.js`, plus the museum's CSP meta and sandbox shim.
- Still works: orbit/fly controls, camera presets 0–9 (they were made for the train scene, so they point at
  empty space here; press p to resume the default orbit), dropping your own .splat file onto the page.
  Dropping a .ply converts it but the "save model.splat" download is blocked by the sandboxed frame.
