diff --git a/crates/editor_ui/src/inspector/mod.rs b/crates/editor_ui/src/inspector/mod.rs index e23cb58d..a7d5a2c5 100644 --- a/crates/editor_ui/src/inspector/mod.rs +++ b/crates/editor_ui/src/inspector/mod.rs @@ -306,7 +306,7 @@ impl EditorTab for InspectorTab { egui::Window::new("Add component") .open(&mut state.show_add_component_window) .resizable(true) - .scroll2([false, true]) + .scroll([false, true]) .default_width(120.) .default_height(300.) .default_pos(components_area.inner_rect.center_bottom()) diff --git a/crates/editor_ui/src/lib.rs b/crates/editor_ui/src/lib.rs index 4e17ea3c..b9cf5bc8 100644 --- a/crates/editor_ui/src/lib.rs +++ b/crates/editor_ui/src/lib.rs @@ -61,8 +61,6 @@ pub mod sizing; pub mod icons; -use std::char::MAX; - use bevy_debug_grid::{Grid, GridAxis, SubGrid, TrackedGrid}; use bevy_mod_picking::{ backends::raycast::RaycastPickable, @@ -371,9 +369,9 @@ pub fn simple_editor_setup(mut commands: Commands) { }, // Darker grid to make it easier to see entity gizmos when Transform (0, 0, 0) GridAxis { - x: Some(Color::rgb(0.9, 0.1, 0.1)), - y: Some(Color::rgb(0.1, 0.9, 0.1)), - z: Some(Color::rgb(0.1, 0.1, 0.9)), + x: Some(Color::linear_rgb(0.9, 0.1, 0.1)), + y: Some(Color::linear_rgb(0.1, 0.9, 0.1)), + z: Some(Color::linear_rgb(0.1, 0.1, 0.9)), }, TrackedGrid::default(), TransformBundle::default(), diff --git a/crates/editor_ui/src/meshless_visualizer.rs b/crates/editor_ui/src/meshless_visualizer.rs index 36f70141..f87a1511 100644 --- a/crates/editor_ui/src/meshless_visualizer.rs +++ b/crates/editor_ui/src/meshless_visualizer.rs @@ -1,6 +1,6 @@ use anyhow::anyhow; use bevy::{ - math::{primitives as math_shapes, Direction3d}, + math::primitives as math_shapes, prelude::*, render::view::RenderLayers, utils::HashMap, @@ -450,13 +450,13 @@ pub fn draw_light_gizmo( // circle at the end of the light range at both angles gizmos.circle( transform.translation + range, - Direction3d::new_unchecked(transform.back().normalize()), + Dir3::new_unchecked(transform.back().normalize()), outer_rad, spot.color.with_alpha(1.0), ); gizmos.circle( transform.translation + range, - Direction3d::new_unchecked(transform.back().normalize()), + Dir3::new_unchecked(transform.back().normalize()), inner_rad, spot.color.with_alpha(1.0), ); diff --git a/crates/editor_ui/src/tools/gizmo.rs b/crates/editor_ui/src/tools/gizmo.rs index 12f3abaa..c0a1d5e8 100644 --- a/crates/editor_ui/src/tools/gizmo.rs +++ b/crates/editor_ui/src/tools/gizmo.rs @@ -2,7 +2,6 @@ use bevy::{prelude::*, render::camera::CameraProjection}; use bevy_egui::egui::{self, Key}; use space_editor_core::prelude::*; use space_shared::*; -use transform_gizmo_egui::mint::RowMatrix4; use transform_gizmo_egui::{EnumSet, Gizmo, GizmoExt, GizmoMode}; use crate::EditorGizmo; diff --git a/crates/prefab/src/component/material.rs b/crates/prefab/src/component/material.rs index 4dc90c8c..4035c25e 100644 --- a/crates/prefab/src/component/material.rs +++ b/crates/prefab/src/component/material.rs @@ -34,7 +34,7 @@ pub struct MaterialPrefab { impl Default for MaterialPrefab { fn default() -> Self { Self { - base_color: Color::rgb(1.0, 1.0, 1.0), + base_color: Color::linear_rgb(1.0, 1.0, 1.0), base_color_texture: String::default(), emissive: Color::BLACK, emissive_texture: String::default(), @@ -110,7 +110,7 @@ pub struct ColorMaterialPrefab { impl Default for ColorMaterialPrefab { fn default() -> Self { Self { - color: Color::rgb(1.0, 1.0, 1.0), + color: Color::linear_rgb(1.0, 1.0, 1.0), texture: String::default(), } } @@ -201,7 +201,7 @@ mod tests { let color = prefab.to_material(server); assert!(color.texture.is_some()); - assert_eq!(color.color, Color::rgb(1.0, 1.0, 1.0)); + assert_eq!(color.color, Color::linear_rgb(1.0, 1.0, 1.0)); } #[test] @@ -242,7 +242,7 @@ mod tests { |server: Res, query: Query<&MaterialPrefab>| { let material = query.single(); let material = material.to_material(&server); - assert_eq!(material.base_color, Color::rgb(1.0, 1.0, 1.0)); + assert_eq!(material.base_color, Color::linear_rgb(1.0, 1.0, 1.0)); assert_eq!(material.emissive, Color::BLACK.into()); assert_eq!(material.emissive_texture, None); assert_eq!(material.alpha_mode, AlphaMode::Opaque); diff --git a/crates/shared/src/asset_fs.rs b/crates/shared/src/asset_fs.rs index 39f2d602..dd50a6af 100644 --- a/crates/shared/src/asset_fs.rs +++ b/crates/shared/src/asset_fs.rs @@ -1,6 +1,5 @@ use anyhow::Result; use bevy::prelude::*; -use image::DynamicImage; use crate::gizmos::{ CAMERA_GIZMO, DIRECTION_LIGHT_GIZMO, POINT_LIGHT_GIZMO, SPOT_LIGHT_GIZMO, UNKNOWN,