sphere -> large moon far away, eclipsing the sun
This commit is contained in:
parent
62936e3044
commit
1514fb5b02
10
src/world.rs
10
src/world.rs
|
@ -40,7 +40,7 @@ pub fn setup(
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add spheres
|
// Add spheres
|
||||||
let sphere_radius = 1.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 white_handle = materials.add(StandardMaterial {
|
let white_handle = materials.add(StandardMaterial {
|
||||||
base_color: Color::GRAY,
|
base_color: Color::GRAY,
|
||||||
|
@ -52,8 +52,8 @@ pub fn setup(
|
||||||
material: white_handle.clone(),
|
material: white_handle.clone(),
|
||||||
transform: Transform::from_xyz(
|
transform: Transform::from_xyz(
|
||||||
0.0,
|
0.0,
|
||||||
sphere_radius,
|
|
||||||
0.0,
|
0.0,
|
||||||
|
-2000.0,
|
||||||
),
|
),
|
||||||
..default()
|
..default()
|
||||||
});
|
});
|
||||||
|
@ -65,14 +65,14 @@ pub fn setup(
|
||||||
commands.spawn(DirectionalLightBundle {
|
commands.spawn(DirectionalLightBundle {
|
||||||
directional_light: DirectionalLight {
|
directional_light: DirectionalLight {
|
||||||
illuminance: 1000.0,
|
illuminance: 1000.0,
|
||||||
shadows_enabled: true,
|
shadows_enabled: false,
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
transform: Transform::from_rotation(Quat::from_euler(
|
transform: Transform::from_rotation(Quat::from_euler(
|
||||||
EulerRot::ZYX,
|
EulerRot::ZYX,
|
||||||
0.0,
|
0.0,
|
||||||
PI / 1.,
|
PI / 1.0,
|
||||||
-PI / 4.,
|
-PI / 5.0,
|
||||||
)),
|
)),
|
||||||
cascade_shadow_config: CascadeShadowConfigBuilder {
|
cascade_shadow_config: CascadeShadowConfigBuilder {
|
||||||
first_cascade_far_bound: 7.0,
|
first_cascade_far_bound: 7.0,
|
||||||
|
|
Loading…
Reference in a new issue