Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Z axis color #131

Merged
merged 2 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bevy_editor_panes/bevy_2d_viewport/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ fn setup(mut commands: Commands, theme: Res<Theme>) {
InfiniteGridSettings {
scale: 0.01,
dot_fadeout_strength: 0.,
z_axis_color: Color::srgb(0.2, 8., 0.3),
x_axis_color: theme.viewport.x_axis_color,
z_axis_color: theme.viewport.y_axis_color,
major_line_color: theme.viewport.grid_major_line_color,
minor_line_color: theme.viewport.grid_minor_line_color,
..default()
Expand Down
2 changes: 2 additions & 0 deletions bevy_editor_panes/bevy_3d_viewport/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ fn setup(mut commands: Commands, theme: Res<Theme>) {
commands.spawn((
InfiniteGrid,
InfiniteGridSettings {
x_axis_color: theme.viewport.x_axis_color,
z_axis_color: theme.viewport.z_axis_color,
major_line_color: theme.viewport.grid_major_line_color,
minor_line_color: theme.viewport.grid_minor_line_color,
..default()
Expand Down
9 changes: 9 additions & 0 deletions crates/bevy_editor_styles/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ pub struct ContextMenuStyles {
pub struct ViewportStyles {
/// The background color of the viewports.
pub background_color: Color,
/// The color of the x-axis.
pub x_axis_color: Color,
/// The color of the y-axis.
pub y_axis_color: Color,
/// The color of the z-axis.
pub z_axis_color: Color,
/// The color of the major grid lines.
pub grid_major_line_color: Color,
/// The color of the minor grid lines.
Expand Down Expand Up @@ -142,6 +148,9 @@ impl FromWorld for Theme {
},
viewport: ViewportStyles {
background_color: Color::oklch(0.3677, 0.0, 0.0),
x_axis_color: Color::oklch(0.65, 0.24, 27.0),
y_axis_color: Color::oklch(0.87, 0.27, 144.0),
z_axis_color: Color::oklch(0.65, 0.19, 255.0),
grid_major_line_color: Color::oklch(0.45, 0.0, 0.0),
grid_minor_line_color: Color::oklch(0.4, 0.0, 0.0),
},
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_infinite_grid/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ pub struct InfiniteGridSettings {
impl Default for InfiniteGridSettings {
fn default() -> Self {
Self {
x_axis_color: Color::srgb(1.0, 0.2, 0.2),
z_axis_color: Color::srgb(0.2, 0.2, 1.0),
x_axis_color: Color::oklch(0.65, 0.24, 27.0),
z_axis_color: Color::oklch(0.65, 0.19, 255.0),
minor_line_color: Color::srgb(0.1, 0.1, 0.1),
major_line_color: Color::srgb(0.25, 0.25, 0.25),
fadeout_distance: 100.,
Expand Down
Loading