Interaktivni model sončnega sistema

Naloga:

Zgradi model sončnega sistema.

Interaktivni model sončnega sistema

Zate sem ustvaril interaktivni model sončnega sistema! Tukaj lahko opazuješ gibanje planetov, raziskuješ njihove značilnosti in upravljaš animacijo.

1x
Sonce
Merkur
Venera
Zemlja
Mars
Asteroidni pas
Jupiter
Saturn
Uran
Neptun

Izberi nebesno telo

Klikni na kateri koli planet ali Sonce, da izveš več o njih!

🌟 Zanimiva dejstva o sončnem sistemu

🔥 Sonce

Vsebuje 99,86 % celotne mase sončnega sistema. Temperatura v središču doseže 15 milijonov stopinj!

🌍 Terestrični planeti

Merkur, Venera, Zemlja in Mars so sestavljeni predvsem iz kamnin in kovin.

🪐 Plinski velikani

Jupiter, Saturn, Uran in Neptun so sestavljeni predvsem iz plina in ledu.

⭐ Asteroidni pas

Med Marsom in Jupitrom se nahaja pas s tisoči kamnitih ostankov.

{ orbit.style.animationPlayState = 'paused'; }); btn.textContent = "\u25b6\ufe0f Predvajaj"; btn.classList.add('paused'); } else { solarSystem.style.animationPlayState = 'running'; solarSystem.querySelectorAll('.orbit').forEach(orbit => { orbit.style.animationPlayState = 'running'; }); btn.textContent = "\u23f8\ufe0f Premor"; btn.classList.remove('paused'); } isPlaying = !isPlaying; }; window.toggleOrbits = function() { const solarSystem = document.getElementById('solarSystem'); const btn = document.getElementById('orbitToggleBtn'); if (!solarSystem || !btn) return; if (showOrbits) { solarSystem.classList.add('hide-orbits'); btn.textContent = "\u2b55 Prika\u017ei orbite"; } else { solarSystem.classList.remove('hide-orbits'); btn.textContent = "\ud83d\udd18 Orbite"; } showOrbits = !showOrbits; }; window.changeSpeed = function(speed) { const speedValue = document.getElementById('speedValue'); const solarSystem = document.getElementById('solarSystem'); if (!speedValue || !solarSystem) return; animationSpeed = parseFloat(speed); speedValue.textContent = speed + 'x'; solarSystem.querySelectorAll('.orbit').forEach((orbit, index) => { const baseDuration = [10, 15, 20, 30, 60, 90, 120, 165][index] || 20; orbit.style.animationDuration = (baseDuration / animationSpeed) + 's'; }); }; window.resetAnimation = function() { const solarSystem = document.getElementById('solarSystem'); if (!solarSystem) return; solarSystem.querySelectorAll('.orbit').forEach(orbit => { orbit.style.animation = 'none'; }); setTimeout(() => { solarSystem.querySelectorAll('.orbit').forEach((orbit, index) => { orbit.style.animation = ''; const baseDuration = [10, 15, 20, 30, 60, 90, 120, 165][index] || 20; orbit.style.animationDuration = (baseDuration / animationSpeed) + 's'; }); }, 10); }; window.showPlanetInfo = function(planetId) { const panel = document.getElementById('planetInfoPanel'); const nameEl = document.getElementById('planetName'); const detailsEl = document.getElementById('planetDetails'); if (!panel || !nameEl || !detailsEl) return; const planet = planetData[planetId]; if (planet) { nameEl.textContent = planet.name; detailsEl.innerHTML = '

' + planet.details + '

'; panel.classList.add('active'); } }; window.closePlanetInfo = function() { const panel = document.getElementById('planetInfoPanel'); if (panel) { panel.classList.remove('active'); } }; // Инициализация setTimeout(() => { changeSpeed(1); }, 100); })()" style="display: none;">
Besedilo kopirano
Končano
Napaka