Expand description
Browser host for Aetna wasm apps.
Write normal UI code against aetna_core::prelude::*, then call
start_with from your wasm crate’s #[wasm_bindgen(start)]
entry point. The host opens a wgpu surface against a canvas in the
page and drives the app through winit’s browser event loop.
The default configuration expects a <canvas id="aetna_canvas">.
Use start_with_config when embedding into a page with a different
canvas id.
aetna-winit-wgpu is the equivalent reusable native host.
Structs§
- WebHandle
- Browser redraw handle.
- WebHost
Config - Browser host configuration.
Constants§
- DEFAULT_
CANVAS_ ID - Default canvas element id used by
WebHostConfig::default. - VIEWPORT
- Default logical viewport. Sized to feel reasonable both as a winit
window and as a browser canvas. Browsers can override this by
resizing the canvas; the runner reacts to
winit::Resized.