Skip to content

Commit

Permalink
Change Color::rgb -> Color::srgb
Browse files Browse the repository at this point in the history
Addresses Bevy #12163 (bevyengine/bevy#12163)
  • Loading branch information
zhaop authored and jakobhellermann committed Aug 11, 2024
1 parent b864ab3 commit cfe9065
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions crates/bevy_editor_pls/examples/2d_3d_mixed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn setup_2d(mut commands: Commands) {
commands.spawn(Camera2dBundle::default());
commands.spawn(SpriteBundle {
sprite: Sprite {
color: Color::rgb(0.25, 0.25, 0.75),
color: Color::srgb(0.25, 0.25, 0.75),
custom_size: Some(Vec2::new(50.0, 50.0)),
..Default::default()
},
Expand All @@ -27,12 +27,12 @@ fn setup_3d(
) {
commands.spawn(PbrBundle {
mesh: meshes.add(Plane3d::new(Vec3::Y).mesh().size(0.5, 0.5)),
material: materials.add(Color::rgb(0.3, 0.5, 0.3)),
material: materials.add(Color::srgb(0.3, 0.5, 0.3)),
..Default::default()
});
commands.spawn(PbrBundle {
mesh: meshes.add(Mesh::from(Cuboid::from_size(Vec3::ONE))),
material: materials.add(Color::rgb(0.8, 0.7, 0.6)),
material: materials.add(Color::srgb(0.8, 0.7, 0.6)),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..Default::default()
});
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_editor_pls/examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ fn setup(
commands.spawn(PbrBundle {
// mesh: meshes.add(Mesh::from(Plane3d::new(Vec3::Y).mesh().size(5.0, 5.0))),
mesh: meshes.add(Plane3d::new(Vec3::Y).mesh().size(5.0, 5.0)),
material: materials.add(Color::rgb(0.3, 0.5, 0.3)),
material: materials.add(Color::srgb(0.3, 0.5, 0.3)),
..Default::default()
});
// cube
commands.spawn(PbrBundle {
mesh: meshes.add(Mesh::from(Cuboid::from_size(Vec3::ONE))),
material: materials.add(Color::rgb(0.8, 0.7, 0.6)),
material: materials.add(Color::srgb(0.8, 0.7, 0.6)),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..Default::default()
});
Expand Down
14 changes: 7 additions & 7 deletions crates/bevy_editor_pls/examples/breakout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ const GAP_BETWEEN_BRICKS_AND_SIDES: f32 = 20.0;
const SCOREBOARD_FONT_SIZE: f32 = 40.0;
const SCOREBOARD_TEXT_PADDING: Val = Val::Px(5.0);

const BACKGROUND_COLOR: Color = Color::rgb(0.9, 0.9, 0.9);
const PADDLE_COLOR: Color = Color::rgb(0.3, 0.3, 0.7);
const BALL_COLOR: Color = Color::rgb(1.0, 0.5, 0.5);
const BRICK_COLOR: Color = Color::rgb(0.5, 0.5, 1.0);
const WALL_COLOR: Color = Color::rgb(0.8, 0.8, 0.8);
const TEXT_COLOR: Color = Color::rgb(0.5, 0.5, 1.0);
const SCORE_COLOR: Color = Color::rgb(1.0, 0.5, 0.5);
const BACKGROUND_COLOR: Color = Color::srgb(0.9, 0.9, 0.9);
const PADDLE_COLOR: Color = Color::srgb(0.3, 0.3, 0.7);
const BALL_COLOR: Color = Color::srgb(1.0, 0.5, 0.5);
const BRICK_COLOR: Color = Color::srgb(0.5, 0.5, 1.0);
const WALL_COLOR: Color = Color::srgb(0.8, 0.8, 0.8);
const TEXT_COLOR: Color = Color::srgb(0.5, 0.5, 1.0);
const SCORE_COLOR: Color = Color::srgb(1.0, 0.5, 0.5);

fn main() {
App::new()
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_editor_pls/examples/controls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ fn setup(
// plane
commands.spawn(PbrBundle {
mesh: meshes.add(Mesh::from(Plane3d::new(Vec3::Y).mesh().size(5.0, 5.0))),
material: materials.add(Color::rgb(0.3, 0.5, 0.3)),
material: materials.add(Color::srgb(0.3, 0.5, 0.3)),
..Default::default()
});
// cube
commands.spawn(PbrBundle {
mesh: meshes.add(Mesh::from(Cuboid::from_size(Vec3::ONE))),
material: materials.add(Color::rgb(0.8, 0.7, 0.6)),
material: materials.add(Color::srgb(0.8, 0.7, 0.6)),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..Default::default()
});
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_editor_pls/examples/separate_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ fn setup(
// plane
commands.spawn(PbrBundle {
mesh: meshes.add(Mesh::from(Plane3d::new(Vec3::Y).mesh().size(5.0, 5.0))),
material: materials.add(Color::rgb(0.3, 0.5, 0.3)),
material: materials.add(Color::srgb(0.3, 0.5, 0.3)),
..Default::default()
});
// cube
commands.spawn(PbrBundle {
mesh: meshes.add(Mesh::from(Cuboid::from_size(Vec3::ONE))),
material: materials.add(Color::rgb(0.8, 0.7, 0.6)),
material: materials.add(Color::srgb(0.8, 0.7, 0.6)),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..Default::default()
});
Expand Down

0 comments on commit cfe9065

Please sign in to comment.