An interactive 3D Earth visualization with realistic textures, atmospheric glow, and dynamic starfield background built with Three.js.
- Multi-Layer Earth Model - Surface, bump, specular, cloud, and atmospheric layers.
- Custom Shader Effects - Fresnel-based atmospheric scattering simulation.
- Procedural Starfield - Dynamically generated 3D star background.
- Real-time Interactions - Orbit controls for rotation/zoom.
- Responsive Design - Auto-adjusts to screen size/resolution.
- Performance Optimized - Efficient buffer geometry and instancing.
-
Clone the repository:
git clone https://github.com/ketan1406/threejs-earth.git
-
Install dependencies:
cd threejs-earth && npm install
-
Start the development server:
npm run dev
- Three.js - Core 3D rendering engine.
- Vite - Build tool & dev server.
- GLSL - Custom shader programming.
- OrbitControls - Camera interaction.
- gh-pages - Automated deployment.
threejs-earth/
├── public/
│ └── textures/ # Earth surface & cloud maps
├── src/
│ ├── getFresnelMat.js # Atmospheric shader logic
│ ├── getStarfield.js # 3D starfield generator
│ └── index.js # Main scene setup
└── vite.config.js # Build configuration