From d93063a8ba1151c6bc50ceae8658c0f80bff2470 Mon Sep 17 00:00:00 2001 From: Elias Stepanik Date: Fri, 13 Jun 2025 02:22:23 +0200 Subject: [PATCH] Last small fixes --- client/src/plugins/environment/systems/planet_system.rs | 2 +- client/src/plugins/environment/systems/voxel_system.rs | 4 ++-- client/src/plugins/environment/systems/voxels/debug.rs | 4 ++-- client/src/plugins/ui/ui_plugin.rs | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/client/src/plugins/environment/systems/planet_system.rs b/client/src/plugins/environment/systems/planet_system.rs index fc8753c..0b71618 100644 --- a/client/src/plugins/environment/systems/planet_system.rs +++ b/client/src/plugins/environment/systems/planet_system.rs @@ -29,7 +29,7 @@ pub fn setup( SphereMeshBuilder::new(radius, SphereKind::Ico { subdivisions: 100 }) .build(), ); - let material_handle = materials.add(StandardMaterial::from(Color::rgb(0.3, 0.6, 1.0))); + let material_handle = materials.add(StandardMaterial::from(Color::srgb(0.3, 0.6, 1.0))); commands.entity(root.0).with_children(|parent| { parent.spawn(( diff --git a/client/src/plugins/environment/systems/voxel_system.rs b/client/src/plugins/environment/systems/voxel_system.rs index 72ed8da..ab9a445 100644 --- a/client/src/plugins/environment/systems/voxel_system.rs +++ b/client/src/plugins/environment/systems/voxel_system.rs @@ -30,10 +30,10 @@ pub fn setup( } } else { let mut tree = SparseVoxelOctree::new(octree_depth, octree_base_size, false, false, false); - let color = Color::rgb(0.2, 0.8, 0.2); + let color = Color::srgb(0.2, 0.8, 0.2); // How many random spheres? /*const NUM_SPHERES: usize = 5; - let mut rng = thread_rng(); + let mut rng = threald_rng(); for _ in 0..NUM_SPHERES { let center = Vec3::new( diff --git a/client/src/plugins/environment/systems/voxels/debug.rs b/client/src/plugins/environment/systems/voxels/debug.rs index 4246a95..85a2de6 100644 --- a/client/src/plugins/environment/systems/voxels/debug.rs +++ b/client/src/plugins/environment/systems/voxels/debug.rs @@ -15,7 +15,7 @@ pub fn visualize_octree_system( gizmos.cuboid( Transform::from_translation(octree_tf.translation) .with_scale(Vec3::splat(octree.size)), - Color::rgba(1.0, 1.0, 0.0, 0.15), + Color::srgba(1.0, 1.0, 0.0, 0.15), ); // Recursively draw children: @@ -62,7 +62,7 @@ fn visualize_recursive_center( // Draw the child bounding box gizmos.cuboid( Transform::from_translation(child_center).with_scale(Vec3::splat(child_size)), - Color::rgba(0.5, 1.0, 0.5, 0.15), // greenish + Color::srgba(0.5, 1.0, 0.5, 0.15), // greenish ); // Recurse diff --git a/client/src/plugins/ui/ui_plugin.rs b/client/src/plugins/ui/ui_plugin.rs index e26b033..c98c5aa 100644 --- a/client/src/plugins/ui/ui_plugin.rs +++ b/client/src/plugins/ui/ui_plugin.rs @@ -1,6 +1,5 @@ use crate::plugins::ui::systems::ui_system::*; use bevy::app::{App, FixedUpdate, Plugin, PreUpdate, Startup}; -use bevy::prelude::IntoSystemConfigs; pub struct UiPlugin; impl Plugin for UiPlugin {