bevy/examples/stress_tests
NiseVoid bdd0af6bfb
Deprecate SpatialBundle (#15830)
# Objective

- Required components replace bundles, but `SpatialBundle` is yet to be
deprecated

## Solution

- Deprecate `SpatialBundle`
- Insert `Transform` and `Visibility` instead in examples using it
- In `spawn` or `insert` inserting a default `Transform` or `Visibility`
with component already requiring either, remove those components from
the tuple

## Testing

- Did you test these changes? If so, how?
Yes, I ran the examples I changed and tests
- Are there any parts that need more testing?
The `gamepad_viewer` and and `custom_shader_instancing` examples don't
work as intended due to entirely unrelated code, didn't check main.
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
Run examples, or just check that all spawned values are identical
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?
Linux, wayland trough x11 (cause that's the default feature)

---

## Migration Guide

`SpatialBundle` is now deprecated, insert `Transform` and `Visibility`
instead which will automatically insert all other components that were
in the bundle. If you do not specify these values and any other
components in your `spawn`/`insert` call already requires either of
these components you can leave that one out.

before:
```rust
commands.spawn(SpatialBundle::default());
```

after:
```rust
commands.spawn((Transform::default(), Visibility::default());
```
2024-10-13 17:28:22 +00:00
..
bevymark.rs split up TextStyle (#15857) 2024-10-13 17:06:22 +00:00
many_animated_sprites.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
many_buttons.rs split up TextStyle (#15857) 2024-10-13 17:06:22 +00:00
many_cubes.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
many_foxes.rs Deprecate SpatialBundle (#15830) 2024-10-13 17:28:22 +00:00
many_gizmos.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
many_glyphs.rs split up TextStyle (#15857) 2024-10-13 17:06:22 +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 split up TextStyle (#15857) 2024-10-13 17:06:22 +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>