Function camera_system

Source
pub fn camera_system(
    window_resized_events: EventReader<'_, '_, WindowResized>,
    window_created_events: EventReader<'_, '_, WindowCreated>,
    window_scale_factor_changed_events: EventReader<'_, '_, WindowScaleFactorChanged>,
    image_asset_events: EventReader<'_, '_, AssetEvent<Image>>,
    primary_window: Query<'_, '_, Entity, With<PrimaryWindow>>,
    windows: Query<'_, '_, (Entity, &Window)>,
    images: Res<'_, Assets<Image>>,
    manual_texture_views: Res<'_, ManualTextureViews>,
    cameras: Query<'_, '_, (&mut Camera, &mut Projection)>,
)
Expand description

System in charge of updating a Camera when its window or projection changes.

The system detects window creation, resize, and scale factor change events to update the camera Projection if needed.

§World Resources

Res<Assets<Image>> – For cameras that render to an image, this resource is used to inspect information about the render target. This system will not access any other image assets.