Update glam (0.15.1) and hexasphere (3.4) (#2199)

This is a version of #2195 which addresses the `glam` breaking changes.
Also update hexasphere to ensure versions of `glam` are matching
This commit is contained in:
Nathan Ward 2021-05-18 18:56:15 +00:00
parent 2fcac67712
commit 4563e69e06
6 changed files with 6 additions and 6 deletions

View File

@ -214,7 +214,7 @@ async fn load_gltf<'a, 'b>(
scale, scale,
} => Transform { } => Transform {
translation: bevy_math::Vec3::from(translation), translation: bevy_math::Vec3::from(translation),
rotation: bevy_math::Quat::from(rotation), rotation: bevy_math::Quat::from_vec4(rotation.into()),
scale: bevy_math::Vec3::from(scale), scale: bevy_math::Vec3::from(scale),
}, },
}, },

View File

@ -13,5 +13,5 @@ license = "MIT"
keywords = ["bevy"] keywords = ["bevy"]
[dependencies] [dependencies]
glam = { version = "0.14.0", features = ["serde", "bytemuck"] } glam = { version = "0.15.1", features = ["serde", "bytemuck"] }
bevy_reflect = { path = "../bevy_reflect", version = "0.5.0", features = ["bevy"] } bevy_reflect = { path = "../bevy_reflect", version = "0.5.0", features = ["bevy"] }

View File

@ -28,7 +28,7 @@ parking_lot = "0.11.0"
thiserror = "1.0" thiserror = "1.0"
serde = "1" serde = "1"
smallvec = { version = "1.6", features = ["serde", "union", "const_generics"], optional = true } smallvec = { version = "1.6", features = ["serde", "union", "const_generics"], optional = true }
glam = { version = "0.14.0", features = ["serde"], optional = true } glam = { version = "0.15.1", features = ["serde"], optional = true }
[dev-dependencies] [dev-dependencies]
ron = "0.6.2" ron = "0.6.2"

View File

@ -37,7 +37,7 @@ downcast-rs = "1.2.0"
thiserror = "1.0" thiserror = "1.0"
anyhow = "1.0" anyhow = "1.0"
hex = "0.4.2" hex = "0.4.2"
hexasphere = "3.3" hexasphere = "3.4"
parking_lot = "0.11.0" parking_lot = "0.11.0"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]

View File

@ -207,7 +207,7 @@ impl GlobalTransform {
let forward = Vec3::normalize(self.translation - target); let forward = Vec3::normalize(self.translation - target);
let right = up.cross(forward).normalize(); let right = up.cross(forward).normalize();
let up = forward.cross(right); let up = forward.cross(right);
self.rotation = Quat::from_rotation_mat3(&Mat3::from_cols(right, up, forward)); self.rotation = Quat::from_mat3(&Mat3::from_cols(right, up, forward));
} }
} }

View File

@ -221,7 +221,7 @@ impl Transform {
let forward = Vec3::normalize(self.translation - target); let forward = Vec3::normalize(self.translation - target);
let right = up.cross(forward).normalize(); let right = up.cross(forward).normalize();
let up = forward.cross(right); let up = forward.cross(right);
self.rotation = Quat::from_rotation_mat3(&Mat3::from_cols(right, up, forward)); self.rotation = Quat::from_mat3(&Mat3::from_cols(right, up, forward));
} }
} }