Skip to content

Harman8815/Earth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ Description

This GitHub repository contains the source code for a 3D Earth Visualization Website built using Three.js. The website features a rotating Earth with dynamic controls, allowing users to adjust rotation speed, planet tilt, star count, and more! ๐ŸŒŸ The planet's surface, clouds, and city lights are rendered with realistic textures, and a starfield surrounds the Earth for added visual appeal. ๐ŸŒŒ

Live demo of the project is hosted on Netlify. ๐Ÿš€

๐ŸŒ Demo

Check out the live demo of the project here:

Earth Demo on Netlify ๐ŸŒ

๐Ÿ–ผ๏ธ Preview

Earth Preview Earth Preview-2

๐Ÿคต Owner

๐Ÿš€ Technologies Used

โš™๏ธ Setup Instructions

Prerequisites:

  • Clone the repository to your local machine:
    git clone https://github.com/Harman8815/earth-project.git
  • Navigate to the project directory:
    cd earth-project
  • Install dependencies:
    npm install

Run the Development Server:

  • Start the local server:
    npm run dev
  • Open your browser and go to http://localhost:3000.

๐Ÿ“ฒ Features

  • ๐ŸŒ 3D Earth Visualization with textures for the surface, clouds, and city lights.
  • โœจ Starfield with dynamic star count (up to 20,000 stars).
  • ๐ŸŽฎ Interactive Controls using lil-gui to adjust:
    • ๐ŸŒ  Number of stars
    • ๐ŸŒ€ Rotation speed of the Earth
    • ๐ŸŒŽ Tilt angle of the Earth
    • ๐ŸŒŸ Glow effect around the planet
  • ๐Ÿ”„ Smooth camera movement using OrbitControls.
  • ๐Ÿ–ฅ๏ธ Responsive Design: The website automatically adjusts to different screen sizes.

๐Ÿ•น๏ธ How to Use

  1. ๐ŸŒ Open the Earth Visualization website in your browser.
  2. ๐ŸŽจ Adjust the settings using the GUI Panel:
    • ๐ŸŒŸ Change the stars count.
    • ๐Ÿ”„ Adjust the planet rotation speed.
    • ๐ŸŒŽ Modify the planet's tilt angle.
    • ๐ŸŒŸ Change the glow effect around Earth.
  3. ๐ŸŒ€ Watch the Earth rotate in real-time with the settings you've configured.

๐Ÿ› ๏ธ Build & Deployment

  1. Build the project for production:

    npm run build
  2. Deploy the earth_output folder to a hosting service like Netlify.

๐Ÿ“ File Structure

  • index.html: The entry point of the project.
  • main.js: JavaScript file containing Three.js logic and rendering.
  • textures/: Folder containing textures for the Earth's surface, clouds, and city lights.
  • earth_output/: Folder containing the built version of the project, used for deployment.

๐Ÿง‘โ€๐Ÿ’ป Contributing

Feel free to fork the repository, make changes, and submit pull requests. Contributions are welcome! ๐Ÿ™Œ

About

๐Ÿช 3D Earth using Three.js ๐ŸŽฎ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published