Skip to content

Commit

Permalink
Glam 0.28 update - adopted (bevyengine#14613)
Browse files Browse the repository at this point in the history
Basically it's bevyengine#13792 with the
bumped versions of `encase` and `hexasphere`.

---------

Co-authored-by: Robert Swain <[email protected]>
Co-authored-by: Alice Cecile <[email protected]>
  • Loading branch information
3 people authored Aug 6, 2024
1 parent 039bf90 commit 70a18d2
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish = false
license = "MIT OR Apache-2.0"

[dev-dependencies]
glam = "0.27"
glam = "0.28"
rand = "0.8"
rand_chacha = "0.3"
criterion = { version = "0.3", features = ["html_reports"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_color/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bytemuck = { version = "1", features = ["derive"] }
serde = { version = "1.0", features = ["derive"], optional = true }
thiserror = "1.0"
wgpu-types = { version = "0.20", default-features = false, optional = true }
encase = { version = "0.8", default-features = false }
encase = { version = "0.9", default-features = false }

[features]
default = ["bevy_reflect"]
Expand Down
5 changes: 2 additions & 3 deletions crates/bevy_math/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords = ["bevy"]
rust-version = "1.68.2"

[dependencies]
glam = { version = "0.27", features = ["bytemuck"] }
glam = { version = "0.28", features = ["bytemuck"] }
thiserror = "1.0"
itertools = "0.13.0"
serde = { version = "1", features = ["derive"], optional = true }
Expand All @@ -33,8 +33,7 @@ rand = "0.8"
rand_chacha = "0.3"
# Enable the approx feature when testing.
bevy_math = { path = ".", version = "0.15.0-dev", features = ["approx"] }
glam = { version = "0.27", features = ["approx"] }

glam = { version = "0.28", features = ["approx"] }

[features]
default = ["rand", "bevy_reflect"]
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_math/src/direction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl Dir2 {
/// ```
#[inline]
pub fn slerp(self, rhs: Self, s: f32) -> Self {
let angle = self.angle_between(rhs.0);
let angle = self.angle_to(rhs.0);
Rot2::radians(angle * s) * self
}

Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_mikktspace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ keywords = ["bevy", "3D", "graphics", "algorithm", "tangent"]
rust-version = "1.76.0"

[dependencies]
glam = "0.27"
glam = "0.28"

[[example]]
name = "generate"
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_pbr/src/cluster/assign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ pub(crate) fn assign_objects_to_clusters(
// as they often assume that the widest part of the sphere under projection is the
// center point on the axis of interest plus the radius, and that is not true!
let view_clusterable_object_sphere = Sphere {
center: Vec3A::from(
center: Vec3A::from_vec4(
view_from_world * clusterable_object_sphere.center.extend(1.0),
),
radius: clusterable_object_sphere.radius * view_from_world_scale_max,
Expand Down Expand Up @@ -798,7 +798,7 @@ fn cluster_space_clusterable_object_aabb(
clusterable_object_sphere: &Sphere,
) -> (Vec3, Vec3) {
let clusterable_object_aabb_view = Aabb {
center: Vec3A::from(view_from_world * clusterable_object_sphere.center.extend(1.0)),
center: Vec3A::from_vec4(view_from_world * clusterable_object_sphere.center.extend(1.0)),
half_extents: Vec3A::from(clusterable_object_sphere.radius * view_from_world_scale.abs()),
};
let (mut clusterable_object_aabb_view_min, mut clusterable_object_aabb_view_max) = (
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_reflect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ thiserror = "1.0"
serde = "1"
smallvec = { version = "1.11", optional = true }

glam = { version = "0.27", features = ["serde"], optional = true }
glam = { version = "0.28", features = ["serde"], optional = true }
petgraph = { version = "0.6", features = ["serde-1"], optional = true }
smol_str = { version = "0.2.0", optional = true }
uuid = { version = "1.0", optional = true, features = ["v4", "serde"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_render/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ bytemuck = { version = "1.5", features = ["derive", "must_cast"] }
downcast-rs = "1.2.0"
thiserror = "1.0"
futures-lite = "2.0.1"
hexasphere = "12.0"
hexasphere = "14.0"
ddsfile = { version = "0.5.2", optional = true }
ktx2 = { version = "0.3.0", optional = true }
# For ktx2 supercompression
flate2 = { version = "1.0.22", optional = true }
ruzstd = { version = "0.7.0", optional = true }
# For transcoding of UASTC/ETC1S universal formats, and for .basis file support
basis-universal = { version = "0.3.0", optional = true }
encase = { version = "0.8", features = ["glam"] }
encase = { version = "0.9", features = ["glam"] }
# For wgpu profiling using tracing. Use `RUST_LOG=info` to also capture the wgpu spans.
profiling = { version = "1", features = [
"profile-with-tracing",
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/src/primitives/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl HalfSpace {
/// Returns the unit normal vector of the bisecting plane that characterizes the `HalfSpace`.
#[inline]
pub fn normal(&self) -> Vec3A {
Vec3A::from(self.normal_d)
Vec3A::from_vec4(self.normal_d)
}

/// Returns the signed distance from the bisecting plane to the origin along
Expand Down

0 comments on commit 70a18d2

Please sign in to comment.