import EarthSpinner from './EarthSpinner';
function App() {
return (
<div className="App">
<EarthSpinner />
</div>
);
}
export default App;
Features
Realistic Earth texture with normal and specular maps
Smooth rotation animation
Orbit controls to interact with the Earth (zoom, pan, rotate)
Responsive design that adapts to window size
Proper cleanup when component unmounts
Customization Options
You can customize this component by:
Changing the rotation speed by modifying the earth.rotation.y += 0.002 value
Adjusting the camera position by changing camera.position.z = 5
Adding more textures or changing the existing ones
Modifying the lighting parameters
For a simpler version without Three.js, you could use CSS animations with a 2D image, but this 3D version provides a much more realistic and interactive experience.