mirror of
https://github.com/bevyengine/bevy
synced 2024-11-13 00:17:27 +00:00
cc32610543
This is an implementation within `bevy_window::window` that fixes #12229. # Objective Fixes #12229, allow users to retrieve the window's size and physical size as Vectors without having to manually construct them using `height()` and `width()` or `physical_height()` and `physical_width()` ## Solution As suggested in #12229, created two public functions within `window`: `size() -> Vec` and `physical_size() -> UVec` that return the needed Vectors ready-to-go. ### Discussion My first FOSS PRQ ever, so bear with me a bit. I'm new to this. - I replaced instances of ```Vec2::new(window.width(), window.height());``` or `UVec2::new(window.physical_width(), window.physical_height());` within bevy examples be replaced with their `size()`/`physical_size()` counterparts? - Discussion within #12229 still holds: should these also be added to WindowResolution? |
||
---|---|---|
.. | ||
bevymark.rs | ||
many_animated_sprites.rs | ||
many_buttons.rs | ||
many_cubes.rs | ||
many_foxes.rs | ||
many_gizmos.rs | ||
many_glyphs.rs | ||
many_lights.rs | ||
many_sprites.rs | ||
README.md | ||
text_pipeline.rs | ||
transform_hierarchy.rs | ||
warning_string.txt |
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>