Тапсырма:
Күн жүйесінің моделін құрастыр.
Күн жүйесінің интерактивті моделі
Мен сен үшін күн жүйесінің интерактивті моделін жасадым! Мұнда сен планеталардың қозғалысын бақылап, олардың сипаттамаларын зерттеп, анимацияны басқара аласың.
Олар туралы толығырақ білу үшін кез келген планетаны немесе Күнді басыңыз!
🌟 Күн жүйесі туралы қызықты деректер
🔥 Күн
Күн жүйесінің барлық массасының 99.86%-ын құрайды. Орталығындағы температура 15 миллион градусқа жетеді!
🌍 Жер тобындағы планеталар
Меркурий, Шолпан, Жер және Марс негізінен тас пен металдан тұрады.
🪐 Газ гиганттары
Юпитер, Сатурн, Уран және Нептун негізінен газ бен мұздан тұрады.
⭐ Астероидтар белдеуі
Марс пен Юпитер арасында мыңдаған тас сынықтарынан тұратын белдеу орналасқан.

{
orbit.style.animationPlayState = 'paused';
});
btn.textContent = "\u25b6\ufe0f \u041e\u0439\u043d\u0430\u0442\u0443";
btn.classList.add('paused');
} else {
solarSystem.style.animationPlayState = 'running';
solarSystem.querySelectorAll('.orbit').forEach(orbit => {
orbit.style.animationPlayState = 'running';
});
btn.textContent = "\u23f8\ufe0f \u041a\u0456\u0434\u0456\u0440\u0456\u0441";
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 \u041e\u0440\u0431\u0438\u0442\u0430\u043b\u0430\u0440\u0434\u044b \u043a\u04e9\u0440\u0441\u0435\u0442\u0443";
} else {
solarSystem.classList.remove('hide-orbits');
btn.textContent = "\ud83d\udd18 \u041e\u0440\u0431\u0438\u0442\u0430\u043b\u0430\u0440";
}
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;">