Add orbital path integration for POIs in galaxy map

Stateless orbital system: each Orbital's local position is recomputed
each frame from phase + (TAU/period) * elapsed_secs. No per-entity
angle accumulator means no drift, trivial save/load (component data
only), and free pause/slow-mo via Bevy's time speed multiplier.

Extended to planets, stations, anomalies, gas clouds, and individual
asteroid rocks. Inner rocks orbit proportionally faster than outer
ones, producing visible belt shearing over time. Stargates stay
stationary as navigational aids. The orbital_period(orbit, jitter)
helper consolidates the period formula in one place.

10 new unit tests (7 for orbital_position, 3 for orbital_period).
All 32 tests pass.
This commit is contained in:
2026-06-07 17:03:06 -04:00
parent 4240c2b2ef
commit 031a674bd0
3 changed files with 234 additions and 4 deletions

View File

@@ -7,6 +7,7 @@
mod axes;
mod contents;
mod orbits;
mod params;
mod poi;
mod selection;
@@ -51,6 +52,7 @@ impl Plugin for GalaxyCreationPlugin {
selection::animate_selected_star,
selection::refresh_info_panel,
apply_orbit_reset,
orbits::advance_orbital_paths,
)
.chain()
.run_if(in_state(AppState::GalaxyCreation)),