/threejs-planet-system

ThreeJS driven simulation of the Solar System

Primary LanguageJavaScript

The Orrery

Orrery Screenshot

This is a personal web project, inspired by the existing Solar System simulation by sanderblue.

The project itself uses a data dump from the Solaire API to generate the positions all the planets and moons in the Solar System. These are rendered to a <canvas> using ThreeJS. Some parsing is done to the data in the front-end to generate the planet names and IDs in English.

Vite is utilised for the front-end build process, and Vue2 is leveraged to render the UI elements.

The Orrery currently lists 231 celestial entities in the Solar System, including:

  • 1 Sun
  • 8 Planets
  • 216 Moons
  • 6 Dwarf Planets

Clicking on an entity will retrieve Wikipedia information via the Wikipedia API, and NASA information via the NASA images API.

Running the project

  git clone https://github.com/Jollus174/threejs-planet-system.git

Go to the project directory

  cd src

Install dependencies

  npm install

Start the server

  npm run start

Building the project

  npm run build