mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Swapping back to using From<Color> for StandardMaterial in examples (#13566)
# Objective Fixes #13547
This commit is contained in:
parent
29d6575e22
commit
2ac290dd8f
3 changed files with 4 additions and 16 deletions
|
@ -18,20 +18,14 @@ fn setup(
|
|||
// circular base
|
||||
commands.spawn(PbrBundle {
|
||||
mesh: meshes.add(Circle::new(4.0)),
|
||||
material: materials.add(StandardMaterial {
|
||||
base_color: Color::WHITE,
|
||||
..Default::default()
|
||||
}),
|
||||
material: materials.add(Color::WHITE),
|
||||
transform: Transform::from_rotation(Quat::from_rotation_x(-std::f32::consts::FRAC_PI_2)),
|
||||
..default()
|
||||
});
|
||||
// cube
|
||||
commands.spawn(PbrBundle {
|
||||
mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)),
|
||||
material: materials.add(StandardMaterial {
|
||||
base_color: Srgba::rgb_u8(124, 144, 255).into(),
|
||||
..Default::default()
|
||||
}),
|
||||
material: materials.add(Color::srgb_u8(124, 144, 255)),
|
||||
transform: Transform::from_xyz(0.0, 0.5, 0.0),
|
||||
..default()
|
||||
});
|
||||
|
|
|
@ -52,10 +52,7 @@ fn setup(
|
|||
commands.spawn((
|
||||
PbrBundle {
|
||||
mesh: meshes.add(Plane3d::default().mesh().size(20., 20.)),
|
||||
material: materials.add(StandardMaterial {
|
||||
base_color: LinearRgba::rgb(0.3, 0.5, 0.3).into(),
|
||||
..default()
|
||||
}),
|
||||
material: materials.add(Color::srgb(0.3, 0.5, 0.3)),
|
||||
..default()
|
||||
},
|
||||
Ground,
|
||||
|
|
|
@ -261,10 +261,7 @@ fn setup(
|
|||
// Plane
|
||||
commands.spawn(PbrBundle {
|
||||
mesh: meshes.add(Plane3d::default().mesh().size(50.0, 50.0)),
|
||||
material: materials.add(StandardMaterial {
|
||||
base_color: LinearRgba::rgb(0.1, 0.2, 0.1).into(),
|
||||
..Default::default()
|
||||
}),
|
||||
material: materials.add(Color::srgb(0.1, 0.2, 0.1)),
|
||||
..default()
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue