Skip to main content

Crate preview

Crate preview 

Source
Expand description

preview — native winit + wgpu sibling window that wisp renders into.

The [[bin]] target (src/main.rs) opens a real OS window via winit, hands its wgpu surface to [wisp::application::Application::from_wgpu], and pumps the [playback::Player] into it. The library half exposes the pure helpers (math, headless render harness) so [[example]] and tests can exercise the same render path without a window.

Functions§

aspect_fit_scale
Letterbox/pillarbox scale that fits a video_w × video_h source into a surface_w × surface_h viewport, expressed as a Vec2 for the wisp sprite’s transform scale.