tools: web viewer shows the owner's world; collapsible phone menu (W2)

export_world.py exports the owner four-strate world (LOD0-2 around each arrival + one FI
passage view) through the headless mesh exporter and converts to GLB (16-45 MB, 0.6-1.7M
triangles each); GLBs are git-ignored and regenerated by the script. Menu collapses to a
button (collapsed by default on phones), smaller phone controls, loading progress and errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-10-29 00:10:28 +01:00
1 parent 2ef0ca72b2
commit 95cf8de107
5 files changed
+240 -16

No files matched your search

+14 -2
View File
@@ -17,6 +17,16 @@ python3 convert.py \
The GLBs go into `meshes/` by default. To use another output folder, add `--out-dir /path/to/glbs`. The converter reads the source mesh directly and does not regenerate a world.
## Refresh the owner world previews
From the repository root, run:
```sh
python3 Standalone/Tools/webviewer/export_world.py
```
This uses the existing `Saved/Linux/l101/bin/VoxelForgeCoreHeadless-l101-clang` exporter to regenerate LOD0–2 arrival views for SW, FI, TN, and VS, plus a FI passage view. It applies the CPU affinity and memory limits used by the capture runners, writes the GLBs into `Standalone/Tools/webviewer/meshes/`, and keeps per-view logs and a size/count summary in `Saved/Linux/w2/`. To use another compatible headless binary, pass `--headless-binary /path/to/VoxelForgeCoreHeadless-*`.
## Start and view
```sh
@@ -24,13 +34,15 @@ cd Standalone/Tools/webviewer
python3 server.py
```
Open <http://127.0.0.1:8000/> in a WebGL-capable browser on the **same machine**. The server binds only to `127.0.0.1`; it does not listen on the LAN. To serve GLBs from a different local folder:
Open <http://127.0.0.1:8000/> in a WebGL-capable browser on the **same machine**. The server binds to `127.0.0.1` by default. To serve GLBs from a different local folder:
```sh
python3 server.py --mesh-dir /path/to/glbs --port 8000
```
On Windows with Python 3, run `py -3 server.py --mesh-dir .\meshes` from this folder and open `http://127.0.0.1:8000/` on that Windows machine. For a phone or Quest browser on another device, this localhost-only server is not reachable from that device. Remote access, including a Tailscale setup, is outside this round.
For a phone connected over Tailscale, bind to the viewer machine's Tailscale address with `--host <tailscale-ip>` and open `http://<tailscale-ip>:8000/` on the phone. Keep the browser online so it can load the pinned Three.js modules from jsDelivr.
On Windows with Python 3, run `py -3 server.py --mesh-dir .\meshes` from this folder and open `http://127.0.0.1:8000/` on that Windows machine.
## Controls