A gravity simulation with visual spacetime curvature where you can drag and throw celestial bodies to observe realistic orbital mechanics and gravitational interactions.
- 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
- WASD: Move camera
- +/-: Zoom in/out
- Q/E: Decrease/increase gravity constant
- Mouse drag: Drag and throw bodies
Install dependencies:
npm installRun as desktop app:
npm startRun in web browser:
npm run webThen open http://localhost:8000
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
MIT