From f507cc8cca4a3e49591b025010ee99bfa1a9822e Mon Sep 17 00:00:00 2001 From: barsoosayque Date: Sat, 4 Apr 2026 16:25:51 +0700 Subject: [PATCH 1/2] update to bevy 0.18 --- Cargo.toml | 8 ++++---- examples/extrude.rs | 10 +++++----- examples/tree.rs | 22 +++++++++------------- examples/visualizer.rs | 13 ++++++------- 4 files changed, 24 insertions(+), 29 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cc80d4d..e93d1cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ thiserror = "2.0.9" xatlas-rs-v2 = { version = "0.1.4", optional = true } # Optional dependency for UV unwrapping # Adapter dependencies -bevy = { version = "0.17", default-features = false, features = [ +bevy = { version = "0.18", default-features = false, features = [ "bevy_pbr", "bevy_ui", "bevy_gizmos", @@ -26,9 +26,9 @@ bevy = { version = "0.17", default-features = false, features = [ ], optional = true } [dev-dependencies] -bevy = "0.17.2" -bevy_panorbit_camera = { version = "0.32.0", features = ["bevy_egui"] } -bevy-inspector-egui = "0.35.0" +bevy = "0.18" +bevy_panorbit_camera = "0.34" +bevy-inspector-egui = "0.36" fastrand = "2.3.0" fastrand-contrib = "0.1.0" diff --git a/examples/extrude.rs b/examples/extrude.rs index 791253a..fc41628 100644 --- a/examples/extrude.rs +++ b/examples/extrude.rs @@ -94,17 +94,17 @@ fn init_system( Transform::from_translation(vec3(0.0, 5.0, 7.0)), PanOrbitCamera::default(), Msaa::Sample4, + AmbientLight { + color: Color::WHITE, + brightness: 300.0, + affects_lightmapped_meshes: true, + }, )); } fn main() { App::new() .insert_resource(ClearColor(Color::BLACK)) - .insert_resource(AmbientLight { - color: Color::WHITE, - brightness: 300.0, - affects_lightmapped_meshes: true, - }) .add_plugins(( DefaultPlugins, PanOrbitCameraPlugin, diff --git a/examples/tree.rs b/examples/tree.rs index 725a9d2..efc52b5 100644 --- a/examples/tree.rs +++ b/examples/tree.rs @@ -3,8 +3,8 @@ use std::f32::consts::PI; use bevy::{math::cubic_splines::LinearSpline, prelude::*}; use bevy_inspector_egui::{ - bevy_egui::EguiPlugin, - inspector_options::ReflectInspectorOptions, quick::ResourceInspectorPlugin, InspectorOptions, + bevy_egui::EguiPlugin, inspector_options::ReflectInspectorOptions, + quick::ResourceInspectorPlugin, InspectorOptions, }; use bevy_panorbit_camera::{PanOrbitCamera, PanOrbitCameraPlugin}; use fastrand_contrib::RngExt; @@ -44,7 +44,7 @@ fn generate_tree(params: TreeParameters) -> SMeshResult { let n_control_points = params.height.floor() as usize; // let n_control_points = 3; - for i in (1..n_control_points) { + for i in 1..n_control_points { control_points.push(vec3( rng.f32_range(-0.5..0.5), i as f32 / n_control_points as f32, @@ -180,22 +180,18 @@ fn init_system( Msaa::Sample4, Transform::from_translation(Vec3::new(0.0, 5.0, 10.0)), PanOrbitCamera::default(), + AmbientLight { + color: Color::WHITE, + brightness: 300.0, + affects_lightmapped_meshes: true, + }, )); } fn main() { App::new() .insert_resource(ClearColor(Color::BLACK)) - .insert_resource(AmbientLight { - color: Color::WHITE, - brightness: 300.0, - affects_lightmapped_meshes: true, - }) - .add_plugins(( - DefaultPlugins, - PanOrbitCameraPlugin, - SMeshDebugDrawPlugin, - )) + .add_plugins((DefaultPlugins, PanOrbitCameraPlugin, SMeshDebugDrawPlugin)) .add_plugins(EguiPlugin::default()) .add_plugins(ResourceInspectorPlugin::::default()) .add_systems(Startup, init_system) diff --git a/examples/visualizer.rs b/examples/visualizer.rs index abdaca6..b77828e 100644 --- a/examples/visualizer.rs +++ b/examples/visualizer.rs @@ -1,7 +1,6 @@ -use bevy::color::palettes::css::{BLACK, WHITE}; +use bevy::color::palettes::css::BLACK; use bevy::prelude::*; use bevy_inspector_egui::bevy_egui::EguiPlugin; -use bevy_inspector_egui::quick::WorldInspectorPlugin; use bevy_panorbit_camera::{PanOrbitCamera, PanOrbitCameraPlugin}; use itertools::Itertools; @@ -39,17 +38,17 @@ fn init_system(mut commands: Commands) { Msaa::Sample4, Transform::from_translation(Vec3::new(0.0, 1.5, 17.0)), PanOrbitCamera::default(), + AmbientLight { + color: Color::WHITE, + brightness: 300.0, + affects_lightmapped_meshes: true, + }, )); } fn main() { App::new() .insert_resource(ClearColor(BLACK.into())) - .insert_resource(AmbientLight { - color: WHITE.into(), - brightness: 0.3, - affects_lightmapped_meshes: true, - }) .add_plugins(( DefaultPlugins, PanOrbitCameraPlugin, From ffc39bb8a965ff9067985bd01ebcebe7003cdf0d Mon Sep 17 00:00:00 2001 From: barsoosayque Date: Thu, 6 Aug 2026 01:45:42 +0600 Subject: [PATCH 2/2] Update to bevy 0.19 --- Cargo.toml | 10 +++++----- examples/tree.rs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e93d1cd..fdd4ff6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,14 +11,14 @@ description = "A fast and ergonomic surface-mesh/halfedge-mesh implementation an # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -glam = "0.30.1" # Tracking bevys glam version for convencience +glam = "0.32" # Tracking bevys glam version for convencience slotmap = "1.0.7" itertools = "0.14.0" thiserror = "2.0.9" xatlas-rs-v2 = { version = "0.1.4", optional = true } # Optional dependency for UV unwrapping # Adapter dependencies -bevy = { version = "0.18", default-features = false, features = [ +bevy = { version = "0.19", default-features = false, features = [ "bevy_pbr", "bevy_ui", "bevy_gizmos", @@ -26,9 +26,9 @@ bevy = { version = "0.18", default-features = false, features = [ ], optional = true } [dev-dependencies] -bevy = "0.18" -bevy_panorbit_camera = "0.34" -bevy-inspector-egui = "0.36" +bevy = "0.19" +bevy_panorbit_camera = "0.35" +bevy-inspector-egui = "0.37" fastrand = "2.3.0" fastrand-contrib = "0.1.0" diff --git a/examples/tree.rs b/examples/tree.rs index efc52b5..57b4597 100644 --- a/examples/tree.rs +++ b/examples/tree.rs @@ -168,7 +168,7 @@ fn init_system( commands.spawn(( DirectionalLight { illuminance: light_consts::lux::OVERCAST_DAY * 2.0, - shadows_enabled: true, + shadow_maps_enabled: true, ..default() }, Transform::from_rotation(Quat::from_euler(EulerRot::ZYX, 0.0, PI / 2., -PI / 4.)),