Viewer for streaming compact 36B .dat splats (SwinGS viewer vendored in demo/).
References: SwinGSplat/demo
cd demo
python3 -m http.server 8080
# open http://localhost:8080/- Edit
demo/config_local.jsonand setMODEL_URLto either:data/your.dat(same-origin, no CORS issues), or- A remote URL (requires CORS enabled on that host)
- Tuning:
TOTAL_CAP: 50k–150k for startup speedSLICE_NUM: 5–10 for temporal continuity (watchSLICE_CAP = TOTAL_CAP/SLICE_NUM)PREFETCH_SEC: 0.5–1.5 to reduce stutterMAX_FRAME: match your file (e.g., 1800)
- We store the dataset in Cloudflare R2 public bucket (e.g.
https://<pub>.r2.dev/a08_full.dat). - Ensure the object is public and CORS allows your app origin(s):
- Access-Control-Allow-Origin: your site(s) (e.g.,
https://your.app,http://localhost:8080) - Access-Control-Allow-Methods: GET, HEAD
- Access-Control-Allow-Headers: *
- Access-Control-Expose-Headers: Content-Length, Content-Range, Accept-Ranges, ETag
- Access-Control-Max-Age: 86400
- Access-Control-Allow-Origin: your site(s) (e.g.,
- If CORS is not set, browsers will block cross-origin streaming.
- Repo contains a
Procfileandnixpacks.tomlso Nixpacks knows the start command. - Start command serves the viewer statically from
demo/:- Procfile:
web: sh -c 'cd demo && python3 -m http.server ${PORT:-8080}'
- Procfile:
- Steps:
- Connect the repo in Coolify
- App type: Static/Node (Nixpacks will pick Python due to
requirements.txtbut we use the Procfile’s start) - Expose the PORT you configured
- Redeploy
We include server/server.js (Express + compression) to emulate remote bandwidth and avoid local burst artifacts.
cd server
npm i
THROTTLE_MBPS=25 node server.js
# open http://localhost:8080/demo/Use only if you need to mimic remote streaming locally; otherwise, the simple static server is fine.