A visually engaging interactive 3D planets scene built using Three.js and Tailwind CSS.
Explore animated planets, smooth rotations, and immersive space visuals — perfect for learning WebGL, Three.js, and modern frontend 3D development. 🌍🌕🪐
- ✨ Beautiful 3D planet visuals
- 🔄 Smooth rotation animations
- 🎥 Interactive camera controls
- 📱 Responsive design with Tailwind CSS
- ⚡ Lightweight and performant
- 🛠️ Easy to customize and extend
| Tech | Purpose |
|---|---|
| Three.js | 3D rendering & animations |
| Tailwind CSS | UI styling |
| Vite (optional) | Fast development & bundling |
| HTML, CSS, JS | Core frontend |
3D-Planets
├── index.html
├── package.json
├── tailwind.config.js
├── postcss.config.js
├── src/
│ ├── js/
│ │ └── main.js
│ └── styles/
│ └── input.css
├── dist/
│ └── output.css
└── README.md
- Node.js installed
- npm installed
Clone the repository:
git clone https://github.com/AMANkumar0004/3D-Planets.gitMove into the project folder:
cd 3D-PlanetsInstall dependencies:
npm installAdd Tailwind directives inside:
src/input.css
@tailwind base;
@tailwind components;
@tailwind utilities;Run Tailwind build:
npm run buildOpen index.html in your browser.
Deploy easily on:
- Vercel
- Netlify
- GitHub Pages
Build Command: npm run build
Output Directory: dist
- Three.js creates the 3D scene
- Planets use sphere geometry + textures
- Animation loop handles rotation
- Camera controls allow interaction
"scripts": {
"build": "tailwindcss -i ./src/input.css -o ./dist/output.css --watch",
"start": "vite"
}Live: https://3-d-planets-pied.vercel.app/
- Fork the repo
- Make changes
- Open a Pull Request
MIT License