Užduotis:
Sukurk saulės sistemos modelį.
Interaktyvus saulės sistemos modelis
Sukūriau tau interaktyvų saulės sistemos modelį! Čia gali stebėti planetų judėjimą, tyrinėti jų charakteristikas ir valdyti animaciją.
Spustelėkite bet kurią planetą arba Saulę, kad sužinotumėte daugiau!
🌟 Įdomūs faktai apie saulės sistemą
🔥 Saulė
Sudaro 99,86 % visos saulės sistemos masės. Temperatūra centre siekia 15 milijonų laipsnių!
🌍 Žemės grupės planetos
Merkurijus, Venera, Žemė ir Marsas daugiausia sudaryti iš uolienų ir metalo.
🪐 Dujų milžinai
Jupiteris, Saturnas, Uranas ir Neptūnas daugiausia sudaryti iš dujų ir ledo.
⭐ Asteroidų žiedas
Tarp Marso ir Jupiterio yra tūkstančių akmeninių nuolaužų žiedas.

{
orbit.style.animationPlayState = 'paused';
});
btn.textContent = "Paleisti \u25b6\ufe0f";
btn.classList.add('paused');
} else {
solarSystem.style.animationPlayState = 'running';
solarSystem.querySelectorAll('.orbit').forEach(orbit => {
orbit.style.animationPlayState = 'running';
});
btn.textContent = "Pause \u23f8\ufe0f";
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 = "Rodyti orbitas \u2b55";
} else {
solarSystem.classList.remove('hide-orbits');
btn.textContent = "Orbitos \ud83d\udd18";
}
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;">