rename vars
This commit is contained in:
parent
d607da7766
commit
2664602574
|
@ -42,12 +42,12 @@ pub fn setup(
|
||||||
// Add spheres
|
// Add spheres
|
||||||
let sphere_radius = 50.0;
|
let sphere_radius = 50.0;
|
||||||
let sphere_handle = meshes.add(Sphere::new(sphere_radius));
|
let sphere_handle = meshes.add(Sphere::new(sphere_radius));
|
||||||
let gray = materials.add(StandardMaterial {
|
let gray_handle = materials.add(StandardMaterial {
|
||||||
base_color: Color::GRAY,
|
base_color: Color::GRAY,
|
||||||
perceptual_roughness: 1.0,
|
perceptual_roughness: 1.0,
|
||||||
..default()
|
..default()
|
||||||
});
|
});
|
||||||
let brown = materials.add(StandardMaterial {
|
let brown_handle = materials.add(StandardMaterial {
|
||||||
base_color: Color::Rgba { alpha: 1.0, red: 0.8, green: 0.5, blue: 0.1 },
|
base_color: Color::Rgba { alpha: 1.0, red: 0.8, green: 0.5, blue: 0.1 },
|
||||||
perceptual_roughness: 1.0,
|
perceptual_roughness: 1.0,
|
||||||
..default()
|
..default()
|
||||||
|
@ -55,7 +55,7 @@ pub fn setup(
|
||||||
|
|
||||||
commands.spawn(PbrBundle {
|
commands.spawn(PbrBundle {
|
||||||
mesh: sphere_handle.clone(),
|
mesh: sphere_handle.clone(),
|
||||||
material: gray.clone(),
|
material: gray_handle.clone(),
|
||||||
transform: Transform::from_xyz(
|
transform: Transform::from_xyz(
|
||||||
0.0,
|
0.0,
|
||||||
0.0,
|
0.0,
|
||||||
|
@ -68,7 +68,7 @@ pub fn setup(
|
||||||
let sphere_handle = meshes.add(Sphere::new(sphere_radius));
|
let sphere_handle = meshes.add(Sphere::new(sphere_radius));
|
||||||
commands.spawn(PbrBundle {
|
commands.spawn(PbrBundle {
|
||||||
mesh: sphere_handle.clone(),
|
mesh: sphere_handle.clone(),
|
||||||
material: brown.clone(),
|
material: brown_handle.clone(),
|
||||||
transform: Transform::from_xyz(
|
transform: Transform::from_xyz(
|
||||||
300.0,
|
300.0,
|
||||||
40.0,
|
40.0,
|
||||||
|
|
Loading…
Reference in a new issue