Skip to main content

aspect_of

Function aspect_of 

Source
pub fn aspect_of(size: (u32, u32)) -> f32
Expand description

The aspect ratio of a size-pixel render target.

Every camera in the example takes its aspect from here rather than from the size its scene was built at, so a target whose shape changes — a browser window being stretched — re-aims instead of stretching.