bevy/examples/stress_tests
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
..
bevymark.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
many_animated_sprites.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
many_buttons.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
many_cubes.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
many_foxes.rs Replace Handle<AnimationGraph> component with a wrapper (#15742) 2024-10-08 22:41:24 +00:00
many_gizmos.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
many_glyphs.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
many_lights.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
many_sprites.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
README.md Add a stress test profile (#6901) 2022-12-20 15:59:41 +00:00
text_pipeline.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
transform_hierarchy.rs Deprecate get_or_spawn (#15652) 2024-10-07 16:08:22 +00:00
warning_string.txt Added performance warning when running stress test examples in debug mode (#5029) 2022-07-13 19:13:46 +00:00

Stress tests

These examples are used to stress test Bevy's performance in various ways. These should be run with the "stress-test" profile to accurately represent performance in production, otherwise they will run in cargo's default "dev" profile which is very slow.

Example Command

cargo run --profile stress-test --example <EXAMPLE>