chore(workspace): centralize shared deps and unify glam to 0.33
This commit is contained in:
parent
9a3224d102
commit
e940cf560e
24
Cargo.lock
generated
24
Cargo.lock
generated
|
|
@ -444,7 +444,7 @@ version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"ash-window",
|
"ash-window",
|
||||||
"glam 0.29.3",
|
"glam 0.33.2",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
"renderer",
|
"renderer",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
|
@ -816,24 +816,18 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "glam"
|
name = "glam"
|
||||||
version = "0.27.0"
|
version = "0.32.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9e05e7e6723e3455f4818c7b26e855439f7546cf617ef669d1adedb8669e5cb9"
|
checksum = "f70749695b063ecbf6b62949ccccde2e733ec3ecbbd71d467dca4e5c6c97cca0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde_core",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "glam"
|
name = "glam"
|
||||||
version = "0.29.3"
|
version = "0.33.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8babf46d4c1c9d92deac9f7be466f76dfc4482b6452fc5024b5e8daf6ffeb3ee"
|
checksum = "7f22fb22f065b308be0d8724e3706c7fa3fc2a6c7d6899df4cad7860e7a75436"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "glam"
|
|
||||||
version = "0.32.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f70749695b063ecbf6b62949ccccde2e733ec3ecbbd71d467dca4e5c6c97cca0"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_core",
|
"serde_core",
|
||||||
]
|
]
|
||||||
|
|
@ -1649,7 +1643,7 @@ dependencies = [
|
||||||
"ash",
|
"ash",
|
||||||
"ash-window",
|
"ash-window",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"glam 0.29.3",
|
"glam 0.33.2",
|
||||||
"gpu-allocator",
|
"gpu-allocator",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
"thiserror 2.0.18",
|
"thiserror 2.0.18",
|
||||||
|
|
@ -1784,7 +1778,7 @@ version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy_ecs",
|
"bevy_ecs",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"glam 0.27.0",
|
"glam 0.33.2",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"shared",
|
"shared",
|
||||||
"tracing",
|
"tracing",
|
||||||
|
|
@ -1806,7 +1800,7 @@ version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"fastrand",
|
"fastrand",
|
||||||
"glam 0.27.0",
|
"glam 0.33.2",
|
||||||
"noise",
|
"noise",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
10
Cargo.toml
10
Cargo.toml
|
|
@ -9,6 +9,16 @@ authors = ["Cryoforge Nexus"]
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
||||||
|
# Dependencies used by more than one crate are pinned once here so a version can never drift between crates.
|
||||||
|
[workspace.dependencies]
|
||||||
|
glam = { version = "0.33", features = ["serde"] }
|
||||||
|
bytemuck = { version = "1.21", features = ["derive"] }
|
||||||
|
tracing = "0.1.44"
|
||||||
|
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }
|
||||||
|
serde_json = "1.0.149"
|
||||||
|
ash-window = "0.13.0"
|
||||||
|
raw-window-handle = "0.6.2"
|
||||||
|
|
||||||
[workspace.lints.rust]
|
[workspace.lints.rust]
|
||||||
unsafe_code = "warn"
|
unsafe_code = "warn"
|
||||||
missing_docs = "warn"
|
missing_docs = "warn"
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,12 @@ workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.102"
|
anyhow = "1.0.102"
|
||||||
tracing = "0.1.44"
|
tracing = { workspace = true }
|
||||||
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }
|
tracing-subscriber = { workspace = true }
|
||||||
winit = "0.30.13"
|
winit = "0.30.13"
|
||||||
renderer = { path = "../renderer" }
|
renderer = { path = "../renderer" }
|
||||||
glam = "0.29"
|
glam = { workspace = true }
|
||||||
raw-window-handle = "0.6.2"
|
raw-window-handle = { workspace = true }
|
||||||
ash-window = "0.13.0"
|
ash-window = { workspace = true }
|
||||||
serde_json = "1.0.149"
|
serde_json = { workspace = true }
|
||||||
shared = { version = "0.1.0", path = "../shared" }
|
shared = { version = "0.1.0", path = "../shared" }
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ impl Camera {
|
||||||
/// Builds the right-handed view matrix for the current position and orientation.
|
/// Builds the right-handed view matrix for the current position and orientation.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn view_matrix(&self) -> Mat4 {
|
pub fn view_matrix(&self) -> Mat4 {
|
||||||
Mat4::look_at_rh(self.position, self.position + self.forward(), Vec3::Y)
|
glam::camera::rh::view::look_at_mat4(self.position, self.position + self.forward(), Vec3::Y)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Advances the camera by a single frame, applying `input` accumulated over `dt` seconds.
|
/// Advances the camera by a single frame, applying `input` accumulated over `dt` seconds.
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,10 @@ workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ash = "0.38.0"
|
ash = "0.38.0"
|
||||||
ash-window = "0.13.0"
|
ash-window = { workspace = true }
|
||||||
raw-window-handle = "0.6.2"
|
raw-window-handle = { workspace = true }
|
||||||
thiserror = "2.0.18"
|
thiserror = "2.0.18"
|
||||||
tracing = "0.1.44"
|
tracing = { workspace = true }
|
||||||
gpu-allocator = "0.28.0"
|
gpu-allocator = "0.28.0"
|
||||||
bytemuck = { version = "1.21", features = ["derive"] }
|
bytemuck = { workspace = true }
|
||||||
glam = "0.29"
|
glam = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -286,11 +286,14 @@ impl Renderer {
|
||||||
|
|
||||||
let aspect =
|
let aspect =
|
||||||
f64::from(self.swapchain_extent.width) / f64::from(self.swapchain_extent.height);
|
f64::from(self.swapchain_extent.width) / f64::from(self.swapchain_extent.height);
|
||||||
|
|
||||||
#[expect(clippy::cast_possible_truncation)]
|
#[expect(clippy::cast_possible_truncation)]
|
||||||
let mut projection =
|
let projection = glam::camera::rh::proj::vulkan::perspective(
|
||||||
glam::Mat4::perspective_rh(45.0_f32.to_radians(), aspect as f32, 0.1, 500.0);
|
45.0_f32.to_radians(),
|
||||||
// Vulkan clip space inverts the Y axis relative to the OpenGL convention glam targets.
|
aspect as f32,
|
||||||
projection.col_mut(1).y *= -1.0;
|
0.1,
|
||||||
|
500.0,
|
||||||
|
);
|
||||||
|
|
||||||
// The view matrix is supplied by the caller (the client's camera); the renderer owns only the projection, which depends on the swapchain aspect ratio it manages.
|
// The view matrix is supplied by the caller (the client's camera); the renderer owns only the projection, which depends on the swapchain aspect ratio it manages.
|
||||||
let mvp = projection * camera_view;
|
let mvp = projection * camera_view;
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ workspace = true
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy_ecs = "0.19"
|
bevy_ecs = "0.19"
|
||||||
crossbeam-channel = "0.5.16"
|
crossbeam-channel = "0.5.16"
|
||||||
glam = "0.27"
|
glam = { workspace = true }
|
||||||
serde_json = "1.0.149"
|
serde_json = { workspace = true }
|
||||||
shared = { version = "0.1.0", path = "../shared" }
|
shared = { version = "0.1.0", path = "../shared" }
|
||||||
tracing = "0.1.44"
|
tracing = { workspace = true }
|
||||||
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }
|
tracing-subscriber = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ authors.workspace = true
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bytemuck = { version = "1.15", features = ["derive"] }
|
bytemuck = { workspace = true }
|
||||||
fastrand = "2.4.1"
|
fastrand = "2.4.1"
|
||||||
glam = { version = "0.27", features = ["serde"] }
|
glam = { workspace = true }
|
||||||
noise = "0.9"
|
noise = "0.9"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue