diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-04-30 10:06:32 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-04-30 10:06:32 -0400 |
| commit | 961f8c6d405c9c6fcf9aaf4fb6f199b0e5c60d88 (patch) | |
| tree | a26797d6314fa8c193a459e988427c7bfe7f19a7 /src/main.rs | |
| parent | 25255a8b9147d27aa40b28d6aadb62c0ab275d32 (diff) | |
| download | systemic4x-961f8c6d405c9c6fcf9aaf4fb6f199b0e5c60d88.tar.gz systemic4x-961f8c6d405c9c6fcf9aaf4fb6f199b0e5c60d88.tar.bz2 systemic4x-961f8c6d405c9c6fcf9aaf4fb6f199b0e5c60d88.zip | |
add orbit rendering for bodies
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index d872cc1..7a7e3a1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -64,7 +64,7 @@ impl GameState pub fn new() -> Self { let timeman = TimeMan::new(0); - let sol_system = match SolarSystem::new_from_known_star("sol") + let sol_system = match SolarSystem::new_from_known_star(0, "sol") { Ok(system) => system, Err(e) => panic!("Unable to create sol system : {}", e) @@ -139,9 +139,8 @@ impl ApplicationHandler for SystemicApp self.last_render_time = now; game_state.borrow_mut().update(delta_time); - { - window.update(game_state, delta_time); - } + window.update(game_state, delta_time); + match window.render(game_state) { Ok(_) => {} Err(wgpu::SurfaceError::Outdated | wgpu::SurfaceError::Lost) => { @@ -164,7 +163,7 @@ impl ApplicationHandler for SystemicApp }, .. } => { - window.keyboard_input(game_state, key_code, key_state); + window.keyboard_input(key_code, key_state); } _ => {} } |
