Something went wrong. Try again.
atproto Thingiverse but good
Something went wrong. Try again.
916 B · 27 lines
Rust
at main
12345678910111213141516171819202122232425262728//! Polymodel renderer Web Worker.//!//! Runs `three-d` + mesh parsing in a dedicated Web Worker with its own WASM bundle,//! bridged to the Dioxus main thread via `OffscreenCanvas` + a postcard message protocol.//!//! The worker owns its `requestAnimationFrame` frame loop and consumes coalesced input//! state per frame (never rendering from a single input message). `LoadMesh` dispatches//! async via `spawn_local` and is epoch-guarded so a stale fetch can't clobber a newer//! load.//!//! On non-wasm targets, `main` is empty so `cargo check --workspace` covers this crate.//! The worker is only ever built for `wasm32-unknown-unknown`.
#![cfg_attr(not(target_arch = "wasm32"), allow(dead_code))]
#[cfg(not(target_arch = "wasm32"))]fn main() {}
#[cfg(target_arch = "wasm32")]mod worker;#[cfg(target_arch = "wasm32")]use worker::entry;
#[cfg(target_arch = "wasm32")]fn main() { entry();}