From 961f8c6d405c9c6fcf9aaf4fb6f199b0e5c60d88 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Thu, 30 Apr 2026 10:06:32 -0400 Subject: add orbit rendering for bodies --- src/main.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/main.rs') 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); } _ => {} } -- cgit v1.2.3