height map generator

This commit is contained in:
2024-03-24 21:36:26 -04:00
commit e9757a5371
13 changed files with 4650 additions and 0 deletions

32
game/main/src/phos.rs Normal file
View File

@@ -0,0 +1,32 @@
use bevy::{pbr::CascadeShadowConfig, prelude::*};
pub struct PhosGamePlugin;
impl Plugin for PhosGamePlugin {
fn build(&self, app: &mut App) {
app.add_systems(Startup, init_game);
}
}
fn init_game(mut commands: Commands) {
commands.spawn((
Camera3dBundle {
transform: Transform::from_xyz(0., 50., 0.)
.looking_at(Vec3::new(50., 0., 50.), Vec3::Y),
..default()
},
));
commands.spawn(DirectionalLightBundle {
directional_light: DirectionalLight {
shadows_enabled: false,
..default()
},
cascade_shadow_config: CascadeShadowConfig {
bounds: vec![20., 40., 80., 1000., 5000., 19000., 20000.],
..default()
},
transform: Transform::from_xyz(0.0, 16.0, 5.).looking_at(Vec3::ZERO, Vec3::Y),
..default()
});
}