update dir. light to actually come from the sun
thankfully we have only one star in the system, trisolaris would be annoying to code
This commit is contained in:
parent
c86d51fe92
commit
39aa5b04b3
11
src/world.rs
11
src/world.rs
|
@ -8,7 +8,7 @@ use bevy::core_pipeline::bloom::{BloomCompositeMode, BloomSettings};
|
||||||
use std::f32::consts::PI;
|
use std::f32::consts::PI;
|
||||||
|
|
||||||
const ASTEROID_SIZE: f32 = 100.0;
|
const ASTEROID_SIZE: f32 = 100.0;
|
||||||
const MOON_SIZE: f32 = 50.0;
|
const MOON_SIZE: f32 = 200.0;
|
||||||
const MARS_SIZE: f32 = 10.0;
|
const MARS_SIZE: f32 = 10.0;
|
||||||
const ASTRONAUT_SIZE: f32 = 5.0;
|
const ASTRONAUT_SIZE: f32 = 5.0;
|
||||||
|
|
||||||
|
@ -114,9 +114,9 @@ pub fn setup(
|
||||||
mesh: sphere_handle.clone(),
|
mesh: sphere_handle.clone(),
|
||||||
material: gray_handle.clone(),
|
material: gray_handle.clone(),
|
||||||
transform: Transform::from_xyz(
|
transform: Transform::from_xyz(
|
||||||
|
2000.0,
|
||||||
0.0,
|
0.0,
|
||||||
0.0,
|
0.0,
|
||||||
-500.0,
|
|
||||||
).with_scale(Vec3::splat(MOON_SIZE)),
|
).with_scale(Vec3::splat(MOON_SIZE)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
|
@ -217,12 +217,7 @@ pub fn setup(
|
||||||
shadows_enabled: false,
|
shadows_enabled: false,
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
transform: Transform::from_rotation(Quat::from_euler(
|
transform: Transform::from_rotation(Quat::from_rotation_y(PI/2.0)),
|
||||||
EulerRot::ZYX,
|
|
||||||
0.0,
|
|
||||||
PI / 1.0,
|
|
||||||
-PI / 7.0,
|
|
||||||
)),
|
|
||||||
cascade_shadow_config: CascadeShadowConfigBuilder {
|
cascade_shadow_config: CascadeShadowConfigBuilder {
|
||||||
first_cascade_far_bound: 7.0,
|
first_cascade_far_bound: 7.0,
|
||||||
maximum_distance: 25.0,
|
maximum_distance: 25.0,
|
||||||
|
|
Loading…
Reference in a new issue