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

V0.20 release #345

Merged
merged 4 commits into from
Jul 6, 2024
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.20.0

- Updated for Bevy `0.14.0`.

# 0.19.0

## Fixes:
Expand Down
72 changes: 32 additions & 40 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_mod_picking"
version = "0.19.1"
version = "0.20.0"
authors = ["Aevyrie <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand All @@ -9,49 +9,51 @@ repository = "https://github.com/aevyrie/bevy_mod_picking/"
keywords = ["gamedev", "picking", "bevy", "input", "eventlistener"]
categories = ["game-engines", "rendering"]
resolver = "2"
rust-version = "1.76.0"
rust-version = "1.79.0"

[package.metadata.docs.rs]
all-features = true


[workspace]
members = ["crates/*", "backends/*"]

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

# Optional
bevy_color = { version = "0.14.0", optional = true, default-features = false }
bevy_ui = { version = "0.14.0", optional = true, default-features = false }

bevy_eventlistener = "0.7"
bevy_egui = { optional = true, version = ">=0.25, <=0.27" }
bevy_rapier3d = { optional = true, version = ">=0.25, <=0.26" }
bevy_xpbd_3d = { optional = true, version = "0.4" }
bevy_eventlistener = "0.8.0"
bevy_egui = { optional = true, version = "0.28.0" } # >=0.28, <=0.XX
bevy_rapier3d = { optional = true, version = "0.27.0-rc.1" }
bevy_xpbd_3d = { optional = true, version = "0.5.0" }

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

[dev-dependencies]
bevy = { version = "0.13", default-features = false, features = [
bevy = { version = "0.14.0", default-features = false, features = [
"bevy_winit",
"x11",
"bevy_gltf",
Expand Down Expand Up @@ -94,7 +96,7 @@ debug = ["bevy_text", "bevy_ui/bevy_text", "bevy_core_pipeline"]
backend_raycast = ["bevy_picking_raycast"]
backend_rapier = ["bevy_picking_rapier", "bevy_rapier3d"]
backend_sprite = ["bevy_picking_sprite", "bevy_picking_highlight/sprite"]
backend_bevy_ui = ["bevy_picking_ui", "bevy_ui"]
backend_bevy_ui = ["bevy_picking_ui", "bevy_ui", "bevy_color"]
backend_egui = ["bevy_picking_egui", "bevy_egui"]
backend_xpbd = ["bevy_picking_xpbd", "bevy_xpbd_3d"]

Expand All @@ -113,16 +115,6 @@ name = "event_listener"
path = "examples/event_listener.rs"
required-features = ["backend_egui"]

[[example]]
name = "multiple_windows"
path = "examples/multiple_windows.rs"
required-features = ["backend_egui"]

[[example]]
name = "virtual_pointer"
path = "examples/virtual_pointer.rs"
required-features = ["backend_egui"]

[[example]]
name = "render_to_texture"
path = "examples/render_to_texture.rs"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ To learn more, [read the docs](https://docs.rs/bevy_mod_picking/latest/bevy_mod_

| bevy | bevy_mod_picking |
| ---- | ---------------- |
| 0.14 | 0.20 |
| 0.13 | 0.18, 0.19 |
| 0.12 | 0.17 |
| 0.11 | 0.15, 0.16 |
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.19.2"
version = "0.20.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.13", default-features = false }
bevy_ecs = { version = "0.13", default-features = false }
bevy_reflect = { version = "0.13", default-features = false }
bevy_render = { version = "0.13", default-features = false }
bevy_app = { version = "0.14.0", default-features = false }
bevy_ecs = { version = "0.14.0", default-features = false }
bevy_reflect = { version = "0.14.0", default-features = false }
bevy_render = { version = "0.14.0", default-features = false }

bevy_egui = ">=0.25, <= 0.27"
bevy_egui = "0.28"
# Local
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.19" }
bevy_picking_selection = { path = "../../crates/bevy_picking_selection", optional = true, version = "0.19" }
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.20.0" }
bevy_picking_selection = { path = "../../crates/bevy_picking_selection", optional = true, version = "0.20.0" }

[features]
selection = ["bevy_picking_selection"]
Expand Down
18 changes: 9 additions & 9 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.19.1"
version = "0.20.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.13", default-features = false }
bevy_ecs = { version = "0.13", default-features = false }
bevy_reflect = { version = "0.13", default-features = false }
bevy_render = { version = "0.13", default-features = false }
bevy_transform = { version = "0.13", default-features = false }
bevy_window = { version = "0.13", default-features = false }
bevy_app = { version = "0.14.0", default-features = false }
bevy_ecs = { version = "0.14.0", default-features = false }
bevy_reflect = { version = "0.14.0", default-features = false }
bevy_render = { version = "0.14.0", default-features = false }
bevy_transform = { version = "0.14.0", default-features = false }
bevy_window = { version = "0.14.0", default-features = false }

bevy_rapier3d = "0.25"
bevy_rapier3d = "0.27.0-rc.0"
# Local
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.19" }
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.20.0" }
14 changes: 9 additions & 5 deletions backends/bevy_picking_rapier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ pub fn update_hits(
continue;
}

let cam_layers = cam_layers.copied().unwrap_or_default();
let cam_layers = cam_layers.to_owned().unwrap_or_default();

let predicate = |entity| {
let marker_requirement =
!backend_settings.require_markers || marked_targets.get(entity).is_ok();

// Other entities missing render layers are on the default layer 0
let entity_layers = layers.get(entity).copied().unwrap_or_default();
let render_layers_match = cam_layers.intersects(&entity_layers);
let entity_layers = layers.get(entity).to_owned().unwrap_or_default();
let render_layers_match = cam_layers.intersects(entity_layers);

let is_pickable = pickables
.get(entity)
Expand All @@ -119,8 +119,12 @@ pub fn update_hits(
QueryFilter::new().predicate(&predicate),
)
.map(|(entity, hit)| {
let hit_data =
HitData::new(ray_id.camera, hit.toi, Some(hit.point), Some(hit.normal));
let hit_data = HitData::new(
ray_id.camera,
hit.time_of_impact,
Some(hit.point),
Some(hit.normal),
);
(entity, hit_data)
})
{
Expand Down
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.19.1"
version = "0.20.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.13", default-features = false }
bevy_ecs = { version = "0.13", default-features = false }
bevy_reflect = { version = "0.13", default-features = false }
bevy_render = { version = "0.13", default-features = false }
bevy_transform = { version = "0.13", default-features = false }
bevy_window = { version = "0.13", default-features = false }
bevy_app = { version = "0.14.0", default-features = false }
bevy_ecs = { version = "0.14.0", default-features = false }
bevy_reflect = { version = "0.14.0", default-features = false }
bevy_render = { version = "0.14.0", default-features = false }
bevy_transform = { version = "0.14.0", default-features = false }
bevy_window = { version = "0.14.0", default-features = false }

bevy_mod_raycast = { version = "0.17.0" }
bevy_mod_raycast = { version = "0.18" }
# Local
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.19" }
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.20.0" }
4 changes: 2 additions & 2 deletions backends/bevy_picking_raycast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub fn update_hits(
continue;
}

let cam_layers = cam_layers.copied().unwrap_or_default();
let cam_layers = cam_layers.to_owned().unwrap_or_default();

let settings = RaycastSettings {
visibility: backend_settings.raycast_visibility,
Expand All @@ -99,7 +99,7 @@ pub fn update_hits(
!backend_settings.require_markers || marked_targets.get(entity).is_ok();

// Other entities missing render layers are on the default layer 0
let entity_layers = layers.get(entity).copied().unwrap_or_default();
let entity_layers = layers.get(entity).cloned().unwrap_or_default();
let render_layers_match = cam_layers.intersects(&entity_layers);

let is_pickable = pickables
Expand Down
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.19.1"
version = "0.20.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.13", default-features = false }
bevy_asset = { version = "0.13", default-features = false }
bevy_ecs = { version = "0.13", default-features = false }
bevy_math = { version = "0.13", default-features = false }
bevy_render = { version = "0.13", default-features = false }
bevy_sprite = { version = "0.13", default-features = false }
bevy_transform = { version = "0.13", default-features = false }
bevy_window = { version = "0.13", default-features = false }
bevy_app = { version = "0.14.0", default-features = false }
bevy_asset = { version = "0.14.0", default-features = false }
bevy_ecs = { version = "0.14.0", default-features = false }
bevy_math = { version = "0.14.0", default-features = false }
bevy_render = { version = "0.14.0", default-features = false }
bevy_sprite = { version = "0.14.0", default-features = false }
bevy_transform = { version = "0.14.0", default-features = false }
bevy_window = { version = "0.14.0", default-features = false }
# Local
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.19" }
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.20.0" }
2 changes: 1 addition & 1 deletion backends/bevy_picking_sprite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pub fn sprite_picking(
let extents = sprite.custom_size.or_else(|| {
texture_atlas_layout
.get(&atlas.layout)
.map(|f| f.textures[atlas.index].size())
.map(|f| f.textures[atlas.index].size().as_vec2())
})?;
let anchor = sprite.anchor.as_vec();
(extents, anchor)
Expand Down
22 changes: 11 additions & 11 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.19.1"
version = "0.20.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.13", default-features = false }
bevy_ecs = { version = "0.13", default-features = false }
bevy_hierarchy = { version = "0.13", default-features = false }
bevy_render = { version = "0.13", default-features = false }
bevy_transform = { version = "0.13", default-features = false }
bevy_window = { version = "0.13", default-features = false }
bevy_ui = { version = "0.13", default-features = false }
bevy_utils = { version = "0.13", default-features = false }
bevy_math = { version = "0.13", default-features = false }
bevy_app = { version = "0.14.0", default-features = false }
bevy_ecs = { version = "0.14.0", default-features = false }
bevy_hierarchy = { version = "0.14.0", default-features = false }
bevy_render = { version = "0.14.0", default-features = false }
bevy_transform = { version = "0.14.0", default-features = false }
bevy_window = { version = "0.14.0", default-features = false }
bevy_ui = { version = "0.14.0", default-features = false }
bevy_utils = { version = "0.14.0", default-features = false }
bevy_math = { version = "0.14.0", default-features = false }

# Local
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.19" }
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.20.0" }
22 changes: 11 additions & 11 deletions backends/bevy_picking_xpbd/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_picking_xpbd"
version = "0.19.1"
version = "0.20.0"
edition = "2021"
authors = ["Aevyrie <[email protected]>, Affinator"]
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.13", default-features = false }
bevy_ecs = { version = "0.13", default-features = false }
bevy_math = { version = "0.13", default-features = false }
bevy_reflect = { version = "0.13", default-features = false }
bevy_render = { version = "0.13", default-features = false }
bevy_transform = { version = "0.13", default-features = false }
bevy_utils = { version = "0.13", default-features = false }
bevy_window = { version = "0.13", default-features = false }
bevy_app = { version = "0.14.0", default-features = false }
bevy_ecs = { version = "0.14.0", default-features = false }
bevy_math = { version = "0.14.0", default-features = false }
bevy_reflect = { version = "0.14.0", default-features = false }
bevy_render = { version = "0.14.0", default-features = false }
bevy_transform = { version = "0.14.0", default-features = false }
bevy_utils = { version = "0.14.0", default-features = false }
bevy_window = { version = "0.14.0", default-features = false }

bevy_xpbd_3d = "0.4"
bevy_xpbd_3d = "0.5"
# Local
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.19" }
bevy_picking_core = { path = "../../crates/bevy_picking_core", version = "0.20.0" }
Loading
Loading