bevy/examples/shader
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
..
animate_shader.rs
array_texture.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
automatic_instancing.rs
compute_shader_game_of_life.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
custom_phase_item.rs
custom_post_processing.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
custom_shader_instancing.rs
custom_vertex_attribute.rs
extended_material.rs
fallback_image.rs
gpu_readback.rs
shader_defs.rs
shader_material_2d.rs
shader_material_glsl.rs
shader_material_screenspace_texture.rs
shader_material.rs
shader_prepass.rs
specialized_mesh_pipeline.rs
storage_buffer.rs
texture_binding_array.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00