CELESTIA 2D
Celestia is an interactive 2D space-physics simulator built with JavaScript + HTML Canvas. You can create stars, planets, neutron stars, giant planets, and even black holes - all obeying real gravitational physics. Objects orbit, collide, form trails, and can be saved/loaded as full simulations.s.
Celestial Bodies
- Stars
- Planets
- Giant Planets
- Neutron Stars
- Black Holes Custom radius, mass, and velocity for every objectt
Physics
- Newtonian gravity
- Stable orbit detection
- Auto-Orbit mode
- Trail rendering (distance-based)
- Object collisions and merging
Simulation Tools
- Add elements with a UI panel
- Toggle auto-orbit
- Drag canvas for movement (if added)
- Zoom in/out
- Save simulation → JSON
- Load simulation → JSON
Visuals
- Smooth canvas animations
- Distance-based trail length
- Dark, minimalistic UI
- Tooltip showing live object stats
Presets
- A Binary star system with one planet
- A black hole with accretion disk