From 265f27b96b5dd9fd0b2f16251448e926e5c52b11 Mon Sep 17 00:00:00 2001 From: Greg Date: Mon, 13 Jul 2026 18:42:49 +1000 Subject: [PATCH] updated for bevy 0.19 --- Cargo.toml | 4 ++-- examples/distance3d.rs | 8 +++++--- examples/modify_timestep.rs | 2 +- src/automatic_systems.rs | 9 ++++++--- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 48ee500..52731ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" authors = ["laund "] [dependencies] -bevy = { version = "0.16", default-features = false } +bevy = { version = "0.19", default-features = false } # KD-Tree dependencies kd-tree = { version = "0.6.0", optional = true } typenum = { version = "1.18.0" } @@ -23,7 +23,7 @@ kdtree_rayon = ["kdtree", "kd-tree/rayon"] kdtree = ["dep:kd-tree"] [dev-dependencies] -bevy = { version = "0.16" } +bevy = { version = "0.19" } rand = "0.8" [profile.dev] diff --git a/examples/distance3d.rs b/examples/distance3d.rs index 9affa47..88a74b6 100644 --- a/examples/distance3d.rs +++ b/examples/distance3d.rs @@ -41,7 +41,6 @@ fn setup( mut commands: Commands, mut meshes: ResMut>, mut materials: ResMut>, - mut ambient_light: ResMut, ) { let handles = MaterialHandles { orange_red: materials.add(Color::from(csscolors::ORANGE_RED)), @@ -50,8 +49,11 @@ fn setup( }; commands.insert_resource(handles.clone()); - ambient_light.color = Color::WHITE; - ambient_light.brightness = 500.; + commands.insert_resource(GlobalAmbientLight { + color: Color::WHITE, + brightness: 500., + ..default() + }); commands.spawn(( Camera3d::default(), diff --git a/examples/modify_timestep.rs b/examples/modify_timestep.rs index 37be19f..663a3eb 100644 --- a/examples/modify_timestep.rs +++ b/examples/modify_timestep.rs @@ -34,7 +34,7 @@ fn setup(mut commands: Commands) { commands.spawn(( Text("Click mouse to change rate".to_string()), TextFont { - font_size: 30.0, + font_size: FontSize::Px(30.0), ..default() }, TextColor(Color::BLACK), diff --git a/src/automatic_systems.rs b/src/automatic_systems.rs index af44b82..2426780 100644 --- a/src/automatic_systems.rs +++ b/src/automatic_systems.rs @@ -7,7 +7,10 @@ use crate::{ }; use bevy::{ - ecs::schedule::{ScheduleLabel, SystemSet}, + ecs::{ + component::Mutable, + schedule::{ScheduleLabel, SystemSet}, + }, prelude::*, }; @@ -29,7 +32,7 @@ pub(crate) struct AutoT(PhantomData); impl AutoT where GlamVec: VecFromTransform, - SpatialDS: UpdateSpatialAccess + Resource, + SpatialDS: UpdateSpatialAccess + Resource, ::Point: From<(Entity, GlamVec)>, SpatialDS::Comp: Component, { @@ -61,7 +64,7 @@ pub(crate) struct AutoGT(PhantomData); impl AutoGT where GlamVec: VecFromGlobalTransform, - SpatialDS: UpdateSpatialAccess + Resource, + SpatialDS: UpdateSpatialAccess + Resource, ::Point: From<(Entity, GlamVec)>, SpatialDS::Comp: Component, {