diff --git a/Cargo.toml b/Cargo.toml index 6577c9317ea95..e6cc4ed91ae90 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -506,11 +506,16 @@ path = "examples/shader/animate_shader.rs" name = "compute_shader_game_of_life" path = "examples/shader/compute_shader_game_of_life.rs" -# Tools +# Stress Tests +[[example]] +name = "transform_hierarchy" +path = "examples/stress_tests/transform_hierarchy.rs" + [[example]] name = "bevymark" -path = "examples/tools/bevymark.rs" +path = "examples/stress_tests/bevymark.rs" +# Tools [[example]] name = "scene_viewer" path = "examples/tools/scene_viewer.rs" @@ -596,9 +601,3 @@ icon = "@mipmap/ic_launcher" build_targets = ["aarch64-linux-android", "armv7-linux-androideabi"] min_sdk_version = 16 target_sdk_version = 29 - -# Stress Tests -[[example]] -name = "transform_hierarchy" -path = "examples/stress_tests/transform_hierarchy.rs" - diff --git a/examples/README.md b/examples/README.md index 5342f9d4d288c..53652d70910c2 100644 --- a/examples/README.md +++ b/examples/README.md @@ -50,6 +50,7 @@ git checkout v0.4.0 - [Reflection](#reflection) - [Scene](#scene) - [Shaders](#shaders) + - [Stress Tests](#stress-tests) - [Tests](#tests) - [Tools](#tools) - [Transforms](#transforms) @@ -66,7 +67,7 @@ git checkout v0.4.0 - [WASM](#wasm) - [Setup](#setup-2) - [Build & Run](#build--run-2) -- [Stress Tests](#stress-tests) + - [Loading Assets](#loading-assets) # The Bare Minimum @@ -238,6 +239,21 @@ Example | File | Description `compute_shader_game_of_life` | [`shader/compute_shader_game_of_life.rs`](./shader/compute_shader_game_of_life.rs) | A compute shader simulating Conway's Game of Life `shader_defs` | [`shader/shader_defs.rs`](./shader/shader_defs.rs) | Demonstrates creating a custom material that uses "shaders defs" (a tool to selectively toggle parts of a shader) +## Stress Tests + +These examples are used to test the performance and stability of various parts of the engine in an isolated way. + +Due to the focus on performance it's recommended to run the stress tests in release mode: + +```sh +cargo run --release --example +``` + +Example | File | Description +--- | --- | --- +`bevymark` | [`stress_tests/bevymark.rs`](./stress_tests/bevymark.rs) | A heavy sprite rendering workload to benchmark your system with Bevy +`transform_hierarchy.rs` | [`stress_tests/transform_hierarchy.rs`](./stress_tests/transform_hierarchy.rs) | Various test cases for hierarchy and transform propagation performance + ## Tests Example | File | Description @@ -248,7 +264,6 @@ Example | File | Description Example | File | Description --- | --- | --- -`bevymark` | [`tools/bevymark.rs`](./tools/bevymark.rs) | A heavy sprite rendering workload to benchmark your system with Bevy `scene_viewer` | [`tools/scene_viewer.rs`](./tools/scene_viewer.rs) | A simple way to view glTF models with Bevy. Just run `cargo run --release --example scene_viewer -- /path/to/model.gltf#Scene0`, replacing the path as appropriate. With no arguments it will load the FieldHelmet glTF model from the repository assets subdirectory. ## Transforms @@ -422,17 +437,3 @@ ruby -run -ehttpd examples/wasm To load assets, they need to be available in the folder examples/wasm/assets. Cloning this repository will set it up as a symlink on Linux and macOS, but you will need to manually move the assets on Windows. - -# Stress Tests - -These examples are used to test the performance and stability of various parts of the engine in an isolated way. - -Due to the focus on performance it's recommended to run the stress tests in release mode: - -```sh -cargo run --release --example -``` - -Example | File | Description ---- | --- | --- -`transform_hierarchy.rs` | [`stress_tests/transform_hierarchy.rs`](./stress_tests/transform_hierarchy.rs) | Various test cases for hierarchy and transform propagation performance diff --git a/examples/tools/bevymark.rs b/examples/stress_tests/bevymark.rs similarity index 100% rename from examples/tools/bevymark.rs rename to examples/stress_tests/bevymark.rs