bevy/crates/bevy_sprite/src
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
..
mesh2d Remove thiserror from bevy_sprite (#15763) 2024-10-09 14:29:26 +00:00
render Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
texture_slice Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
bundle.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
dynamic_texture_atlas_builder.rs Uncouple DynamicTextureAtlasBuilder from assets (#13717) 2024-06-08 12:38:03 +00:00
lib.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
picking_backend.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
texture_atlas_builder.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
texture_atlas.rs Split TextureAtlasSources out of TextureAtlasLayout and make TextureAtlasLayout serializable (#15344) 2024-09-30 17:11:56 +00:00