Skip to content

Commit

Permalink
Updated glam dependency to 0.25
Browse files Browse the repository at this point in the history
  • Loading branch information
urholaukkarinen committed Feb 1, 2024
1 parent d09ddbc commit bcc8378
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ members = ["demo"]

[dependencies]
egui = "0.25.0"
glam = { version = "0.24", features = ["mint"] }
glam = { version = "0.25.0", features = ["mint"] }
mint = "0.5"

[profile.release]
Expand Down
4 changes: 4 additions & 0 deletions demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ egui-gizmo = { path = ".." }
[dependencies.bevy]
version = "0.12.1"

[dependencies.bevy_math]
version = "0.12.1"
features = ["mint"]

[dependencies.bevy_egui]
git = "https://github.com/urholaukkarinen/bevy_egui.git"
rev="bc3dd1559e24ca0178ed1d2dfef07cb784437505"
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ impl Gizmo {

if let Some((_, result)) = active_subgizmo.zip(result) {
self.config.translation = Vec3::from(result.translation).as_dvec3();
self.config.rotation = Quat::from(result.rotation).as_f64();
self.config.rotation = Quat::from(result.rotation).as_dquat();
self.config.scale = Vec3::from(result.scale).as_dvec3();
}

Expand Down
2 changes: 1 addition & 1 deletion src/subgizmo/arcball.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl SubGizmo for ArcballSubGizmo {

Some(GizmoResult {
scale: self.config.scale.as_vec3().into(),
rotation: new_rotation.as_f32().into(),
rotation: new_rotation.as_quat().into(),
translation: self.config.translation.as_vec3().into(),
mode: GizmoMode::Rotate,
value: None,
Expand Down
2 changes: 1 addition & 1 deletion src/subgizmo/rotation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl SubGizmo for RotationSubGizmo {

Some(GizmoResult {
scale: self.config.scale.as_vec3().into(),
rotation: new_rotation.as_f32().into(),
rotation: new_rotation.as_quat().into(),
translation: self.config.translation.as_vec3().into(),
mode: GizmoMode::Rotate,
value: Some(
Expand Down
2 changes: 1 addition & 1 deletion src/subgizmo/scale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl SubGizmo for ScaleSubGizmo {

Some(GizmoResult {
scale: new_scale.as_vec3().into(),
rotation: self.config.rotation.as_f32().into(),
rotation: self.config.rotation.as_quat().into(),
translation: self.config.translation.as_vec3().into(),
mode: GizmoMode::Scale,
value: Some(offset.as_vec3().to_array()),
Expand Down
2 changes: 1 addition & 1 deletion src/subgizmo/translation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl SubGizmo for TranslationSubGizmo {

Some(GizmoResult {
scale: self.config.scale.as_vec3().into(),
rotation: self.config.rotation.as_f32().into(),
rotation: self.config.rotation.as_quat().into(),
translation: new_translation.as_vec3().into(),
mode: GizmoMode::Translate,
value: Some(state.current_delta.as_vec3().to_array()),
Expand Down

0 comments on commit bcc8378

Please sign in to comment.