bevy/examples/2d
Emerson Coskey 7d40e3ec87
Migrate bevy_sprite to required components (#15489)
# Objective

Continue migration of bevy APIs to required components, following
guidance of https://hackmd.io/@bevy/required_components/

## Solution

- Make `Sprite` require `Transform` and `Visibility` and
`SyncToRenderWorld`
- move image and texture atlas handles into `Sprite`
- deprecate `SpriteBundle`
- remove engine uses of `SpriteBundle`

## Testing

ran cargo tests on bevy_sprite and tested several sprite examples.

---

## Migration Guide

Replace all uses of `SpriteBundle` with `Sprite`. There are several new
convenience constructors: `Sprite::from_image`,
`Sprite::from_atlas_image`, `Sprite::from_color`.

WARNING: use of `Handle<Image>` and `TextureAtlas` as components on
sprite entities will NO LONGER WORK. Use the fields on `Sprite` instead.
I would have removed the `Component` impls from `TextureAtlas` and
`Handle<Image>` except it is still used within ui. We should fix this
moving forward with the migration.
2024-10-09 16:17:26 +00:00
..
2d_shapes.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
2d_viewport_to_world.rs Implement From translation and rotation for isometries (#15733) 2024-10-08 16:09:28 +00:00
bloom_2d.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
bounding_2d.rs Implement From translation and rotation for isometries (#15733) 2024-10-08 16:09:28 +00:00
cpu_draw.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
custom_gltf_vertex_attribute.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
mesh2d.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
mesh2d_alpha_mode.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
mesh2d_arcs.rs Implement From translation and rotation for isometries (#15733) 2024-10-08 16:09:28 +00:00
mesh2d_manual.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
mesh2d_vertex_color_texture.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
move_sprite.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
pixel_grid_snap.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
rotation.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
sprite.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
sprite_animation.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
sprite_flipping.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
sprite_sheet.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
sprite_slice.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
sprite_tile.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
text2d.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
texture_atlas.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
transparency_2d.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
wireframe_2d.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00