sphere -> large moon far away, eclipsing the sun

This commit is contained in:
yuni 2024-03-16 23:52:26 +01:00
parent 62936e3044
commit 1514fb5b02

View file

@ -40,7 +40,7 @@ pub fn setup(
});
// Add spheres
let sphere_radius = 1.0;
let sphere_radius = 50.0;
let sphere_handle = meshes.add(Sphere::new(sphere_radius));
let white_handle = materials.add(StandardMaterial {
base_color: Color::GRAY,
@ -52,8 +52,8 @@ pub fn setup(
material: white_handle.clone(),
transform: Transform::from_xyz(
0.0,
sphere_radius,
0.0,
-2000.0,
),
..default()
});
@ -65,14 +65,14 @@ pub fn setup(
commands.spawn(DirectionalLightBundle {
directional_light: DirectionalLight {
illuminance: 1000.0,
shadows_enabled: true,
shadows_enabled: false,
..default()
},
transform: Transform::from_rotation(Quat::from_euler(
EulerRot::ZYX,
0.0,
PI / 1.,
-PI / 4.,
PI / 1.0,
-PI / 5.0,
)),
cascade_shadow_config: CascadeShadowConfigBuilder {
first_cascade_far_bound: 7.0,