Skip to content

About

A small and simple, browser-based solar system sandbox.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A small and simple, browser-based solar system sandbox.

Celestial bodies move under real Newtonian gravity (kinda like a N-body simulation), and are rendered in 3D with Three.js

Features

  • Real N-body gravity with a velocity Verlet integrator.
  • At setup, the Sun and the eight planets are positioned as they are on the current date.
  • The whole system is centered on its true center of mass.
  • 3D view with orbit controls (rotate, zoom and pan).
  • Colored orbit trails, each covering one orbit.
  • Planet names labels.
  • Time warper slider with pause checkbox.
  • Date display showing the current simulated date.

More "real" sandbox features will come later, once everything works fine! :D

Roadmap

Goals of the project

  • Make something I enjoy (I love astrophysics, simulations, etc).
  • Learn ThreeJS.
  • Try to understand how games like Universe Sandbox work under the hood.

Development

Requires Vite+

Clone the repo and cd into the project, then run:

vp install
vp dev

Project structure

src
├── assets 
├── main.ts
├── render
├── sim
│   ├── body.ts # Body type
│   ├── integrator.ts # gravity and veloticy Verlet steps
│   ├── scenarios/ # initial conditions
│   ├── units.ts # constants and units
│   └── vec3.ts # small vector helpers
└── style.css

Acknowledgement

Inspired by Universe Sandbox, a very cool and much more complete sandbox, feel free to check it out :D

License

MIT

About

A small and simple, browser-based solar system sandbox.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages