This project is a 3D Solar System Simulation built using Three.js. It visually represents the planets revolving around the Sun, complete with realistic textures, lighting, and orbital motion.
- Realistic 3D planets with textures.
- Orbiting motion for all planets and their moons.
- Point light acting as the Sun — the only light source.
- Smooth camera controls using OrbitControls.
- Scaled distances and rotation speeds for a natural effect.
- Three.js – 3D rendering engine.
- Vite – Build tool for fast development.
- JavaScript (ES6+)
- HTML5 & CSS3
git clone https://github.com/manish-850/solarSystemThreejs.gitcd solarSystemThreejsnpm installnpm run devnpm run buildnpm run preview- The Sun is rendered using
MeshBasicMaterial(so it glows without needing external light). - A PointLight is placed at the Sun’s center to illuminate other planets.
- Each planet and moon is created from the same geometry but scaled based on realistic ratios.
- Orbits are simulated using trigonometric rotation around the Sun.
- Left-click + drag → Rotate camera.
- Scroll → Zoom in/out.
- Right-click + drag → Pan view.
Manish
Computer Science Student | Web Developer
This project is open-source and available under the MIT License.
