Preparation for reusing the viewer in sibling projects (projector, apairo
tooling):
- toaster/web/js/engine/ now holds the reusable layer (viewer, octree,
octree-worker, overlays) with a README stating the contract: the engine
knows nothing about Toaster's REST API, labels or panels β anything
imported there besides three is a bug. app.js/api.js/colors.js stay one
level up as the application layer.
- three.js r160 is vendored under web/vendor/ (same layout as projector):
the desktop app no longer needs internet for the unpkg importmap.
- Engine hardening for embedders: dispose() (detaches the window listeners,
now held in one named map; frees GPU resources, worker, canvas), and
no-cloud guards on every public entry point.
- Tests: the orbit-crosshair behaviour moves from a scratchpad script into
tests/test_web_ui.py; new coverage for the isolate-mode full-recompute
fallback, dispose(), and a screenshot-level check that delta-ranged GPU
uploads render identically toβ¦
feat(api,web): delta label protocol β labelling is now O(edit), not O(cloud)β
Every label edit (assign, undo, redo, group assigns, apply-suggested) used
to ship the full label array back and recompute + re-upload colours for
every point β ~160 MB of work per click on a 10M-point cloud. Now:
- InteractionController's label-editing methods return the touched indices.
- AnnotationService.state(touched=...) responds with labels_delta
{indices, values} instead of the full labels/grouping arrays.
- The client patches its cached labels, recolours only the touched points
(colors.js: makeLabelColorizer is the single per-point rule shared by the
full recompute and the delta path, so they cannot drift), re-evaluates
visibility only where it can change (touched + both selections), and
uploads just the coalesced dirty ranges (viewer.commitColors).
- Isolate mode falls back to the full recompute β its alpha is a function
of the whole selection, not of the edit.
tests/test_web_ui.py drives the real stack headless (worker octree, motion
cut, pick equivalence) and β¦
Deploy Toaster demo to HF Space β procedural natural-terrain sampleβ
Snapshot of main: the sample generator now builds a procedural natural
terrain (sample.bin still regenerated at image build), demo CLI fixes, web
polish. Space README unchanged; GitHub-only binaries stay out.