mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-11 16:31:42 +00:00
Viewer frames render in long-lived Web Workers holding a project replica (engine::remote: structural JSON diff/patch, Mirror, FrameServer); the frame cache hands jobs to a RemoteFrames renderer (UI-thread fallback). Roto Brush propagation runs in a job worker and streams segmentations back (FrameSeg binary form), relayed to frame workers. Control-channel wait:true commands whose job is offloaded reply when it ends. The Media Browser browses a pluggable Browser: the file system on the desktop; browser storage and File System Access folders on the web. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42 lines
1.8 KiB
Rust
42 lines
1.8 KiB
Rust
//! EffectCraft in the browser.
|
|
//!
|
|
//! The same engine and egui UI as the desktop app, compiled to `wasm32-unknown-unknown` and run
|
|
//! by eframe's web runner (WebGPU, WebGL2 fallback). What the desktop shell gets from the OS, this
|
|
//! crate gets from the browser:
|
|
//!
|
|
//! | Desktop | Web |
|
|
//! |---|---|
|
|
//! | file system (`FsServices`, media reads, export writes) | a virtual file table ([`files`]) persisted to the Origin Private File System / IndexedDB ([`persist`], [`store`]) |
|
|
//! | config directory (settings, shortcuts, recent projects, auto-saves) | the same store ([`store::WebConfig`]) |
|
|
//! | rfd file dialogs | `<input type=file>` pickers; drop files on the page |
|
|
//! | Media Browser on the file system | browser storage and folders opened with the File System Access API ([`browse`]) |
|
|
//! | written files (Save, Render Queue) | browser downloads (several render files as one `.zip`) |
|
|
//! | frame render threads | frame workers, each with a project replica fed by diffs ([`frames`]); `Frames::pump` on the UI thread without workers |
|
|
//! | Render Queue / analysis threads | Web Workers running their own engine instance ([`worker`]) |
|
|
//! | cpal audio output | Web Audio: an AudioWorklet fed from the preview mixdown ([`audio`]) |
|
|
//! | TCP control channel / MCP | `window.effectcraft` JavaScript API ([`api`]) |
|
|
//!
|
|
//! [`store`] is portable (unit-tested natively); everything else is `wasm32`-only.
|
|
|
|
pub mod store;
|
|
|
|
#[cfg(target_arch = "wasm32")]
|
|
pub mod api;
|
|
#[cfg(target_arch = "wasm32")]
|
|
mod app;
|
|
#[cfg(target_arch = "wasm32")]
|
|
pub mod audio;
|
|
#[cfg(target_arch = "wasm32")]
|
|
pub mod browse;
|
|
#[cfg(target_arch = "wasm32")]
|
|
pub mod files;
|
|
#[cfg(target_arch = "wasm32")]
|
|
pub mod frames;
|
|
#[cfg(target_arch = "wasm32")]
|
|
pub mod persist;
|
|
#[cfg(target_arch = "wasm32")]
|
|
pub mod worker;
|
|
|
|
#[cfg(target_arch = "wasm32")]
|
|
pub use app::*;
|