Skip to content

mitchcamza/SolarSimulationReboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SolarSimulationReboot

A simplified solar system simulation using ThreeJS

Setup

Download and install Node.js and run the following commands in the project's root directory:

# Install dependencies (only the first time)
npm install

# Run the local server and click on the link generated [Default:](http://localhost:5173/)
npm run dev

# Build for production in the dist/ directory (optional)
npm run build

Live project

https://solar-simulation-reboot.vercel.app

Usage

Control panel

  • Click on the controls dropdown arrow to bring up the control panel.

Navigation Controls

  • Orbit Controls: Click and drag to orbit the camera around the scene.
  • Pan: Click and drag with the right mouse button to pan the camera.
  • Zoom: Use the mouse wheel to zoom in and out.

Selecting Celestial Bodies

  • Click Selection: Click on any celestial body to focus the camera on it (desktop only).
  • GUI Selection: Use the "Follow" dropdown menu in the GUI to select and focus on a specific celestial body.

Lights

  • Point Light: Adjust the intensity slider to simulate the light intensity from the sun.
  • Ambient Light: Use the slider to adjust ambient light. This will affect all objects in the scene.
  • Hemisphere Light: Adjust the intensity, sky colour, and ground colour to add additional lighting effects to the entire scene.

Simulation Speed

  • Speed Slider: Adjust the speed of the simulation using the slider.
  • Reset: Click the "Reset" button to reset the simulation speed to its default value.

Performance

  • Stats: Toggle the show stats checkbox to display performance metrics, like framerate, and frametime.
  • Click on the performance metrics to switch between them.

Credits

License

This project is licensed under the MIT License - see the LICENSE file for details.