Skip to content

Tryhard-source/ThreeEarth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌍 Arush Earth

A realistic 3D Earth model made with Three.js, including atmosphere glow, rotating clouds, sunlight, and a galaxy of stars.

This project is all about learning 3D graphics with JavaScript, having fun with space visuals, and improving it over time!


🔭 Features

Realistic Earth with:

  • 🌐 Surface texture
  • ✨ Specular (reflective) map
  • 🗻 Bump map (for terrain depth)
  • ☁️ Rotating cloud layer with transparency
  • 🌃 Night lights visible on the dark side
  • 🌈 Custom Fresnel shader for glow/atmosphere
  • 🌌 Starfield with 3D depth and soft light dots
  • 🎮 Interactive camera with orbit controls
  • 🎨 ACES Filmic tone mapping and linear color space

🕹️ How to Use

  1. Download or clone the repo.
  2. Open index.html in a browser using a local server
    (e.g. with VS Code Live Server or npx serve .)
  3. Use your mouse to rotate, zoom, and explore the Earth.
  4. Watch as the Earth slowly spins and stars move in the background.

🗂️ File Structure

.
├── index.html                # Main entry point
├── index.js                 # Sets up the 3D scene and animation
├── /src
│   ├── getFresnelMat.js     # Custom shader material for atmospheric glow
│   └── getStarfield.js      # Creates star points around the Earth
├── /textures
│   ├── 00_earthmap1k.jpg              # Main Earth surface texture
│   ├── 01_earthbump1k.jpg             # Bump map for terrain
│   ├── 02_earthspec1k.jpg             # Specular map for reflectivity
│   ├── 03_earthlights1k.jpg           # Night side city lights
│   ├── 04_earthcloudmap.jpg           # Cloud texture
│   ├── 05_earthcloudmaptrans.jpg      # Alpha map for clouds
│   └── /stars/circle.png              # Star texture image
└── README.md

🛠️ Technologies Used

  • Three.js — for all 3D rendering
  • GLSL — custom shaders for atmospheric glow
  • OrbitControls — to move around the scene
  • JavaScript ES Modules — for modern code structure

🚀 Future Improvements

  • 🌕 Add Moon orbiting Earth
  • 🌓 Show real-time Earth shadow depending on sun angle
  • 🌫️ Add atmosphere blur shader
  • 🌠 Animate stars slowly twinkling
  • 🗺️ Show info labels on continents

👨‍💻 Author

Made by Arush Diwakar — Age 13
Learning 3D graphics, shaders, and web development for fun!


About

ThreeEarth, is a 3D Scene, created by the THREE.JS library of Javascript, which consists of Frensel Material, The Earth Map, and Star Field.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors