This commit is contained in:
Flatlogic Bot 2025-09-12 14:48:06 +00:00
parent b687c8b765
commit c8e8c06fa2
3 changed files with 11 additions and 1 deletions

View File

@ -90,6 +90,7 @@ const marsData = createPlanet(0.7, 'mars.jpg', 20, 0.008);
const jupiterData = createPlanet(3, 'jupiter.jpg', 30, 0.004);
const saturnData = createPlanet(2.5, 'saturn.jpg', 40, 0.002);
const uranusData = createPlanet(2, 'uranus.jpg', 50, 0.001);
const neptuneData = createPlanet(1.9, 'neptune.jpg', 60, 0.0005);
// --- Saturn's Rings ---
const ringGeometry = new THREE.RingGeometry(3.5, 5, 64);
@ -104,7 +105,7 @@ ring.rotation.x = -Math.PI / 2.5; // Tilt the rings
saturnData.planet.add(ring);
const planets = [mercuryData, venusData, earthData, marsData, jupiterData, saturnData, uranusData];
const planets = [mercuryData, venusData, earthData, marsData, jupiterData, saturnData, uranusData, neptuneData];
// Planet Data
const planetData = {
@ -149,6 +150,12 @@ const planetData = {
mass: '8.681 × 10^25 kg',
radius: '25,362 km',
orbital_speed: '6.81 km/s',
},
[neptuneData.planet.uuid]: {
name: 'Neptune',
mass: '1.024 × 10^26 kg',
radius: '24,622 km',
orbital_speed: '5.43 km/s',
}
};
@ -190,6 +197,8 @@ statsButtons.addEventListener('click', (event) => {
planetUUID = saturnData.planet.uuid;
} else if (planetName === 'uranus') {
planetUUID = uranusData.planet.uuid;
} else if (planetName === 'neptune') {
planetUUID = neptuneData.planet.uuid;
}
if (planetUUID) {

BIN
assets/textures/neptune.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

View File

@ -16,6 +16,7 @@
<button data-planet="jupiter">Jupiter</button>
<button data-planet="saturn">Saturn</button>
<button data-planet="uranus">Uranus</button>
<button data-planet="neptune">Neptune</button>
</div>
<div id="stats-info"></div>
</div>