Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 28 additions & 15 deletions 3D Earth/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Correct 3D Animated Spherical Earth</title>
<title>3D Animated Spherical Earth</title>
<style>
body {
margin: 0;
Expand All @@ -21,7 +21,12 @@
height: 300px;
position: relative;
transform-style: preserve-3d;
animation: rotate 20s linear infinite;
animation: rotate 20s linear infinite; /* Continuous rotation */
}

.scene:hover {
animation-play-state: paused; /* Pause rotation on hover */
transform: scale(1.05); /* Slight zoom effect on hover */
}

.globe {
Expand All @@ -30,19 +35,30 @@
border-radius: 50%;
position: absolute;
transform-style: preserve-3d;
background: url('https://eoimages.gsfc.nasa.gov/images/imagerecords/57000/57735/land_ocean_ice_cloud_2048.jpg');
background-size: 200%;
background: url('https://eoimages.gsfc.nasa.gov/images/imagerecords/57000/57735/land_ocean_ice_cloud_2048.jpg') no-repeat center center;
background-size: cover;
box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.globe::before {
content: '';
.atmosphere {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 50%;
background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.4) 80%);
background: rgba(135, 206, 250, 0.5);
filter: blur(15px);
animation: pulse 3s infinite alternate; /* Pulsing effect */
pointer-events: none; /* Prevent mouse events on atmosphere */
}

@keyframes rotate {
0% { transform: rotateY(0deg); }
100% { transform: rotateY(360deg); }
}

@keyframes pulse {
0% { transform: scale(1); }
100% { transform: scale(1.1); }
}

.hemisphere {
Expand All @@ -56,19 +72,16 @@

.front { transform: translateZ(1px); }
.back { transform: rotateY(180deg) translateZ(1px); }

@keyframes rotate {
0% { transform: rotateY(0deg); }
100% { transform: rotateY(360deg); }
}
</style>
</head>
<body>
<div class="scene">
<div class="globe">
<div class="hemisphere front"></div>
<div class="hemisphere back"></div>
<div class="atmosphere"></div>
</div>
</div>
</body>
</html>
</html>