Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bevy 0.12 #276

Merged
merged 6 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.17.0

- Update for bevy 0.12

# 0.16.0

## Highlights
Expand Down
48 changes: 24 additions & 24 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_mod_picking"
version = "0.16.0"
version = "0.17.0"
authors = ["Aevyrie <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand All @@ -19,36 +19,36 @@ all-features = true
members = ["crates/*", "backends/*"]

[dependencies]
bevy_app = { version = "0.11", default-features = false }
bevy_core = { version = "0.11", default-features = false }
bevy_ecs = { version = "0.11", default-features = false }
bevy_math = { version = "0.11", default-features = false }
bevy_reflect = { version = "0.11", default-features = false }
bevy_render = { version = "0.11", default-features = false }
bevy_text = { version = "0.11", optional = true, default-features = false, features = [
bevy_app = { version = "0.12", default-features = false }
bevy_core = { version = "0.12", default-features = false }
bevy_ecs = { version = "0.12", default-features = false }
bevy_math = { version = "0.12", default-features = false }
bevy_reflect = { version = "0.12", default-features = false }
bevy_render = { version = "0.12", default-features = false }
bevy_text = { version = "0.12", optional = true, default-features = false, features = [
"default_font",
] }
bevy_ui = { version = "0.11", optional = true, default-features = false }
bevy_utils = { version = "0.11", default-features = false }
bevy_window = { version = "0.11", default-features = false }
bevy_ui = { version = "0.12", optional = true, default-features = false }
bevy_utils = { version = "0.12", default-features = false }
bevy_window = { version = "0.12", default-features = false }

bevy_eventlistener = "0.5"
bevy_egui = { optional = true, version = "0.21" }
bevy_rapier3d = { optional = true, version = "0.22" }
bevy_eventlistener = "0.6"
bevy_egui = { optional = true, version = "0.23" }
bevy_rapier3d = { optional = true, version = "0.23" }

# Local
bevy_picking_core = { path = "crates/bevy_picking_core", version = "0.16" }
bevy_picking_input = { path = "crates/bevy_picking_input", version = "0.16" }
bevy_picking_selection = { optional = true, path = "crates/bevy_picking_selection", version = "0.16" }
bevy_picking_highlight = { optional = true, path = "crates/bevy_picking_highlight", version = "0.16" }
bevy_picking_raycast = { optional = true, path = "backends/bevy_picking_raycast", version = "0.16" }
bevy_picking_ui = { optional = true, path = "backends/bevy_picking_ui", version = "0.16" }
bevy_picking_rapier = { optional = true, path = "backends/bevy_picking_rapier", version = "0.16" }
bevy_picking_sprite = { optional = true, path = "backends/bevy_picking_sprite", version = "0.16" }
bevy_picking_egui = { optional = true, path = "backends/bevy_picking_egui", version = "0.16" }
bevy_picking_core = { path = "crates/bevy_picking_core", version = "0.17" }
bevy_picking_input = { path = "crates/bevy_picking_input", version = "0.17" }
bevy_picking_selection = { optional = true, path = "crates/bevy_picking_selection", version = "0.17" }
bevy_picking_highlight = { optional = true, path = "crates/bevy_picking_highlight", version = "0.17" }
bevy_picking_raycast = { optional = true, path = "backends/bevy_picking_raycast", version = "0.17" }
bevy_picking_ui = { optional = true, path = "backends/bevy_picking_ui", version = "0.17" }
bevy_picking_rapier = { optional = true, path = "backends/bevy_picking_rapier", version = "0.17" }
bevy_picking_sprite = { optional = true, path = "backends/bevy_picking_sprite", version = "0.17" }
bevy_picking_egui = { optional = true, path = "backends/bevy_picking_egui", version = "0.17" }

[dev-dependencies]
bevy = { version = "0.11", default-features = false, features = [
bevy = { version = "0.12", default-features = false, features = [
"bevy_winit",
"x11",
"bevy_gltf",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ I intend to track the `main` branch of Bevy. PRs supporting this are welcome!

| bevy | bevy_mod_picking |
| ---- | ---------------- |
| 0.12 | 0.17 |
| 0.11 | 0.15, 0.16 |
| 0.10 | 0.12, 0.13, 0.14 |
| 0.9 | 0.10, 0.11 |
Expand Down
16 changes: 8 additions & 8 deletions backends/bevy_picking_egui/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_picking_egui"
version = "0.16.0"
version = "0.17.0"
edition = "2021"
authors = ["Aevyrie <[email protected]>"]
license = "MIT OR Apache-2.0"
Expand All @@ -13,15 +13,15 @@ resolver = "2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bevy_app = { version = "0.11", default-features = false }
bevy_ecs = { version = "0.11", default-features = false }
bevy_reflect = { version = "0.11", default-features = false }
bevy_render = { version = "0.11", default-features = false }
bevy_app = { version = "0.12", default-features = false }
bevy_ecs = { version = "0.12", default-features = false }
bevy_reflect = { version = "0.12", default-features = false }
bevy_render = { version = "0.12", default-features = false }

bevy_egui = "0.21"
bevy_egui = "0.23"
# Local
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.16" }
bevy_picking_selection = { path = "../../crates/bevy_picking_selection", optional = true, version = "0.16" }
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.17" }
bevy_picking_selection = { path = "../../crates/bevy_picking_selection", optional = true, version = "0.17" }

[features]
selection = ["bevy_picking_selection"]
Expand Down
22 changes: 11 additions & 11 deletions backends/bevy_picking_rapier/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_picking_rapier"
version = "0.16.0"
version = "0.17.0"
edition = "2021"
authors = ["Aevyrie <[email protected]>"]
license = "MIT OR Apache-2.0"
Expand All @@ -13,15 +13,15 @@ resolver = "2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bevy_app = { version = "0.11", default-features = false }
bevy_ecs = { version = "0.11", default-features = false }
bevy_math = { version = "0.11", default-features = false }
bevy_reflect = { version = "0.11", default-features = false }
bevy_render = { version = "0.11", default-features = false }
bevy_transform = { version = "0.11", default-features = false }
bevy_utils = { version = "0.11", default-features = false }
bevy_window = { version = "0.11", default-features = false }
bevy_app = { version = "0.12", default-features = false }
bevy_ecs = { version = "0.12", default-features = false }
bevy_math = { version = "0.12", default-features = false }
bevy_reflect = { version = "0.12", default-features = false }
bevy_render = { version = "0.12", default-features = false }
bevy_transform = { version = "0.12", default-features = false }
bevy_utils = { version = "0.12", default-features = false }
bevy_window = { version = "0.12", default-features = false }

bevy_rapier3d = "0.22"
bevy_rapier3d = "0.23"
# Local
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.16" }
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.17" }
18 changes: 9 additions & 9 deletions backends/bevy_picking_raycast/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_picking_raycast"
version = "0.16.0"
version = "0.17.0"
edition = "2021"
authors = ["Aevyrie <[email protected]>"]
license = "MIT OR Apache-2.0"
Expand All @@ -13,13 +13,13 @@ resolver = "2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bevy_app = { version = "0.11", default-features = false }
bevy_ecs = { version = "0.11", default-features = false }
bevy_reflect = { version = "0.11", default-features = false }
bevy_render = { version = "0.11", default-features = false }
bevy_transform = { version = "0.11", default-features = false }
bevy_window = { version = "0.11", default-features = false }
bevy_app = { version = "0.12", default-features = false }
bevy_ecs = { version = "0.12", default-features = false }
bevy_reflect = { version = "0.12", default-features = false }
bevy_render = { version = "0.12", default-features = false }
bevy_transform = { version = "0.12", default-features = false }
bevy_window = { version = "0.12", default-features = false }

bevy_mod_raycast = "0.15"
bevy_mod_raycast = "0.16"
# Local
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.16" }
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.17" }
20 changes: 10 additions & 10 deletions backends/bevy_picking_sprite/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_picking_sprite"
version = "0.16.0"
version = "0.17.0"
edition = "2021"
authors = ["Aevyrie <[email protected]>"]
license = "MIT OR Apache-2.0"
Expand All @@ -13,13 +13,13 @@ resolver = "2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bevy_app = { version = "0.11", default-features = false }
bevy_asset = { version = "0.11", default-features = false }
bevy_ecs = { version = "0.11", default-features = false }
bevy_math = { version = "0.11", default-features = false }
bevy_render = { version = "0.11", default-features = false }
bevy_sprite = { version = "0.11", default-features = false }
bevy_transform = { version = "0.11", default-features = false }
bevy_window = { version = "0.11", default-features = false }
bevy_app = { version = "0.12", default-features = false }
bevy_asset = { version = "0.12", default-features = false }
bevy_ecs = { version = "0.12", default-features = false }
bevy_math = { version = "0.12", default-features = false }
bevy_render = { version = "0.12", default-features = false }
bevy_sprite = { version = "0.12", default-features = false }
bevy_transform = { version = "0.12", default-features = false }
bevy_window = { version = "0.12", default-features = false }
# Local
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.16" }
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.17" }
6 changes: 3 additions & 3 deletions backends/bevy_picking_sprite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn sprite_picking(
(Option<&Handle<Image>>, Option<&Handle<TextureAtlas>>),
&GlobalTransform,
Option<&Pickable>,
&ComputedVisibility,
&ViewVisibility,
),
Or<(With<Sprite>, With<TextureAtlasSprite>)>,
>,
Expand Down Expand Up @@ -85,7 +85,7 @@ pub fn sprite_picking(
let picks: Vec<(Entity, HitData)> = sorted_sprites
.iter()
.copied()
.filter(|(.., visibility)| visibility.is_visible())
.filter(|(.., visibility)| visibility.get())
.filter_map(|(entity, sprite, image, sprite_transform, pickable, ..)| {
if blocked {
return None;
Expand All @@ -95,7 +95,7 @@ pub fn sprite_picking(
let (extents, anchor) = if let Some((sprite, image)) = sprite.0.zip(image.0) {
let extents = sprite
.custom_size
.or_else(|| images.get(image).map(|f| f.size()))?;
.or_else(|| images.get(image).map(|f| f.size().as_vec2()))?;
let anchor = sprite.anchor.as_vec();
(extents, anchor)
} else if let Some((sprite, atlas)) = sprite.1.zip(image.1) {
Expand Down
18 changes: 9 additions & 9 deletions backends/bevy_picking_ui/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_picking_ui"
version = "0.16.0"
version = "0.17.0"
edition = "2021"
authors = ["Aevyrie <[email protected]>"]
license = "MIT OR Apache-2.0"
Expand All @@ -13,12 +13,12 @@ resolver = "2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bevy_app = { version = "0.11", default-features = false }
bevy_ecs = { version = "0.11", default-features = false }
bevy_math = { version = "0.11", default-features = false }
bevy_render = { version = "0.11", default-features = false }
bevy_transform = { version = "0.11", default-features = false }
bevy_window = { version = "0.11", default-features = false }
bevy_ui = { version = "0.11", default-features = false }
bevy_app = { version = "0.12", default-features = false }
bevy_ecs = { version = "0.12", default-features = false }
bevy_math = { version = "0.12", default-features = false }
bevy_render = { version = "0.12", default-features = false }
bevy_transform = { version = "0.12", default-features = false }
bevy_window = { version = "0.12", default-features = false }
bevy_ui = { version = "0.12", default-features = false }
# Local
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.16" }
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.17" }
6 changes: 3 additions & 3 deletions backends/bevy_picking_ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub struct NodeQuery {
relative_cursor_position: Option<&'static mut RelativeCursorPosition>,
pickable: Option<&'static Pickable>,
calculated_clip: Option<&'static CalculatedClip>,
computed_visibility: Option<&'static ComputedVisibility>,
view_visibility: Option<&'static ViewVisibility>,
}

/// Computes the UI node entities under each pointer.
Expand Down Expand Up @@ -114,8 +114,8 @@ pub fn ui_picking(
.filter_map(|entity| {
if let Ok(node) = node_query.get_mut(*entity) {
// Nodes that are not rendered should not be interactable
if let Some(computed_visibility) = node.computed_visibility {
if !computed_visibility.is_visible() {
if let Some(view_visibility) = node.view_visibility {
if !view_visibility.get() {
return None;
}
}
Expand Down
20 changes: 10 additions & 10 deletions crates/bevy_picking_core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_picking_core"
version = "0.16.0"
version = "0.17.0"
edition = "2021"
authors = ["Aevyrie <[email protected]>"]
license = "MIT OR Apache-2.0"
Expand All @@ -13,13 +13,13 @@ resolver = "2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bevy_app = { version = "0.11", default-features = false }
bevy_derive = { version = "0.11", default-features = false }
bevy_ecs = { version = "0.11", default-features = false }
bevy_math = { version = "0.11", default-features = false }
bevy_reflect = { version = "0.11", default-features = false }
bevy_render = { version = "0.11", default-features = false }
bevy_utils = { version = "0.11", default-features = false }
bevy_window = { version = "0.11", default-features = false }
bevy_app = { version = "0.12", default-features = false }
bevy_derive = { version = "0.12", default-features = false }
bevy_ecs = { version = "0.12", default-features = false }
bevy_math = { version = "0.12", default-features = false }
bevy_reflect = { version = "0.12", default-features = false }
bevy_render = { version = "0.12", default-features = false }
bevy_utils = { version = "0.12", default-features = false }
bevy_window = { version = "0.12", default-features = false }

bevy_eventlistener = "0.5"
bevy_eventlistener = "0.6"
Loading