bevy/crates/bevy_ui/src
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
..
layout Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
render Fix entity leak in extract_uinode_borders (#15626) 2024-10-03 18:15:32 +00:00
widget Rename BreakLineOn to LineBreak (#15583) 2024-10-01 22:30:50 +00:00
accessibility.rs Add UI GhostNode (#15341) 2024-10-02 00:24:28 +00:00
focus.rs use precomputed border values (#15163) 2024-09-26 23:10:35 +00:00
geometry.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
ghost_hierarchy.rs Add UI GhostNode (#15341) 2024-10-02 00:24:28 +00:00
lib.rs Invert the dependency between bevy_animation and bevy_ui (#15634) 2024-10-04 01:27:20 +00:00
measurement.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
node_bundles.rs Rename BreakLineOn to LineBreak (#15583) 2024-10-01 22:30:50 +00:00
picking_backend.rs Get rid of unnecessary mutable access in ui picking backend (#15630) 2024-10-03 21:30:52 +00:00
stack.rs Add UI GhostNode (#15341) 2024-10-02 00:24:28 +00:00
ui_material.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
ui_node.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
update.rs Add UI GhostNode (#15341) 2024-10-02 00:24:28 +00:00