Skip to content

Commit

Permalink
use color constants where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
IceSentry committed Oct 5, 2023
1 parent ceb163d commit bd19b54
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/3d/wireframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,31 @@ fn setup(
// plane
commands.spawn(PbrBundle {
mesh: meshes.add(Mesh::from(shape::Plane::from_size(5.0))),
material: materials.add(Color::rgb(0.3, 0.3, 0.5).into()),
material: materials.add(Color::BLUE.into()),
..default()
});

// Red cube: Never renders a wireframe
commands
.spawn(PbrBundle {
mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
material: materials.add(Color::rgb(0.8, 0.1, 0.1).into()),
material: materials.add(Color::RED.into()),
transform: Transform::from_xyz(-1.0, 0.5, -1.0),
..default()
})
.insert(NoWireframe);
// Orange cube: Follows global wireframe setting
commands.spawn(PbrBundle {
mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
material: materials.add(Color::rgb(0.8, 0.8, 0.1).into()),
material: materials.add(Color::ORANGE.into()),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..default()
});
// Green cube: Always renders a wireframe
commands
.spawn(PbrBundle {
mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
material: materials.add(Color::rgb(0.1, 0.8, 0.1).into()),
material: materials.add(Color::GREEN.into()),
transform: Transform::from_xyz(1.0, 0.5, 1.0),
..default()
})
Expand Down

0 comments on commit bd19b54

Please sign in to comment.