diff --git a/crates/bevy_property/Cargo.toml b/crates/bevy_property/Cargo.toml index 937b23046d..7978469f40 100644 --- a/crates/bevy_property/Cargo.toml +++ b/crates/bevy_property/Cargo.toml @@ -11,4 +11,5 @@ bevy_property_derive = { path = "bevy_property_derive" } ron = { git = "https://github.com/ron-rs/ron", rev = "35355ba7eb495f07282162826c29873154c2fa14" } glam = { version = "0.8.7", features = ["serde"] } legion = { path = "../bevy_legion" } -smallvec = { version = "1.4", features = ["serde"] } \ No newline at end of file +smallvec = { version = "1.4", features = ["serde"] } +euclid = { git = "https://github.com/servo/euclid", rev = "1a8b95d46fa33978f7a6dcbb7a4c0f2a0550a1c9", features = ["serde"]} \ No newline at end of file diff --git a/crates/bevy_property/src/impl_property/impl_property_euclid.rs b/crates/bevy_property/src/impl_property/impl_property_euclid.rs new file mode 100644 index 0000000000..c12f95e9bc --- /dev/null +++ b/crates/bevy_property/src/impl_property/impl_property_euclid.rs @@ -0,0 +1,24 @@ +use crate::impl_property; +use euclid::*; +use serde::{Deserialize, Serialize}; + +impl_property!(Length where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Point2D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Point3D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Vector2D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Vector3D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(HomogeneousVector where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Size2D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Size3D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Rect where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Box2D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Box3D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(SideOffsets2D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Transform2D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Transform3D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Rotation2D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Rotation3D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Translation2D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Translation3D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(Scale where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); +impl_property!(RigidTransform3D where Self: Send + Sync + Clone + Serialize + for<'de> Deserialize<'de> +'static); diff --git a/crates/bevy_property/src/impl_property/mod.rs b/crates/bevy_property/src/impl_property/mod.rs index 5ba0bd251b..c23ff222ee 100644 --- a/crates/bevy_property/src/impl_property/mod.rs +++ b/crates/bevy_property/src/impl_property/mod.rs @@ -1,3 +1,4 @@ +mod impl_property_euclid; mod impl_property_glam; mod impl_property_legion; mod impl_property_smallvec;