Zadanie:
Postav model slnečnej sústavy.
Interaktívny model slnečnej sústavy
Vytvoril som pre teba interaktívny model slnečnej sústavy! Tu môžeš sledovať pohyb planét, študovať ich vlastnosti a ovládať animáciu.
Kliknite na ľubovoľnú planétu alebo Slnko, aby ste sa o nich dozvedeli viac!
🌟 Zaujímavé fakty o slnečnej sústave
🔥 Slnko
Obsahuje 99,86 % celkovej hmotnosti slnečnej sústavy. Teplota v jadre dosahuje 15 miliónov stupňov!
🌍 Terestriálne planéty
Merkúr, Venuša, Zem a Mars sa skladajú prevažne z hornín a kovov.
🪐 Plynní obri
Jupiter, Saturn, Urán a Neptún sa skladajú prevažne z plynu a ľadu.
⭐ Pásmo asteroidov
Medzi Marsom a Jupiterom sa nachádza pás tisícov kamenných úlomkov.

{
orbit.style.animationPlayState = 'paused';
});
btn.textContent = "\u25b6\ufe0f Spusti\u0165";
btn.classList.add('paused');
} else {
solarSystem.style.animationPlayState = 'running';
solarSystem.querySelectorAll('.orbit').forEach(orbit => {
orbit.style.animationPlayState = 'running';
});
btn.textContent = "\u23f8\ufe0f Pauza";
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 Zobrazi\u0165 obe\u017en\u00e9 dr\u00e1hy";
} else {
solarSystem.classList.remove('hide-orbits');
btn.textContent = "\ud83d\udd18 Obe\u017en\u00e9 dr\u00e1hy";
}
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;">