diff --git a/Cargo.toml b/Cargo.toml index 9dd0d598..efb6dbfe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -143,6 +143,8 @@ glam-29 = ["firewheel-core/glam-29"] glam-30 = ["firewheel-core/glam-30"] # Enables `glam::Vec2` and `glam::Vec3` parameter derives for glam 0.31. glam-31 = ["firewheel-core/glam-31"] +# Enables `glam::Vec2` and `glam::Vec3` parameter derives for glam 0.32. +glam-32 = ["firewheel-core/glam-32"] # Enables the `MIDI` event type, using the `wmidi` crate. midi_events = ["firewheel-core/midi_events"] # Enables serde derives for types @@ -213,11 +215,11 @@ bitflags = "2" thunderdome = { version = "0.6", default-features = false } fast-interleave = "0.1" firewheel-macros = { path = "crates/firewheel-macros", version = "0.10.0" } -bevy_platform = { version = "0.18", default-features = false, features = [ +bevy_platform = { version = "0.19.0-dev", default-features = false, features = [ "alloc", ] } -bevy_ecs = { version = "0.18", default-features = false } -bevy_reflect = { version = "0.18", default-features = false } +bevy_ecs = { version = "0.19.0-dev", default-features = false } +bevy_reflect = { version = "0.19.0-dev", default-features = false } num-traits = { version = "0.2", default-features = false } serde = { version = "1", features = ["derive"] } egui = "0.33.3" @@ -250,3 +252,20 @@ criterion = "0.7" [[bench]] name = "core" harness = false + + +[patch."crates-io"] +firewheel = { git = "https://github.com/ChristopherBiscardi/Firewheel", branch = "chris-0.19" } +firewheel-ircam-hrtf = { git = "https://github.com/ChristopherBiscardi/firewheel-ircam-hrtf", branch = "chris-0.19" } +bevy_time = { git = "https://github.com/bevyengine/bevy" } +bevy_transform = { git = "https://github.com/bevyengine/bevy" } +bevy = { git = "https://github.com/bevyengine/bevy" } +bevy_app = { git = "https://github.com/bevyengine/bevy" } +bevy_asset = { git = "https://github.com/bevyengine/bevy" } +bevy_ecs = { git = "https://github.com/bevyengine/bevy" } +bevy_log = { git = "https://github.com/bevyengine/bevy" } +bevy_math = { git = "https://github.com/bevyengine/bevy" } +bevy_platform = { git = "https://github.com/bevyengine/bevy" } +bevy_reflect = { git = "https://github.com/bevyengine/bevy" } +bevy_macro_utils = { git = "https://github.com/bevyengine/bevy" } +rtgc = { git = "https://codeberg.org/chrisbiscardi/rtgc", branch = "chris-0.19" } diff --git a/crates/firewheel-core/Cargo.toml b/crates/firewheel-core/Cargo.toml index 6a426e31..8d1d78bd 100644 --- a/crates/firewheel-core/Cargo.toml +++ b/crates/firewheel-core/Cargo.toml @@ -47,6 +47,7 @@ std = [ "glam-29?/std", "glam-30?/std", "glam-31?/std", + "glam-32?/std", "portable-atomic/std", "num-traits/std", "thiserror/std", @@ -60,7 +61,8 @@ libm = [ "num-traits/libm", "glam-29?/nostd-libm", "glam-30?/nostd-libm", - "glam-31?/nostd-libm" + "glam-31?/nostd-libm", + "glam-32?/nostd-libm" ] # Enables scheduling events for audio nodes. # @@ -92,6 +94,8 @@ glam-29 = ["dep:glam-29"] glam-30 = ["dep:glam-30"] # Enables `glam::Vec2` and `glam::Vec3` parameter derives for glam 0.31. glam-31 = ["dep:glam-31"] +# Enables `glam::Vec2` and `glam::Vec3` parameter derives for glam 0.32. +glam-32 = ["dep:glam-32"] # Enables the `MIDI` event type, using the `wmidi` crate. midi_events = ["dep:wmidi"] # Enables serde derives for types @@ -112,6 +116,7 @@ bevy_reflect = { workspace = true, optional = true } glam-29 = { package = "glam", version = "0.29", default-features = false, optional = true } glam-30 = { package = "glam", version = "0.30", default-features = false, optional = true } glam-31 = { package = "glam", version = "0.31", default-features = false, optional = true } +glam-32 = { package = "glam", version = "0.32", default-features = false, optional = true } # TODO: Remove this once `bevy_platform` exposes the atomic float types from `portable-atomic`. portable-atomic = { version = "1", default-features = false, features = [ "fallback", diff --git a/crates/firewheel-core/src/diff/leaf.rs b/crates/firewheel-core/src/diff/leaf.rs index ae9fc7a3..aba173e6 100644 --- a/crates/firewheel-core/src/diff/leaf.rs +++ b/crates/firewheel-core/src/diff/leaf.rs @@ -150,6 +150,16 @@ primitive_diff!(glam_30::Vec2, Vector2D); #[cfg(feature = "glam-30")] primitive_diff!(glam_30::Vec3, Vector3D); +#[cfg(feature = "glam-31")] +primitive_diff!(glam_31::Vec2, Vector2D); +#[cfg(feature = "glam-31")] +primitive_diff!(glam_31::Vec3, Vector3D); + +#[cfg(feature = "glam-32")] +primitive_diff!(glam_32::Vec2, Vector2D); +#[cfg(feature = "glam-32")] +primitive_diff!(glam_32::Vec3, Vector3D); + impl Diff for ArcGc { fn diff(&self, baseline: &Self, path: PathBuilder, event_queue: &mut E) { if !ArcGc::ptr_eq(self, baseline) { @@ -483,3 +493,13 @@ trivial_notify!(glam_29::Vec3); trivial_notify!(glam_30::Vec2); #[cfg(feature = "glam-30")] trivial_notify!(glam_30::Vec3); + +#[cfg(feature = "glam-31")] +trivial_notify!(glam_31::Vec2); +#[cfg(feature = "glam-31")] +trivial_notify!(glam_31::Vec3); + +#[cfg(feature = "glam-32")] +trivial_notify!(glam_32::Vec2); +#[cfg(feature = "glam-32")] +trivial_notify!(glam_32::Vec3); \ No newline at end of file diff --git a/crates/firewheel-core/src/diff/notify.rs b/crates/firewheel-core/src/diff/notify.rs index 620b218b..d7de7363 100644 --- a/crates/firewheel-core/src/diff/notify.rs +++ b/crates/firewheel-core/src/diff/notify.rs @@ -231,7 +231,7 @@ mod reflect { bevy_reflect::utility::GenericTypeInfoCell::new(); CELL.get_or_insert::(|| { bevy_reflect::TypeInfo::Struct( - bevy_reflect::StructInfo::new::(&[ + bevy_reflect::structs::StructInfo::new::(&[ bevy_reflect::NamedField::new::("value").with_custom_attributes( bevy_reflect::attributes::CustomAttributes::default(), ), @@ -340,7 +340,7 @@ mod reflect { } } - impl bevy_reflect::Struct for Notify + impl bevy_reflect::prelude::Struct for Notify where Notify: ::core::any::Any + ::core::marker::Send + ::core::marker::Sync, T: Clone @@ -388,12 +388,12 @@ mod reflect { 1usize } - fn iter_fields<'a>(&'a self) -> bevy_reflect::FieldIter<'a> { - bevy_reflect::FieldIter::new(self) + fn iter_fields<'a>(&'a self) -> bevy_reflect::structs::FieldIter<'a> { + bevy_reflect::structs::FieldIter::new(self) } - fn to_dynamic_struct(&self) -> bevy_reflect::DynamicStruct { - let mut dynamic: bevy_reflect::DynamicStruct = Default::default(); + fn to_dynamic_struct(&self) -> bevy_reflect::structs::DynamicStruct { + let mut dynamic: bevy_reflect::structs::DynamicStruct = Default::default(); dynamic.set_represented_type(bevy_reflect::PartialReflect::get_represented_type_info( self, )); @@ -403,6 +403,10 @@ mod reflect { ); dynamic } + + fn index_of_name(&self, name: &str) -> Option { + todo!("index_of_name is a new function"); + } } impl bevy_reflect::PartialReflect for Notify @@ -427,11 +431,8 @@ mod reflect { if let bevy_reflect::ReflectRef::Struct(struct_value) = bevy_reflect::PartialReflect::reflect_ref(value) { - for (i, value) in ::core::iter::Iterator::enumerate( - bevy_reflect::Struct::iter_fields(struct_value), - ) { - let name = bevy_reflect::Struct::name_at(struct_value, i).unwrap(); - if let Some(v) = bevy_reflect::Struct::field_mut(self, name) { + for (name, value) in struct_value { + if let Some(v) = bevy_reflect::prelude::Struct::field_mut(self, name) { bevy_reflect::PartialReflect::try_apply(v, value)?; } } @@ -497,7 +498,7 @@ mod reflect { } fn reflect_partial_eq(&self, value: &dyn bevy_reflect::PartialReflect) -> Option { - (bevy_reflect::struct_partial_eq)(self, value) + (bevy_reflect::structs::struct_partial_eq)(self, value) } #[inline] @@ -524,9 +525,9 @@ mod reflect { { let mut this = ::default(); if let Some(field) = (|| { - ::from_reflect(bevy_reflect::Struct::field( - ref_struct, "value", - )?) + ::from_reflect( + bevy_reflect::prelude::Struct::field(ref_struct, "value")?, + ) })() { this.value = field; } diff --git a/crates/firewheel-core/src/event.rs b/crates/firewheel-core/src/event.rs index 6511163e..5c41a909 100644 --- a/crates/firewheel-core/src/event.rs +++ b/crates/firewheel-core/src/event.rs @@ -323,6 +323,16 @@ param_data_from!(glam_30::Vec2, Vector2D); #[cfg(feature = "glam-30")] param_data_from!(glam_30::Vec3, Vector3D); +#[cfg(feature = "glam-31")] +param_data_from!(glam_31::Vec2, Vector2D); +#[cfg(feature = "glam-31")] +param_data_from!(glam_31::Vec3, Vector3D); + +#[cfg(feature = "glam-32")] +param_data_from!(glam_32::Vec2, Vector2D); +#[cfg(feature = "glam-32")] +param_data_from!(glam_32::Vec3, Vector3D); + impl From<()> for ParamData { fn from(_value: ()) -> Self { Self::None diff --git a/crates/firewheel-core/src/vector.rs b/crates/firewheel-core/src/vector.rs index c06ddda7..61f4393a 100644 --- a/crates/firewheel-core/src/vector.rs +++ b/crates/firewheel-core/src/vector.rs @@ -166,3 +166,31 @@ impl From for glam_31::Vec3 { Self::new(value.x, value.y, value.z) } } + +#[cfg(feature = "glam-32")] +impl From for Vec2 { + fn from(value: glam_32::Vec2) -> Self { + Self::new(value.x, value.y) + } +} + +#[cfg(feature = "glam-32")] +impl From for Vec3 { + fn from(value: glam_32::Vec3) -> Self { + Self::new(value.x, value.y, value.z) + } +} + +#[cfg(feature = "glam-32")] +impl From for glam_32::Vec2 { + fn from(value: Vec2) -> Self { + Self::new(value.x, value.y) + } +} + +#[cfg(feature = "glam-32")] +impl From for glam_32::Vec3 { + fn from(value: Vec3) -> Self { + Self::new(value.x, value.y, value.z) + } +} \ No newline at end of file diff --git a/crates/firewheel-macros/Cargo.toml b/crates/firewheel-macros/Cargo.toml index 03075b9f..0ede6b71 100644 --- a/crates/firewheel-macros/Cargo.toml +++ b/crates/firewheel-macros/Cargo.toml @@ -18,5 +18,5 @@ proc-macro = true syn = "2.0" quote = "1.0" proc-macro2 = "1.0" -bevy_macro_utils = "0.18" +bevy_macro_utils = "0.19.0-dev" toml_edit = { version = "0.23.9", default-features = false, features = ["parse"] }