bevy/examples/ui
Joona Aalto 25bfa80e60
Migrate cameras to required components (#15641)
# Objective

Yet another PR for migrating stuff to required components. This time,
cameras!

## Solution

As per the [selected
proposal](https://hackmd.io/tsYID4CGRiWxzsgawzxG_g#Combined-Proposal-1-Selected),
deprecate `Camera2dBundle` and `Camera3dBundle` in favor of `Camera2d`
and `Camera3d`.

Adding a `Camera` without `Camera2d` or `Camera3d` now logs a warning,
as suggested by Cart [on
Discord](https://discord.com/channels/691052431525675048/1264881140007702558/1291506402832945273).
I would personally like cameras to work a bit differently and be split
into a few more components, to avoid some footguns and confusing
semantics, but that is more controversial, and shouldn't block this core
migration.

## Testing

I ran a few 2D and 3D examples, and tried cameras with and without
render graphs.

---

## Migration Guide

`Camera2dBundle` and `Camera3dBundle` have been deprecated in favor of
`Camera2d` and `Camera3d`. Inserting them will now also insert the other
components required by them automatically.
2024-10-05 01:59:52 +00:00
..
borders.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
button.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
display_and_visibility.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
flex_layout.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
font_atlas_debug.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
ghost_nodes.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
grid.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
overflow.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
overflow_debug.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
relative_cursor_position.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
render_ui_to_texture.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
scroll.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
size_constraints.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
text.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
text_debug.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
text_wrap_debug.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
transparency_ui.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
ui.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
ui_material.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
ui_scaling.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
ui_texture_atlas.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
ui_texture_atlas_slice.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
ui_texture_slice.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
ui_texture_slice_flip_and_tile.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
viewport_debug.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
window_fallthrough.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
z_index.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00