Skip to content

Celestia 2D is an interactive 2D space simulation where you can explore planets, moons, stars and more. Visualize orbits, experiment with gravity, and see how celestial bodies move and interact in a simplified, dynamic environment. Perfect for learning orbital mechanics and having fun with space physics!

Notifications You must be signed in to change notification settings

Neravahn/Celestia-2D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Nov 17, 2025
d228ea9 · · Nov 17, 2025

History

19 Commits
Nov 17, 2025
Nov 17, 2025
Nov 14, 2025
Nov 17, 2025
Nov 17, 2025
Nov 14, 2025

Repository files navigation

Logo

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.

Features

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

Tech Stack

Python Flask JavaScript HTML5 CSS3

Demo

DEMO

Working link

Celestia 2D

About

Celestia 2D is an interactive 2D space simulation where you can explore planets, moons, stars and more. Visualize orbits, experiment with gravity, and see how celestial bodies move and interact in a simplified, dynamic environment. Perfect for learning orbital mechanics and having fun with space physics!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published