Skip to main content

extract_active_camera_view

Function extract_active_camera_view 

Source
pub fn extract_active_camera_view(world: &World) -> Option<ViewInfo>
Expand description

Extracts the first active camera as a [ViewInfo] suitable for pushing to the renderer.

Returns None if no entity has an active camera (editor edit mode, empty scene, etc.) — callers can fall back to a default ViewInfo.

Lives outside the RenderFlow because it is also used by the editor for non-render concerns (camera prepare, gizmo space, etc.).