Skip to content

Repository files navigation

Orbiter

A gravity simulation with visual spacetime curvature where you can drag and throw celestial bodies to observe realistic orbital mechanics and gravitational interactions.

Features

  • Real-time gravitational physics simulation
  • Visual spacetime grid showing gravitational warping
  • Interactive drag and throw mechanics
  • Adjustable gravity constant
  • Infinite zoomable universe
  • 3D-styled celestial bodies with shadows

Controls

  • WASD: Move camera
  • +/-: Zoom in/out
  • Q/E: Decrease/increase gravity constant
  • Mouse drag: Drag and throw bodies

Setup

Install dependencies:

npm install

Run as desktop app:

npm start

Run in web browser:

npm run web

Then open http://localhost:8000

Project Structure

orbiter/
├── electron.js
├── index.html
├── main.js
├── phaser.min.js
└── src/
    ├── Body.js
    ├── Bodies.js
    ├── Graphic.js
    ├── Input.js
    ├── Physics.js
    └── scenes/
        ├── MainScene.js
        └── UIScene.js

License

MIT

About

A gravity simulation with visual spacetime curvature where you can drag and throw celestial bodies to observe realistic orbital mechanics and gravitational interactions

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages