Expand description
The Web Worker entry point of the indicatrix browser app.
Trunk builds this crate as a worker (data-type="worker" in
apps/indicatrix-web/index.html): wasm-bindgen’s no-modules output plus a loader
shim, indicatrix-web-compute_loader.js, which the page starts with
new Worker(...) (see indicatrix_web_core::WORKER_LOADER_URL).
On start the Worker installs its onmessage handler, then posts Loaded. Each
message is a postcard-encoded ToWorker in a transferred ArrayBuffer; it is
handed to indicatrix_web_core::worker::WorkerHandler, which owns every decision
(and the cached scene, plane arena and HDR map, kept across chunks), and the reply
goes back the same way. A long solve job’s progress reports are posted as they are
emitted, before the reply. Time is performance.now() from the Worker’s own global.
Like apps/indicatrix-web, everything is #[cfg(target_arch = "wasm32")], so a
native build of the workspace compiles this crate to nothing.