diff options
| -rw-r--r-- | crates/rapier_testbed2d-f64/Cargo.toml | 16 | ||||
| -rw-r--r-- | crates/rapier_testbed2d/Cargo.toml | 16 | ||||
| -rw-r--r-- | crates/rapier_testbed3d-f64/Cargo.toml | 16 | ||||
| -rw-r--r-- | crates/rapier_testbed3d/Cargo.toml | 18 | ||||
| -rw-r--r-- | src_testbed/mouse.rs | 2 | ||||
| -rw-r--r-- | src_testbed/objects/node.rs | 11 | ||||
| -rw-r--r-- | src_testbed/testbed.rs | 4 |
7 files changed, 42 insertions, 41 deletions
diff --git a/crates/rapier_testbed2d-f64/Cargo.toml b/crates/rapier_testbed2d-f64/Cargo.toml index 6eedda9..04077ea 100644 --- a/crates/rapier_testbed2d-f64/Cargo.toml +++ b/crates/rapier_testbed2d-f64/Cargo.toml @@ -39,7 +39,7 @@ other-backends = ["wrapped2d"] features = ["parallel", "other-backends"] [dependencies] -nalgebra = { version = "0.33", features = ["rand", "glam025"] } +nalgebra = { version = "0.33", features = ["rand", "glam027"] } rand = "0.8" rand_pcg = "0.3" instant = { version = "0.1", features = ["web-sys", "now"] } @@ -51,16 +51,16 @@ bincode = "1" Inflector = "0.11" md5 = "0.7" -bevy_egui = "0.26" -bevy_ecs = "0.13" -bevy_core_pipeline = "0.13" -bevy_pbr = "0.13" -bevy_sprite = "0.13" +bevy_egui = "0.29" +bevy_ecs = "0.14" +bevy_core_pipeline = "0.14" +bevy_pbr = "0.14" +bevy_sprite = "0.14" #bevy_prototype_debug_lines = "0.7" # Dependencies for native only. [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -bevy = { version = "0.13", default-features = false, features = [ +bevy = { version = "0.14", default-features = false, features = [ "bevy_asset", "bevy_winit", "x11", @@ -74,7 +74,7 @@ bevy = { version = "0.13", default-features = false, features = [ # Dependencies for WASM only. [target.'cfg(target_arch = "wasm32")'.dependencies] -bevy = { version = "0.13", default-features = false, features = [ +bevy = { version = "0.14", default-features = false, features = [ "bevy_asset", "bevy_winit", "tonemapping_luts", diff --git a/crates/rapier_testbed2d/Cargo.toml b/crates/rapier_testbed2d/Cargo.toml index 6283b95..34028ba 100644 --- a/crates/rapier_testbed2d/Cargo.toml +++ b/crates/rapier_testbed2d/Cargo.toml @@ -39,7 +39,7 @@ other-backends = ["wrapped2d"] features = ["parallel", "other-backends"] [dependencies] -nalgebra = { version = "0.33", features = ["rand", "glam025"] } +nalgebra = { version = "0.33", features = ["rand", "glam027"] } rand = "0.8" rand_pcg = "0.3" instant = { version = "0.1", features = ["web-sys", "now"] } @@ -51,16 +51,16 @@ bincode = "1" Inflector = "0.11" md5 = "0.7" -bevy_egui = "0.26" -bevy_ecs = "0.13" -bevy_core_pipeline = "0.13" -bevy_pbr = "0.13" -bevy_sprite = "0.13" +bevy_egui = "0.29" +bevy_ecs = "0.14" +bevy_core_pipeline = "0.14" +bevy_pbr = "0.14" +bevy_sprite = "0.14" #bevy_prototype_debug_lines = "0.7" # Dependencies for native only. [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -bevy = { version = "0.13", default-features = false, features = [ +bevy = { version = "0.14", default-features = false, features = [ "bevy_sprite", "bevy_winit", "x11", @@ -74,7 +74,7 @@ bevy = { version = "0.13", default-features = false, features = [ # Dependencies for WASM only. [target.'cfg(target_arch = "wasm32")'.dependencies] -bevy = { version = "0.13", default-features = false, features = [ +bevy = { version = "0.14", default-features = false, features = [ "bevy_sprite", "bevy_winit", "tonemapping_luts", diff --git a/crates/rapier_testbed3d-f64/Cargo.toml b/crates/rapier_testbed3d-f64/Cargo.toml index f5b8786..f345f89 100644 --- a/crates/rapier_testbed3d-f64/Cargo.toml +++ b/crates/rapier_testbed3d-f64/Cargo.toml @@ -41,7 +41,7 @@ parallel = ["rapier/parallel", "num_cpus"] features = ["parallel"] [dependencies] -nalgebra = { version = "0.33", features = ["rand", "glam025"] } +nalgebra = { version = "0.33", features = ["rand", "glam027"] } rand = "0.8" rand_pcg = "0.3" instant = { version = "0.1", features = ["web-sys", "now"] } @@ -53,16 +53,16 @@ md5 = "0.7" Inflector = "0.11" serde = { version = "1", features = ["derive"] } -bevy_egui = "0.26" -bevy_ecs = "0.13" -bevy_core_pipeline = "0.13" -bevy_pbr = "0.13" -bevy_sprite = "0.13" +bevy_egui = "0.29" +bevy_ecs = "0.14" +bevy_core_pipeline = "0.14" +bevy_pbr = "0.14" +bevy_sprite = "0.14" #bevy_prototype_debug_lines = { version = "0.7", features = [ "3d" ] } # Dependencies for native only. [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -bevy = { version = "0.13", default-features = false, features = [ +bevy = { version = "0.14", default-features = false, features = [ "bevy_winit", "x11", "tonemapping_luts", @@ -75,7 +75,7 @@ bevy = { version = "0.13", default-features = false, features = [ # Dependencies for WASM only. [target.'cfg(target_arch = "wasm32")'.dependencies] -bevy = { version = "0.13", default-features = false, features = [ +bevy = { version = "0.14", default-features = false, features = [ "bevy_winit", "tonemapping_luts", "ktx2", diff --git a/crates/rapier_testbed3d/Cargo.toml b/crates/rapier_testbed3d/Cargo.toml index 854d584..da55229 100644 --- a/crates/rapier_testbed3d/Cargo.toml +++ b/crates/rapier_testbed3d/Cargo.toml @@ -39,12 +39,12 @@ other-backends = ["physx", "physx-sys", "glam"] features = ["parallel", "other-backends"] [dependencies] -nalgebra = { version = "0.33", features = ["rand", "glam025"] } +nalgebra = { version = "0.33", features = ["rand", "glam027"] } rand = "0.8" rand_pcg = "0.3" instant = { version = "0.1", features = ["web-sys", "now"] } bitflags = "2" -glam = { version = "0.24", optional = true } # For Physx +glam = { version = "0.27", optional = true } # For Physx num_cpus = { version = "1", optional = true } physx = { version = "0.19", features = ["glam"], optional = true } physx-sys = { version = "0.11", optional = true } @@ -54,16 +54,16 @@ md5 = "0.7" Inflector = "0.11" serde = { version = "1", features = ["derive"] } -bevy_egui = "0.26" -bevy_ecs = "0.13" -bevy_core_pipeline = "0.13" -bevy_pbr = "0.13" -bevy_sprite = "0.13" +bevy_egui = "0.29" +bevy_ecs = "0.14" +bevy_core_pipeline = "0.14" +bevy_pbr = "0.14" +bevy_sprite = "0.14" #bevy_prototype_debug_lines = { version = "0.7", features = [ "3d" ] } # Dependencies for native only. [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -bevy = { version = "0.13", default-features = false, features = [ +bevy = { version = "0.14", default-features = false, features = [ "bevy_winit", "x11", "tonemapping_luts", @@ -76,7 +76,7 @@ bevy = { version = "0.13", default-features = false, features = [ # Dependencies for WASM only. [target.'cfg(target_arch = "wasm32")'.dependencies] -bevy = { version = "0.13", default-features = false, features = [ +bevy = { version = "0.14", default-features = false, features = [ "bevy_winit", "tonemapping_luts", "ktx2", diff --git a/src_testbed/mouse.rs b/src_testbed/mouse.rs index 05b69e2..01c98df 100644 --- a/src_testbed/mouse.rs +++ b/src_testbed/mouse.rs @@ -25,7 +25,7 @@ pub fn track_mouse_state( - Vec2::ONE) * Vec2::new(1.0, -1.0); let ndc_to_world = - camera_transform.compute_matrix() * camera.projection_matrix().inverse(); + camera_transform.compute_matrix() * camera.clip_from_view().inverse(); let ray_pt1 = ndc_to_world.project_point3(Vec3::new(ndc_cursor.x, ndc_cursor.y, -1.0)); diff --git a/src_testbed/objects/node.rs b/src_testbed/objects/node.rs index 58e3a00..a5f7d51 100644 --- a/src_testbed/objects/node.rs +++ b/src_testbed/objects/node.rs @@ -44,7 +44,7 @@ impl EntityWithGraphics { #[cfg(feature = "dim2")] let selection_material = ColorMaterial { - color: Color::rgb(1.0, 0.0, 0.0), + color: Color::from(Srgba::rgb(1.0, 0.0, 0.0)), texture: None, }; #[cfg(feature = "dim3")] @@ -52,7 +52,7 @@ impl EntityWithGraphics { metallic: 0.5, perceptual_roughness: 0.5, double_sided: true, // TODO: this doesn't do anything? - ..StandardMaterial::from(Color::rgb(1.0, 0.0, 0.0)) + ..StandardMaterial::from(Color::from(Srgba::rgb(1.0, 0.0, 0.0))) }; instanced_materials.insert( @@ -85,7 +85,7 @@ impl EntityWithGraphics { .or_else(|| generate_collider_mesh(shape).map(|m| meshes.add(m))); let opacity = 1.0; - let bevy_color = Color::rgba(color.x, color.y, color.z, opacity); + let bevy_color = Color::from(Srgba::new(color.x, color.y, color.z, opacity)); let shape_pos = collider_pos * delta; let mut transform = Transform::from_scale(scale); transform.translation.x = shape_pos.translation.vector.x as f32; @@ -169,11 +169,12 @@ impl EntityWithGraphics { if let Some(material) = materials.get_mut(&self.material) { #[cfg(feature = "dim2")] { - material.color = Color::rgba(color.x, color.y, color.z, self.opacity); + material.color = Color::from(Srgba::new(color.x, color.y, color.z, self.opacity)); } #[cfg(feature = "dim3")] { - material.base_color = Color::rgba(color.x, color.y, color.z, self.opacity); + material.base_color = + Color::from(Srgba::new(color.x, color.y, color.z, self.opacity)); } } self.color = color; diff --git a/src_testbed/testbed.rs b/src_testbed/testbed.rs index 4986059..879eb84 100644 --- a/src_testbed/testbed.rs +++ b/src_testbed/testbed.rs @@ -429,7 +429,7 @@ impl TestbedApp { }; let mut app = App::new(); - app.insert_resource(ClearColor(Color::rgb(0.15, 0.15, 0.15))) + app.insert_resource(ClearColor(Color::from(Srgba::rgb(0.15, 0.15, 0.15)))) .insert_resource(Msaa::Sample4) .insert_resource(AmbientLight { brightness: 0.3, @@ -1600,7 +1600,7 @@ fn highlight_hovered_body( cursor.x / window.width() * 2.0 - 1.0, 1.0 - cursor.y / window.height() * 2.0, ); - let ndc_to_world = camera_transform.compute_matrix() * camera.projection_matrix().inverse(); + let ndc_to_world = camera_transform.compute_matrix() * camera.clip_from_view().inverse(); let ray_pt1 = ndc_to_world.project_point3(Vec3::new(ndc_cursor.x, ndc_cursor.y, -1.0)); let ray_pt2 = ndc_to_world.project_point3(Vec3::new(ndc_cursor.x, ndc_cursor.y, 1.0)); let ray_dir = ray_pt2 - ray_pt1; |
