diff --git a/Cargo.toml b/Cargo.toml index d982bf05fca28..ec361396b44c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" categories = ["game-engines", "graphics", "gui", "rendering"] description = "A refreshingly simple data-driven game engine and app framework" @@ -276,8 +276,8 @@ file_watcher = ["bevy_internal/file_watcher"] embedded_watcher = ["bevy_internal/embedded_watcher"] [dependencies] -bevy_dylib = { path = "crates/bevy_dylib", version = "0.12.0-dev", default-features = false, optional = true } -bevy_internal = { path = "crates/bevy_internal", version = "0.12.0-dev", default-features = false } +bevy_dylib = { path = "crates/bevy_dylib", version = "0.12.0", default-features = false, optional = true } +bevy_internal = { path = "crates/bevy_internal", version = "0.12.0", default-features = false } [dev-dependencies] rand = "0.8.0" @@ -2166,6 +2166,17 @@ description = "Showcases the RelativeCursorPosition component" category = "UI (User Interface)" wasm = true +[[example]] +name = "render_ui_to_texture" +path = "examples/ui/render_ui_to_texture.rs" +doc-scrape-examples = true + +[package.metadata.example.render_ui_to_texture] +name = "Render UI to Texture" +description = "An example of rendering UI as a part of a 3D world" +category = "UI (User Interface)" +wasm = true + [[example]] name = "size_constraints" path = "examples/ui/size_constraints.rs" diff --git a/crates/bevy_a11y/Cargo.toml b/crates/bevy_a11y/Cargo.toml index c5da00c51f7a4..f4aed85f15302 100644 --- a/crates/bevy_a11y/Cargo.toml +++ b/crates/bevy_a11y/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_a11y" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides accessibility support for Bevy Engine" homepage = "https://bevyengine.org" @@ -10,8 +10,8 @@ keywords = ["bevy", "accessibility", "a11y"] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_derive = { path = "../bevy_derive", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_derive = { path = "../bevy_derive", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } accesskit = "0.12" diff --git a/crates/bevy_animation/Cargo.toml b/crates/bevy_animation/Cargo.toml index 8e529b5171e20..45796ffc66755 100644 --- a/crates/bevy_animation/Cargo.toml +++ b/crates/bevy_animation/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_animation" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides animation functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -10,14 +10,14 @@ keywords = ["bevy"] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_asset = { path = "../bevy_asset", version = "0.12.0-dev" } -bevy_core = { path = "../bevy_core", version = "0.12.0-dev" } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = ["bevy"] } -bevy_render = { path = "../bevy_render", version = "0.12.0-dev" } -bevy_time = { path = "../bevy_time", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_transform = { path = "../bevy_transform", version = "0.12.0-dev" } -bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_asset = { path = "../bevy_asset", version = "0.12.0" } +bevy_core = { path = "../bevy_core", version = "0.12.0" } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_render = { path = "../bevy_render", version = "0.12.0" } +bevy_time = { path = "../bevy_time", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_transform = { path = "../bevy_transform", version = "0.12.0" } +bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" } diff --git a/crates/bevy_app/Cargo.toml b/crates/bevy_app/Cargo.toml index 27c866dba4b37..65e920fbbd4ed 100644 --- a/crates/bevy_app/Cargo.toml +++ b/crates/bevy_app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_app" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides core App functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -16,11 +16,11 @@ bevy_reflect = ["dep:bevy_reflect", "bevy_ecs/bevy_reflect"] [dependencies] # bevy -bevy_derive = { path = "../bevy_derive", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev", default-features = false } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", optional = true } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } -bevy_tasks = { path = "../bevy_tasks", version = "0.12.0-dev" } +bevy_derive = { path = "../bevy_derive", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", default-features = false } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", optional = true } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } +bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" } # other serde = { version = "1.0", features = ["derive"], optional = true } diff --git a/crates/bevy_asset/Cargo.toml b/crates/bevy_asset/Cargo.toml index 2c90744ba1c10..9f659b79c9ad2 100644 --- a/crates/bevy_asset/Cargo.toml +++ b/crates/bevy_asset/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_asset" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides asset functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -18,13 +18,13 @@ asset_processor = [] watch = [] [dependencies] -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_asset_macros = { path = "macros", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_log = { path = "../bevy_log", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev" } -bevy_tasks = { path = "../bevy_tasks", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_asset_macros = { path = "macros", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_log = { path = "../bevy_log", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0" } +bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } async-broadcast = "0.5" async-fs = "1.5" @@ -41,7 +41,7 @@ thiserror = "1.0" notify-debouncer-full = { version = "0.3.1", optional = true } [target.'cfg(target_os = "android")'.dependencies] -bevy_winit = { path = "../bevy_winit", version = "0.12.0-dev" } +bevy_winit = { path = "../bevy_winit", version = "0.12.0" } [target.'cfg(target_arch = "wasm32")'.dependencies] wasm-bindgen = { version = "0.2" } @@ -50,4 +50,4 @@ wasm-bindgen-futures = "0.4" js-sys = "0.3" [dev-dependencies] -bevy_core = { path = "../bevy_core", version = "0.12.0-dev" } +bevy_core = { path = "../bevy_core", version = "0.12.0" } diff --git a/crates/bevy_asset/macros/Cargo.toml b/crates/bevy_asset/macros/Cargo.toml index b2f9930def52a..d1ccd85035277 100644 --- a/crates/bevy_asset/macros/Cargo.toml +++ b/crates/bevy_asset/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_asset_macros" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Derive implementations for bevy_asset" homepage = "https://bevyengine.org" @@ -12,7 +12,7 @@ keywords = ["bevy"] proc-macro = true [dependencies] -bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0-dev" } +bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0" } syn = "2.0" proc-macro2 = "1.0" diff --git a/crates/bevy_audio/Cargo.toml b/crates/bevy_audio/Cargo.toml index 522c44de5f4f2..652defe88d17d 100644 --- a/crates/bevy_audio/Cargo.toml +++ b/crates/bevy_audio/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_audio" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides audio functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -10,14 +10,14 @@ keywords = ["bevy"] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_asset = { path = "../bevy_asset", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = ["bevy"] } -bevy_transform = { path = "../bevy_transform", version = "0.12.0-dev" } -bevy_derive = { path = "../bevy_derive", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_asset = { path = "../bevy_asset", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_transform = { path = "../bevy_transform", version = "0.12.0" } +bevy_derive = { path = "../bevy_derive", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # other rodio = { version = "0.17", default-features = false } diff --git a/crates/bevy_core/Cargo.toml b/crates/bevy_core/Cargo.toml index c4ecb40dce5f1..231b9bdcf5f7c 100644 --- a/crates/bevy_core/Cargo.toml +++ b/crates/bevy_core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_core" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides core functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -11,12 +11,12 @@ keywords = ["bevy"] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev", features = ["bevy_reflect"] } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev", features = ["bevy_reflect"] } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = ["bevy"] } -bevy_tasks = { path = "../bevy_tasks", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0", features = ["bevy_reflect"] } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = ["bevy_reflect"] } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # other bytemuck = "1.5" diff --git a/crates/bevy_core_pipeline/Cargo.toml b/crates/bevy_core_pipeline/Cargo.toml index 53f8230e4d0f6..e2bdf17000e18 100644 --- a/crates/bevy_core_pipeline/Cargo.toml +++ b/crates/bevy_core_pipeline/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_core_pipeline" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" authors = [ "Bevy Contributors ", @@ -19,17 +19,17 @@ tonemapping_luts = ["bevy_render/ktx2", "bevy_render/zstd"] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_asset = { path = "../bevy_asset", version = "0.12.0-dev" } -bevy_core = { path = "../bevy_core", version = "0.12.0-dev" } -bevy_derive = { path = "../bevy_derive", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_log = { path = "../bevy_log", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev" } -bevy_render = { path = "../bevy_render", version = "0.12.0-dev" } -bevy_transform = { path = "../bevy_transform", version = "0.12.0-dev" } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_asset = { path = "../bevy_asset", version = "0.12.0" } +bevy_core = { path = "../bevy_core", version = "0.12.0" } +bevy_derive = { path = "../bevy_derive", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_log = { path = "../bevy_log", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0" } +bevy_render = { path = "../bevy_render", version = "0.12.0" } +bevy_transform = { path = "../bevy_transform", version = "0.12.0" } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } serde = { version = "1", features = ["derive"] } bitflags = "2.3" diff --git a/crates/bevy_derive/Cargo.toml b/crates/bevy_derive/Cargo.toml index b200c175469df..9e51c0e5ca046 100644 --- a/crates/bevy_derive/Cargo.toml +++ b/crates/bevy_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_derive" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides derive implementations for Bevy Engine" homepage = "https://bevyengine.org" @@ -12,7 +12,7 @@ keywords = ["bevy"] proc-macro = true [dependencies] -bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.12.0-dev" } +bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.12.0" } quote = "1.0" syn = { version = "2.0", features = ["full"] } diff --git a/crates/bevy_diagnostic/Cargo.toml b/crates/bevy_diagnostic/Cargo.toml index 52e3b1b86f15c..18e3d0e27c1cc 100644 --- a/crates/bevy_diagnostic/Cargo.toml +++ b/crates/bevy_diagnostic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_diagnostic" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides diagnostic functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -14,12 +14,12 @@ dynamic_linking = [] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_core = { path = "../bevy_core", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_log = { path = "../bevy_log", version = "0.12.0-dev" } -bevy_time = { path = "../bevy_time", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_core = { path = "../bevy_core", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_log = { path = "../bevy_log", version = "0.12.0" } +bevy_time = { path = "../bevy_time", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # MacOS [target.'cfg(all(target_os="macos"))'.dependencies] diff --git a/crates/bevy_dylib/Cargo.toml b/crates/bevy_dylib/Cargo.toml index f8f40ea5fe361..e08f5609838f0 100644 --- a/crates/bevy_dylib/Cargo.toml +++ b/crates/bevy_dylib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_dylib" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Force the Bevy Engine to be dynamically linked for faster linking" homepage = "https://bevyengine.org" @@ -12,4 +12,4 @@ keywords = ["bevy"] crate-type = ["dylib"] [dependencies] -bevy_internal = { path = "../bevy_internal", version = "0.12.0-dev", default-features = false } +bevy_internal = { path = "../bevy_internal", version = "0.12.0", default-features = false } diff --git a/crates/bevy_dynamic_plugin/Cargo.toml b/crates/bevy_dynamic_plugin/Cargo.toml index 22507f0007f54..38164324a0e35 100644 --- a/crates/bevy_dynamic_plugin/Cargo.toml +++ b/crates/bevy_dynamic_plugin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_dynamic_plugin" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides dynamic plugin loading capabilities for non-wasm platforms" homepage = "https://bevyengine.org" @@ -10,7 +10,7 @@ keywords = ["bevy"] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } # other libloading = { version = "0.8" } diff --git a/crates/bevy_ecs/Cargo.toml b/crates/bevy_ecs/Cargo.toml index 980174d833bdc..82d5736118cc3 100644 --- a/crates/bevy_ecs/Cargo.toml +++ b/crates/bevy_ecs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_ecs" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Bevy Engine's entity component system" homepage = "https://bevyengine.org" @@ -15,11 +15,11 @@ multi-threaded = ["bevy_tasks/multi-threaded"] default = ["bevy_reflect"] [dependencies] -bevy_ptr = { path = "../bevy_ptr", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", optional = true } -bevy_tasks = { path = "../bevy_tasks", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } -bevy_ecs_macros = { path = "macros", version = "0.12.0-dev" } +bevy_ptr = { path = "../bevy_ptr", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", optional = true } +bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } +bevy_ecs_macros = { path = "macros", version = "0.12.0" } async-channel = "1.4" event-listener = "2.5" diff --git a/crates/bevy_ecs/macros/Cargo.toml b/crates/bevy_ecs/macros/Cargo.toml index 45529ce2019fe..d19d740497c84 100644 --- a/crates/bevy_ecs/macros/Cargo.toml +++ b/crates/bevy_ecs/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_ecs_macros" -version = "0.12.0-dev" +version = "0.12.0" description = "Bevy ECS Macros" edition = "2021" license = "MIT OR Apache-2.0" @@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0" proc-macro = true [dependencies] -bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0-dev" } +bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0" } syn = "2.0" quote = "1.0" diff --git a/crates/bevy_encase_derive/Cargo.toml b/crates/bevy_encase_derive/Cargo.toml index a435765011f24..311b11c6e6536 100644 --- a/crates/bevy_encase_derive/Cargo.toml +++ b/crates/bevy_encase_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_encase_derive" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Bevy derive macro for encase" homepage = "https://bevyengine.org" @@ -12,5 +12,5 @@ keywords = ["bevy"] proc-macro = true [dependencies] -bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.12.0-dev" } +bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.12.0" } encase_derive_impl = "0.6.1" diff --git a/crates/bevy_gilrs/Cargo.toml b/crates/bevy_gilrs/Cargo.toml index 4f8a51b9064bd..250ad5fbfd13f 100644 --- a/crates/bevy_gilrs/Cargo.toml +++ b/crates/bevy_gilrs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_gilrs" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Gamepad system made using Gilrs for Bevy Engine" homepage = "https://bevyengine.org" @@ -10,12 +10,12 @@ keywords = ["bevy"] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_input = { path = "../bevy_input", version = "0.12.0-dev" } -bevy_log = { path = "../bevy_log", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } -bevy_time = { path = "../bevy_time", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_input = { path = "../bevy_input", version = "0.12.0" } +bevy_log = { path = "../bevy_log", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } +bevy_time = { path = "../bevy_time", version = "0.12.0" } # other gilrs = "0.10.1" diff --git a/crates/bevy_gizmos/Cargo.toml b/crates/bevy_gizmos/Cargo.toml index 4a40902afae7b..0917b71f97763 100644 --- a/crates/bevy_gizmos/Cargo.toml +++ b/crates/bevy_gizmos/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_gizmos" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides gizmos for Bevy Engine" homepage = "https://bevyengine.org" @@ -13,15 +13,15 @@ webgl = [] [dependencies] # Bevy -bevy_pbr = { path = "../bevy_pbr", version = "0.12.0-dev", optional = true } -bevy_sprite = { path = "../bevy_sprite", version = "0.12.0-dev", optional = true } -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_asset = { path = "../bevy_asset", version = "0.12.0-dev" } -bevy_render = { path = "../bevy_render", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } -bevy_core = { path = "../bevy_core", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev" } -bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0-dev" } -bevy_transform = { path = "../bevy_transform", version = "0.12.0-dev" } +bevy_pbr = { path = "../bevy_pbr", version = "0.12.0", optional = true } +bevy_sprite = { path = "../bevy_sprite", version = "0.12.0", optional = true } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_asset = { path = "../bevy_asset", version = "0.12.0" } +bevy_render = { path = "../bevy_render", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } +bevy_core = { path = "../bevy_core", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0" } +bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0" } +bevy_transform = { path = "../bevy_transform", version = "0.12.0" } diff --git a/crates/bevy_gltf/Cargo.toml b/crates/bevy_gltf/Cargo.toml index 354c5ac07574c..8aa900018bd97 100644 --- a/crates/bevy_gltf/Cargo.toml +++ b/crates/bevy_gltf/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_gltf" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Bevy Engine GLTF loading" homepage = "https://bevyengine.org" @@ -13,22 +13,22 @@ pbr_transmission_textures = [] [dependencies] # bevy -bevy_animation = { path = "../bevy_animation", version = "0.12.0-dev", optional = true } -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_asset = { path = "../bevy_asset", version = "0.12.0-dev" } -bevy_core = { path = "../bevy_core", version = "0.12.0-dev" } -bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0-dev" } -bevy_log = { path = "../bevy_log", version = "0.12.0-dev" } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_pbr = { path = "../bevy_pbr", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = ["bevy"] } -bevy_render = { path = "../bevy_render", version = "0.12.0-dev" } -bevy_scene = { path = "../bevy_scene", version = "0.12.0-dev", features = ["bevy_render"] } -bevy_transform = { path = "../bevy_transform", version = "0.12.0-dev" } -bevy_tasks = { path = "../bevy_tasks", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } +bevy_animation = { path = "../bevy_animation", version = "0.12.0", optional = true } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_asset = { path = "../bevy_asset", version = "0.12.0" } +bevy_core = { path = "../bevy_core", version = "0.12.0" } +bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" } +bevy_log = { path = "../bevy_log", version = "0.12.0" } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_pbr = { path = "../bevy_pbr", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_render = { path = "../bevy_render", version = "0.12.0" } +bevy_scene = { path = "../bevy_scene", version = "0.12.0", features = ["bevy_render"] } +bevy_transform = { path = "../bevy_transform", version = "0.12.0" } +bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # other gltf = { version = "1.3.0", default-features = false, features = [ diff --git a/crates/bevy_hierarchy/Cargo.toml b/crates/bevy_hierarchy/Cargo.toml index d6ec89524775d..20c6b86811f85 100644 --- a/crates/bevy_hierarchy/Cargo.toml +++ b/crates/bevy_hierarchy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_hierarchy" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides hierarchy functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -13,12 +13,12 @@ trace = [] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_core = { path = "../bevy_core", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev", features = ["bevy_reflect"] } -bevy_log = { path = "../bevy_log", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = ["bevy"] } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_core = { path = "../bevy_core", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = ["bevy_reflect"] } +bevy_log = { path = "../bevy_log", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # other smallvec = { version = "1.6", features = ["serde", "union", "const_generics"] } diff --git a/crates/bevy_input/Cargo.toml b/crates/bevy_input/Cargo.toml index 6bc02fd6ea4d8..9f2ce328006fa 100644 --- a/crates/bevy_input/Cargo.toml +++ b/crates/bevy_input/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_input" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides input functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -14,11 +14,11 @@ serialize = ["serde"] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = [ +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ "glam", ] } @@ -27,4 +27,4 @@ serde = { version = "1", features = ["derive"], optional = true } thiserror = "1.0" [dev-dependencies] -bevy = { path = "../../", version = "0.12.0-dev" } +bevy = { path = "../../", version = "0.12.0" } diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index 9600e7d0539ff..a9c46dd06a615 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_internal" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "An internal Bevy crate used to facilitate optional dynamic linking via the 'dynamic_linking' feature" homepage = "https://bevyengine.org" @@ -120,36 +120,36 @@ embedded_watcher = ["bevy_asset?/embedded_watcher"] [dependencies] # bevy -bevy_a11y = { path = "../bevy_a11y", version = "0.12.0-dev" } -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_core = { path = "../bevy_core", version = "0.12.0-dev" } -bevy_derive = { path = "../bevy_derive", version = "0.12.0-dev" } -bevy_diagnostic = { path = "../bevy_diagnostic", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0-dev" } -bevy_input = { path = "../bevy_input", version = "0.12.0-dev" } -bevy_log = { path = "../bevy_log", version = "0.12.0-dev" } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_ptr = { path = "../bevy_ptr", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = ["bevy"] } -bevy_time = { path = "../bevy_time", version = "0.12.0-dev" } -bevy_transform = { path = "../bevy_transform", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } -bevy_window = { path = "../bevy_window", version = "0.12.0-dev" } -bevy_tasks = { path = "../bevy_tasks", version = "0.12.0-dev" } +bevy_a11y = { path = "../bevy_a11y", version = "0.12.0" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_core = { path = "../bevy_core", version = "0.12.0" } +bevy_derive = { path = "../bevy_derive", version = "0.12.0" } +bevy_diagnostic = { path = "../bevy_diagnostic", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" } +bevy_input = { path = "../bevy_input", version = "0.12.0" } +bevy_log = { path = "../bevy_log", version = "0.12.0" } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_ptr = { path = "../bevy_ptr", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_time = { path = "../bevy_time", version = "0.12.0" } +bevy_transform = { path = "../bevy_transform", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } +bevy_window = { path = "../bevy_window", version = "0.12.0" } +bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" } # bevy (optional) -bevy_animation = { path = "../bevy_animation", optional = true, version = "0.12.0-dev" } -bevy_asset = { path = "../bevy_asset", optional = true, version = "0.12.0-dev" } -bevy_audio = { path = "../bevy_audio", optional = true, version = "0.12.0-dev" } -bevy_core_pipeline = { path = "../bevy_core_pipeline", optional = true, version = "0.12.0-dev" } -bevy_gltf = { path = "../bevy_gltf", optional = true, version = "0.12.0-dev" } -bevy_pbr = { path = "../bevy_pbr", optional = true, version = "0.12.0-dev" } -bevy_render = { path = "../bevy_render", optional = true, version = "0.12.0-dev" } -bevy_dynamic_plugin = { path = "../bevy_dynamic_plugin", optional = true, version = "0.12.0-dev" } -bevy_scene = { path = "../bevy_scene", optional = true, version = "0.12.0-dev" } -bevy_sprite = { path = "../bevy_sprite", optional = true, version = "0.12.0-dev" } -bevy_text = { path = "../bevy_text", optional = true, version = "0.12.0-dev" } -bevy_ui = { path = "../bevy_ui", optional = true, version = "0.12.0-dev" } -bevy_winit = { path = "../bevy_winit", optional = true, version = "0.12.0-dev" } -bevy_gilrs = { path = "../bevy_gilrs", optional = true, version = "0.12.0-dev" } -bevy_gizmos = { path = "../bevy_gizmos", optional = true, version = "0.12.0-dev", default-features = false } +bevy_animation = { path = "../bevy_animation", optional = true, version = "0.12.0" } +bevy_asset = { path = "../bevy_asset", optional = true, version = "0.12.0" } +bevy_audio = { path = "../bevy_audio", optional = true, version = "0.12.0" } +bevy_core_pipeline = { path = "../bevy_core_pipeline", optional = true, version = "0.12.0" } +bevy_gltf = { path = "../bevy_gltf", optional = true, version = "0.12.0" } +bevy_pbr = { path = "../bevy_pbr", optional = true, version = "0.12.0" } +bevy_render = { path = "../bevy_render", optional = true, version = "0.12.0" } +bevy_dynamic_plugin = { path = "../bevy_dynamic_plugin", optional = true, version = "0.12.0" } +bevy_scene = { path = "../bevy_scene", optional = true, version = "0.12.0" } +bevy_sprite = { path = "../bevy_sprite", optional = true, version = "0.12.0" } +bevy_text = { path = "../bevy_text", optional = true, version = "0.12.0" } +bevy_ui = { path = "../bevy_ui", optional = true, version = "0.12.0" } +bevy_winit = { path = "../bevy_winit", optional = true, version = "0.12.0" } +bevy_gilrs = { path = "../bevy_gilrs", optional = true, version = "0.12.0" } +bevy_gizmos = { path = "../bevy_gizmos", optional = true, version = "0.12.0", default-features = false } diff --git a/crates/bevy_log/Cargo.toml b/crates/bevy_log/Cargo.toml index de5807b96ed9e..4075942ae4403 100644 --- a/crates/bevy_log/Cargo.toml +++ b/crates/bevy_log/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_log" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides logging for Bevy Engine" homepage = "https://bevyengine.org" @@ -13,9 +13,9 @@ trace = [ "tracing-error" ] trace_tracy_memory = ["dep:tracy-client"] [dependencies] -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } tracing-subscriber = {version = "0.3.1", features = ["registry", "env-filter"]} tracing-chrome = { version = "0.7.0", optional = true } diff --git a/crates/bevy_macro_utils/Cargo.toml b/crates/bevy_macro_utils/Cargo.toml index 85552fa1c1914..b790c8c9fae8e 100644 --- a/crates/bevy_macro_utils/Cargo.toml +++ b/crates/bevy_macro_utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_macro_utils" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "A collection of utils for Bevy Engine" homepage = "https://bevyengine.org" diff --git a/crates/bevy_math/Cargo.toml b/crates/bevy_math/Cargo.toml index df9389effee80..09daa7d938792 100644 --- a/crates/bevy_math/Cargo.toml +++ b/crates/bevy_math/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_math" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides math functionality for Bevy Engine" homepage = "https://bevyengine.org" diff --git a/crates/bevy_mikktspace/Cargo.toml b/crates/bevy_mikktspace/Cargo.toml index 8bd4afcd7753b..105e730591f97 100644 --- a/crates/bevy_mikktspace/Cargo.toml +++ b/crates/bevy_mikktspace/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_mikktspace" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" authors = ["Benjamin Wasty ", "David Harvey-Macaulay ", "Layl Bongers "] description = "Mikkelsen tangent space algorithm" diff --git a/crates/bevy_pbr/Cargo.toml b/crates/bevy_pbr/Cargo.toml index c7c9345474bdb..14759e5b7f55d 100644 --- a/crates/bevy_pbr/Cargo.toml +++ b/crates/bevy_pbr/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_pbr" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Adds PBR rendering to Bevy Engine" homepage = "https://bevyengine.org" @@ -14,17 +14,17 @@ pbr_transmission_textures = [] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_asset = { path = "../bevy_asset", version = "0.12.0-dev" } -bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = ["bevy"] } -bevy_render = { path = "../bevy_render", version = "0.12.0-dev" } -bevy_transform = { path = "../bevy_transform", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } -bevy_window = { path = "../bevy_window", version = "0.12.0-dev" } -bevy_derive = { path = "../bevy_derive", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_asset = { path = "../bevy_asset", version = "0.12.0" } +bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_render = { path = "../bevy_render", version = "0.12.0" } +bevy_transform = { path = "../bevy_transform", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } +bevy_window = { path = "../bevy_window", version = "0.12.0" } +bevy_derive = { path = "../bevy_derive", version = "0.12.0" } # other bitflags = "2.3" diff --git a/crates/bevy_ptr/Cargo.toml b/crates/bevy_ptr/Cargo.toml index a9cb87a1f4536..f09f5f0d5453d 100644 --- a/crates/bevy_ptr/Cargo.toml +++ b/crates/bevy_ptr/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_ptr" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Utilities for working with untyped pointers in a more safe way" homepage = "https://bevyengine.org" diff --git a/crates/bevy_reflect/Cargo.toml b/crates/bevy_reflect/Cargo.toml index a098d03f19e1f..ecf925cf019ae 100644 --- a/crates/bevy_reflect/Cargo.toml +++ b/crates/bevy_reflect/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_reflect" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Dynamically interact with rust types" homepage = "https://bevyengine.org" @@ -18,12 +18,12 @@ documentation = ["bevy_reflect_derive/documentation"] [dependencies] # bevy -bevy_math = { path = "../bevy_math", version = "0.12.0-dev", features = [ +bevy_math = { path = "../bevy_math", version = "0.12.0", features = [ "serialize", ], optional = true } -bevy_reflect_derive = { path = "bevy_reflect_derive", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } -bevy_ptr = { path = "../bevy_ptr", version = "0.12.0-dev" } +bevy_reflect_derive = { path = "bevy_reflect_derive", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } +bevy_ptr = { path = "../bevy_ptr", version = "0.12.0" } # other erased-serde = "0.3" diff --git a/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml b/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml index bfb239e8105c5..0950536e31796 100644 --- a/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml +++ b/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_reflect_derive" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Derive implementations for bevy_reflect" homepage = "https://bevyengine.org" @@ -17,7 +17,7 @@ default = [] documentation = [] [dependencies] -bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0-dev" } +bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0" } syn = { version = "2.0", features = ["full"] } proc-macro2 = "1.0" diff --git a/crates/bevy_render/Cargo.toml b/crates/bevy_render/Cargo.toml index 9878284469930..be65412bcb773 100644 --- a/crates/bevy_render/Cargo.toml +++ b/crates/bevy_render/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_render" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides rendering functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -35,23 +35,23 @@ webgl = ["wgpu/webgl"] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_asset = { path = "../bevy_asset", version = "0.12.0-dev" } -bevy_core = { path = "../bevy_core", version = "0.12.0-dev" } -bevy_derive = { path = "../bevy_derive", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_encase_derive = { path = "../bevy_encase_derive", version = "0.12.0-dev" } -bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0-dev" } -bevy_log = { path = "../bevy_log", version = "0.12.0-dev" } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_mikktspace = { path = "../bevy_mikktspace", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = ["bevy"] } -bevy_render_macros = { path = "macros", version = "0.12.0-dev" } -bevy_time = { path = "../bevy_time", version = "0.12.0-dev" } -bevy_transform = { path = "../bevy_transform", version = "0.12.0-dev" } -bevy_window = { path = "../bevy_window", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } -bevy_tasks = { path = "../bevy_tasks", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_asset = { path = "../bevy_asset", version = "0.12.0" } +bevy_core = { path = "../bevy_core", version = "0.12.0" } +bevy_derive = { path = "../bevy_derive", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_encase_derive = { path = "../bevy_encase_derive", version = "0.12.0" } +bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" } +bevy_log = { path = "../bevy_log", version = "0.12.0" } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_mikktspace = { path = "../bevy_mikktspace", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_render_macros = { path = "macros", version = "0.12.0" } +bevy_time = { path = "../bevy_time", version = "0.12.0" } +bevy_transform = { path = "../bevy_transform", version = "0.12.0" } +bevy_window = { path = "../bevy_window", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } +bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" } # rendering image = { version = "0.24", default-features = false } diff --git a/crates/bevy_render/macros/Cargo.toml b/crates/bevy_render/macros/Cargo.toml index 5ffcadfc98b36..6bd810a310bb9 100644 --- a/crates/bevy_render/macros/Cargo.toml +++ b/crates/bevy_render/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_render_macros" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Derive implementations for bevy_render" homepage = "https://bevyengine.org" @@ -12,7 +12,7 @@ keywords = ["bevy"] proc-macro = true [dependencies] -bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0-dev" } +bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0" } syn = "2.0" proc-macro2 = "1.0" diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index be6349689b7cb..8527ed5bfd9c5 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -26,6 +26,7 @@ use bevy_transform::components::GlobalTransform; use bevy_utils::{HashMap, HashSet}; use bevy_window::{ NormalizedWindowRef, PrimaryWindow, Window, WindowCreated, WindowRef, WindowResized, + WindowScaleFactorChanged, }; use std::{borrow::Cow, ops::Range}; use wgpu::{BlendState, LoadOp, TextureFormat}; @@ -74,7 +75,7 @@ pub struct RenderTargetInfo { pub struct ComputedCameraValues { projection_matrix: Mat4, target_info: Option, - // position and size of the `Viewport` + // size of the `Viewport` old_viewport_size: Option, } @@ -219,6 +220,11 @@ impl Camera { self.computed.target_info.as_ref().map(|t| t.physical_size) } + #[inline] + pub fn target_scaling_factor(&self) -> Option { + self.computed.target_info.as_ref().map(|t| t.scale_factor) + } + /// The projection matrix computed using this camera's [`CameraProjection`]. #[inline] pub fn projection_matrix(&self) -> Mat4 { @@ -546,9 +552,9 @@ impl NormalizedRenderTarget { /// System in charge of updating a [`Camera`] when its window or projection changes. /// -/// The system detects window creation and resize events to update the camera projection if -/// needed. It also queries any [`CameraProjection`] component associated with the same entity -/// as the [`Camera`] one, to automatically update the camera projection matrix. +/// The system detects window creation, resize, and scale factor change events to update the camera +/// projection if needed. It also queries any [`CameraProjection`] component associated with the same +/// entity as the [`Camera`] one, to automatically update the camera projection matrix. /// /// The system function is generic over the camera projection type, and only instances of /// [`OrthographicProjection`] and [`PerspectiveProjection`] are automatically added to @@ -567,6 +573,7 @@ impl NormalizedRenderTarget { pub fn camera_system( mut window_resized_events: EventReader, mut window_created_events: EventReader, + mut window_scale_factor_changed_events: EventReader, mut image_asset_events: EventReader>, primary_window: Query>, windows: Query<(Entity, &Window)>, @@ -579,6 +586,11 @@ pub fn camera_system( let mut changed_window_ids = HashSet::new(); changed_window_ids.extend(window_created_events.read().map(|event| event.window)); changed_window_ids.extend(window_resized_events.read().map(|event| event.window)); + let scale_factor_changed_window_ids: HashSet<_> = window_scale_factor_changed_events + .read() + .map(|event| event.window) + .collect(); + changed_window_ids.extend(scale_factor_changed_window_ids.clone()); let changed_image_handles: HashSet<&AssetId> = image_asset_events .read() @@ -592,7 +604,7 @@ pub fn camera_system( .collect(); for (mut camera, mut camera_projection) in &mut cameras { - let viewport_size = camera + let mut viewport_size = camera .viewport .as_ref() .map(|viewport| viewport.physical_size); @@ -603,11 +615,36 @@ pub fn camera_system( || camera_projection.is_changed() || camera.computed.old_viewport_size != viewport_size { - camera.computed.target_info = normalized_target.get_render_target_info( + let new_computed_target_info = normalized_target.get_render_target_info( &windows, &images, &manual_texture_views, ); + // Check for the scale factor changing, and resize the viewport if needed. + // This can happen when the window is moved between monitors with different DPIs. + // Without this, the viewport will take a smaller portion of the window moved to + // a higher DPI monitor. + if normalized_target.is_changed(&scale_factor_changed_window_ids, &HashSet::new()) { + if let (Some(new_scale_factor), Some(old_scale_factor)) = ( + new_computed_target_info + .as_ref() + .map(|info| info.scale_factor), + camera + .computed + .target_info + .as_ref() + .map(|info| info.scale_factor), + ) { + let resize_factor = new_scale_factor / old_scale_factor; + if let Some(ref mut viewport) = camera.viewport { + let resize = |vec: UVec2| (vec.as_dvec2() * resize_factor).as_uvec2(); + viewport.physical_position = resize(viewport.physical_position); + viewport.physical_size = resize(viewport.physical_size); + viewport_size = Some(viewport.physical_size); + } + } + } + camera.computed.target_info = new_computed_target_info; if let Some(size) = camera.logical_viewport_size() { camera_projection.update(size.x, size.y); camera.computed.projection_matrix = camera_projection.get_projection_matrix(); diff --git a/crates/bevy_scene/Cargo.toml b/crates/bevy_scene/Cargo.toml index 4f02e5db0f8ad..4f8a5eadc060d 100644 --- a/crates/bevy_scene/Cargo.toml +++ b/crates/bevy_scene/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_scene" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides scene functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -14,15 +14,15 @@ serialize = ["dep:serde", "uuid/serde"] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_asset = { path = "../bevy_asset", version = "0.12.0-dev" } -bevy_derive = { path = "../bevy_derive", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = ["bevy"] } -bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0-dev" } -bevy_transform = { path = "../bevy_transform", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } -bevy_render = { path = "../bevy_render", version = "0.12.0-dev", optional = true } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_asset = { path = "../bevy_asset", version = "0.12.0" } +bevy_derive = { path = "../bevy_derive", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" } +bevy_transform = { path = "../bevy_transform", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } +bevy_render = { path = "../bevy_render", version = "0.12.0", optional = true } # other serde = { version = "1.0", features = ["derive"], optional = true } diff --git a/crates/bevy_sprite/Cargo.toml b/crates/bevy_sprite/Cargo.toml index 4cf948236dad9..9b211f9d41ebf 100644 --- a/crates/bevy_sprite/Cargo.toml +++ b/crates/bevy_sprite/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_sprite" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides sprite functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -13,19 +13,19 @@ webgl = [] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_asset = { path = "../bevy_asset", version = "0.12.0-dev" } -bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_log = { path = "../bevy_log", version = "0.12.0-dev" } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = [ +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_asset = { path = "../bevy_asset", version = "0.12.0" } +bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_log = { path = "../bevy_log", version = "0.12.0" } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ "bevy", ] } -bevy_render = { path = "../bevy_render", version = "0.12.0-dev" } -bevy_transform = { path = "../bevy_transform", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } -bevy_derive = { path = "../bevy_derive", version = "0.12.0-dev" } +bevy_render = { path = "../bevy_render", version = "0.12.0" } +bevy_transform = { path = "../bevy_transform", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } +bevy_derive = { path = "../bevy_derive", version = "0.12.0" } # other bytemuck = { version = "1.5", features = ["derive"] } diff --git a/crates/bevy_tasks/Cargo.toml b/crates/bevy_tasks/Cargo.toml index 60f45cb3680e4..6d52a0d4de575 100644 --- a/crates/bevy_tasks/Cargo.toml +++ b/crates/bevy_tasks/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_tasks" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "A task executor for Bevy Engine" homepage = "https://bevyengine.org" diff --git a/crates/bevy_text/Cargo.toml b/crates/bevy_text/Cargo.toml index 9055e3a97dac3..1237443d78634 100644 --- a/crates/bevy_text/Cargo.toml +++ b/crates/bevy_text/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_text" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides text functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -14,16 +14,16 @@ default_font = [] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_asset = { path = "../bevy_asset", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = ["bevy"] } -bevy_render = { path = "../bevy_render", version = "0.12.0-dev" } -bevy_sprite = { path = "../bevy_sprite", version = "0.12.0-dev" } -bevy_transform = { path = "../bevy_transform", version = "0.12.0-dev" } -bevy_window = { path = "../bevy_window", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_asset = { path = "../bevy_asset", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_render = { path = "../bevy_render", version = "0.12.0" } +bevy_sprite = { path = "../bevy_sprite", version = "0.12.0" } +bevy_transform = { path = "../bevy_transform", version = "0.12.0" } +bevy_window = { path = "../bevy_window", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # other ab_glyph = "0.2.6" diff --git a/crates/bevy_time/Cargo.toml b/crates/bevy_time/Cargo.toml index 4eb92f7f2946a..b8a47ac9699a2 100644 --- a/crates/bevy_time/Cargo.toml +++ b/crates/bevy_time/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_time" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides time functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -15,10 +15,10 @@ bevy_ci_testing = ["bevy_app/bevy_ci_testing"] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev", features = ["bevy_reflect"] } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = ["bevy"] } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = ["bevy_reflect"] } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # other crossbeam-channel = "0.5.0" diff --git a/crates/bevy_transform/Cargo.toml b/crates/bevy_transform/Cargo.toml index 26e1746085819..5ad19c096e8c6 100644 --- a/crates/bevy_transform/Cargo.toml +++ b/crates/bevy_transform/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_transform" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "Provides transform functionality for Bevy Engine" homepage = "https://bevyengine.org" @@ -10,16 +10,16 @@ keywords = ["bevy"] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev", features = ["bevy_reflect"] } -bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0-dev" } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = ["bevy"] } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = ["bevy_reflect"] } +bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } serde = { version = "1", features = ["derive"], optional = true } thiserror = "1.0" [dev-dependencies] -bevy_tasks = { path = "../bevy_tasks", version = "0.12.0-dev" } +bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" } approx = "0.5.1" glam = { version = "0.24", features = ["approx"] } diff --git a/crates/bevy_ui/Cargo.toml b/crates/bevy_ui/Cargo.toml index 60e8d74477ac5..b6dd346f955ec 100644 --- a/crates/bevy_ui/Cargo.toml +++ b/crates/bevy_ui/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_ui" -version = "0.12.0-dev" +version = "0.12.0" edition = "2021" description = "A custom ECS-driven UI framework built specifically for Bevy Engine" homepage = "https://bevyengine.org" @@ -10,25 +10,25 @@ keywords = ["bevy"] [dependencies] # bevy -bevy_a11y = { path = "../bevy_a11y", version = "0.12.0-dev" } -bevy_app = { path = "../bevy_app", version = "0.12.0-dev" } -bevy_asset = { path = "../bevy_asset", version = "0.12.0-dev" } -bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0-dev" } -bevy_derive = { path = "../bevy_derive", version = "0.12.0-dev" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0-dev" } -bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0-dev" } -bevy_input = { path = "../bevy_input", version = "0.12.0-dev" } -bevy_log = { path = "../bevy_log", version = "0.12.0-dev" } -bevy_math = { path = "../bevy_math", version = "0.12.0-dev" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0-dev", features = [ +bevy_a11y = { path = "../bevy_a11y", version = "0.12.0" } +bevy_app = { path = "../bevy_app", version = "0.12.0" } +bevy_asset = { path = "../bevy_asset", version = "0.12.0" } +bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0" } +bevy_derive = { path = "../bevy_derive", version = "0.12.0" } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } +bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" } +bevy_input = { path = "../bevy_input", version = "0.12.0" } +bevy_log = { path = "../bevy_log", version = "0.12.0" } +bevy_math = { path = "../bevy_math", version = "0.12.0" } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ "bevy", ] } -bevy_render = { path = "../bevy_render", version = "0.12.0-dev" } -bevy_sprite = { path = "../bevy_sprite", version = "0.12.0-dev" } -bevy_text = { path = "../bevy_text", version = "0.12.0-dev", optional = true } -bevy_transform = { path = "../bevy_transform", version = "0.12.0-dev" } -bevy_window = { path = "../bevy_window", version = "0.12.0-dev" } -bevy_utils = { path = "../bevy_utils", version = "0.12.0-dev" } +bevy_render = { path = "../bevy_render", version = "0.12.0" } +bevy_sprite = { path = "../bevy_sprite", version = "0.12.0" } +bevy_text = { path = "../bevy_text", version = "0.12.0", optional = true } +bevy_transform = { path = "../bevy_transform", version = "0.12.0" } +bevy_window = { path = "../bevy_window", version = "0.12.0" } +bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # other taffy = { version = "0.3.10" } diff --git a/crates/bevy_ui/src/focus.rs b/crates/bevy_ui/src/focus.rs index 91454adeeaada..11f93b87322ab 100644 --- a/crates/bevy_ui/src/focus.rs +++ b/crates/bevy_ui/src/focus.rs @@ -1,4 +1,4 @@ -use crate::{camera_config::UiCameraConfig, CalculatedClip, Node, UiScale, UiStack}; +use crate::{camera_config::UiCameraConfig, CalculatedClip, Node, TargetCamera, UiScale, UiStack}; use bevy_derive::{Deref, DerefMut}; use bevy_ecs::{ change_detection::DetectChangesMut, @@ -126,6 +126,7 @@ pub struct NodeQuery { focus_policy: Option<&'static FocusPolicy>, calculated_clip: Option<&'static CalculatedClip>, view_visibility: Option<&'static ViewVisibility>, + target_camera: Option<&'static TargetCamera>, } /// The system that sets Interaction for all UI elements based on the mouse cursor activity @@ -134,14 +135,14 @@ pub struct NodeQuery { #[allow(clippy::too_many_arguments)] pub fn ui_focus_system( mut state: Local, - camera: Query<(&Camera, Option<&UiCameraConfig>)>, + camera_query: Query<(Entity, &Camera, Option<&UiCameraConfig>)>, + primary_window: Query>, windows: Query<&Window>, mouse_button_input: Res>, touches_input: Res, ui_scale: Res, ui_stack: Res, mut node_query: Query, - primary_window: Query>, ) { let primary_window = primary_window.iter().next(); @@ -170,28 +171,34 @@ pub fn ui_focus_system( let is_ui_disabled = |camera_ui| matches!(camera_ui, Some(&UiCameraConfig { show_ui: false, .. })); - let cursor_position = camera + // If there is only one camera, we use it as default + let default_single_camera = camera_query.get_single().ok().map(|(entity, _, _)| entity); + let camera_cursor_positions: Vec<(Entity, Vec2)> = camera_query .iter() - .filter(|(_, camera_ui)| !is_ui_disabled(*camera_ui)) - .filter_map(|(camera, _)| { - if let Some(NormalizedRenderTarget::Window(window_ref)) = + .filter(|(_, _, camera_ui)| !is_ui_disabled(*camera_ui)) + .filter_map(|(entity, camera, _)| { + // Interactions are only supported for cameras rendering to a window. + let Some(NormalizedRenderTarget::Window(window_ref)) = camera.target.normalize(primary_window) - { - Some(window_ref) - } else { - None - } - }) - .find_map(|window_ref| { + else { + return None; + }; + + let viewport_position = camera + .logical_viewport_rect() + .map(|rect| rect.min) + .unwrap_or_default(); windows .get(window_ref.entity()) .ok() .and_then(|window| window.cursor_position()) + .or_else(|| touches_input.first_pressed_position()) + .map(|cursor_position| (entity, cursor_position - viewport_position)) }) - .or_else(|| touches_input.first_pressed_position()) // The cursor position returned by `Window` only takes into account the window scale factor and not `UiScale`. // To convert the cursor position to logical UI viewport coordinates we have to divide it by `UiScale`. - .map(|cursor_position| cursor_position / ui_scale.0 as f32); + .map(|(entity, cursor_position)| (entity, cursor_position / ui_scale.0 as f32)) + .collect(); // prepare an iterator that contains all the nodes that have the cursor in their rect, // from the top node to the bottom one. this will also reset the interaction to `None` @@ -202,59 +209,70 @@ pub fn ui_focus_system( // reverse the iterator to traverse the tree from closest nodes to furthest .rev() .filter_map(|entity| { - if let Ok(node) = node_query.get_mut(*entity) { - // Nodes that are not rendered should not be interactable - if let Some(view_visibility) = node.view_visibility { - if !view_visibility.get() { - // Reset their interaction to None to avoid strange stuck state - if let Some(mut interaction) = node.interaction { - // We cannot simply set the interaction to None, as that will trigger change detection repeatedly - interaction.set_if_neq(Interaction::None); - } + let Ok(node) = node_query.get_mut(*entity) else { + return None; + }; - return None; - } + let Some(view_visibility) = node.view_visibility else { + return None; + }; + // Nodes that are not rendered should not be interactable + if !view_visibility.get() { + // Reset their interaction to None to avoid strange stuck state + if let Some(mut interaction) = node.interaction { + // We cannot simply set the interaction to None, as that will trigger change detection repeatedly + interaction.set_if_neq(Interaction::None); } + return None; + } + let Some(camera_entity) = node + .target_camera + .map(TargetCamera::entity) + .or(default_single_camera) + else { + return None; + }; - let position = node.global_transform.translation(); - let ui_position = position.truncate(); - let extents = node.node.size() / 2.0; - let mut min = ui_position - extents; - if let Some(clip) = node.calculated_clip { - min = Vec2::max(min, clip.clip.min); - } + let cursor_position = camera_cursor_positions + .iter() + .find_map(|(entity, position)| { + if *entity == camera_entity { + Some(*position) + } else { + None + } + }); - // The mouse position relative to the node - // (0., 0.) is the top-left corner, (1., 1.) is the bottom-right corner - let relative_cursor_position = cursor_position - .map(|cursor_position| (cursor_position - min) / node.node.size()); + let node_rect = node.node.logical_rect(node.global_transform); - // If the current cursor position is within the bounds of the node, consider it for - // clicking - let relative_cursor_position_component = RelativeCursorPosition { - normalized: relative_cursor_position, - }; + // The mouse position relative to the node + // (0., 0.) is the top-left corner, (1., 1.) is the bottom-right corner + // Coordinates are relative to the entire node, not just the visible region. + let relative_cursor_position = cursor_position + .map(|cursor_position| (cursor_position - node_rect.min) / node_rect.size()); - let contains_cursor = relative_cursor_position_component.mouse_over(); + // If the current cursor position is within the bounds of the node's visible area, consider it for + // clicking + let relative_cursor_position_component = RelativeCursorPosition { + normalized: relative_cursor_position, + }; - // Save the relative cursor position to the correct component - if let Some(mut node_relative_cursor_position_component) = - node.relative_cursor_position - { - *node_relative_cursor_position_component = relative_cursor_position_component; - } + let contains_cursor = relative_cursor_position_component.mouse_over(); - if contains_cursor { - Some(*entity) - } else { - if let Some(mut interaction) = node.interaction { - if *interaction == Interaction::Hovered || (cursor_position.is_none()) { - interaction.set_if_neq(Interaction::None); - } + // Save the relative cursor position to the correct component + if let Some(mut node_relative_cursor_position_component) = node.relative_cursor_position + { + *node_relative_cursor_position_component = relative_cursor_position_component; + } + + if contains_cursor { + Some(*entity) + } else { + if let Some(mut interaction) = node.interaction { + if *interaction == Interaction::Hovered || (cursor_position.is_none()) { + interaction.set_if_neq(Interaction::None); } - None } - } else { None } }) diff --git a/crates/bevy_ui/src/layout/debug.rs b/crates/bevy_ui/src/layout/debug.rs index c47b2ca8e802b..37fb5c2b88845 100644 --- a/crates/bevy_ui/src/layout/debug.rs +++ b/crates/bevy_ui/src/layout/debug.rs @@ -12,7 +12,7 @@ pub fn print_ui_layout_tree(ui_surface: &UiSurface) { .iter() .map(|(entity, node)| (*node, *entity)) .collect(); - for (&entity, roots) in &ui_surface.window_roots { + for (&entity, roots) in &ui_surface.camera_roots { let mut out = String::new(); for root in roots { print_node( @@ -25,7 +25,7 @@ pub fn print_ui_layout_tree(ui_surface: &UiSurface) { &mut out, ); } - bevy_log::info!("Layout tree for window entity: {entity:?}\n{out}"); + bevy_log::info!("Layout tree for camera entity: {entity:?}\n{out}"); } } diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs index d404431b1bf26..6e7788ed7991d 100644 --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -1,7 +1,7 @@ mod convert; pub mod debug; -use crate::{ContentSize, Node, Outline, Style, UiScale}; +use crate::{ContentSize, Node, Outline, Style, TargetCamera, UiScale}; use bevy_ecs::{ change_detection::{DetectChanges, DetectChangesMut}, entity::Entity, @@ -13,10 +13,11 @@ use bevy_ecs::{ }; use bevy_hierarchy::{Children, Parent}; use bevy_log::warn; -use bevy_math::Vec2; +use bevy_math::{UVec2, Vec2}; +use bevy_render::camera::{Camera, NormalizedRenderTarget}; use bevy_transform::components::Transform; -use bevy_utils::{default, HashMap}; -use bevy_window::{PrimaryWindow, Window, WindowResolution, WindowScaleFactorChanged}; +use bevy_utils::{default, HashMap, HashSet}; +use bevy_window::{PrimaryWindow, Window, WindowScaleFactorChanged}; use std::fmt; use taffy::Taffy; use thiserror::Error; @@ -51,7 +52,7 @@ struct RootNodePair { #[derive(Resource)] pub struct UiSurface { entity_to_taffy: HashMap, - window_roots: HashMap>, + camera_roots: HashMap>, taffy: Taffy, } @@ -66,7 +67,7 @@ impl fmt::Debug for UiSurface { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("UiSurface") .field("entity_to_taffy", &self.entity_to_taffy) - .field("window_nodes", &self.window_roots) + .field("camera_roots", &self.camera_roots) .finish() } } @@ -77,7 +78,7 @@ impl Default for UiSurface { taffy.disable_rounding(); Self { entity_to_taffy: Default::default(), - window_roots: Default::default(), + camera_roots: Default::default(), taffy, } } @@ -142,9 +143,9 @@ without UI components as a child of an entity with UI components, results may be } /// Set the ui node entities without a [`Parent`] as children to the root node in the taffy layout. - pub fn set_window_children( + pub fn set_camera_children( &mut self, - window_id: Entity, + camera_id: Entity, children: impl Iterator, ) { let viewport_style = taffy::style::Style { @@ -160,7 +161,7 @@ without UI components as a child of an entity with UI components, results may be ..default() }; - let existing_roots = self.window_roots.entry(window_id).or_default(); + let existing_roots = self.camera_roots.entry(camera_id).or_default(); let mut new_roots = Vec::new(); for entity in children { let node = *self.entity_to_taffy.get(&entity).unwrap(); @@ -185,18 +186,20 @@ without UI components as a child of an entity with UI components, results may be } } - self.window_roots.insert(window_id, new_roots); + self.camera_roots.insert(camera_id, new_roots); } /// Compute the layout for each window entity's corresponding root node in the layout. - pub fn compute_window_layout(&mut self, window: Entity, window_resolution: &WindowResolution) { + pub fn compute_camera_layout(&mut self, camera: Entity, render_target_resolution: UVec2) { + let Some(camera_root_nodes) = self.camera_roots.get(&camera) else { + return; + }; + let available_space = taffy::geometry::Size { - width: taffy::style::AvailableSpace::Definite(window_resolution.physical_width() as f32), - height: taffy::style::AvailableSpace::Definite( - window_resolution.physical_height() as f32 - ), + width: taffy::style::AvailableSpace::Definite(render_target_resolution.x as f32), + height: taffy::style::AvailableSpace::Definite(render_target_resolution.y as f32), }; - for root_nodes in self.window_roots.entry(window).or_default() { + for root_nodes in camera_root_nodes { self.taffy .compute_layout(root_nodes.implicit_viewport_node, available_space) .unwrap(); @@ -241,64 +244,110 @@ pub enum LayoutError { #[allow(clippy::too_many_arguments)] pub fn ui_layout_system( primary_window: Query<(Entity, &Window), With>, - windows: Query<(Entity, &Window)>, + cameras: Query<(Entity, &Camera)>, ui_scale: Res, mut scale_factor_events: EventReader, mut resize_events: EventReader, mut ui_surface: ResMut, - root_node_query: Query, Without)>, - style_query: Query<(Entity, Ref