تکلیف:
یک مدل از منظومه شمسی بساز.
مدل تعاملی منظومه شمسی
من یک مدل تعاملی از منظومه شمسی برایت ساختم! اینجا میتوانی حرکت سیارات را تماشا کنی، ویژگیهایشان را بررسی کنی و انیمیشن را کنترل کنی.
روی هر سیاره یا خورشید کلیک کنید تا اطلاعات بیشتری درباره آنها بدانید!
🌟 حقایق جالب درباره منظومه شمسی
🔥 خورشید
شامل ۹۹.۸۶٪ از کل جرم منظومه شمسی است. دما در مرکز آن به ۱۵ میلیون درجه میرسد!
🌍 سیارات سنگی
عطارد، زهره، زمین و مریخ عمدتاً از سنگ و فلز ساخته شدهاند.
🪐 غولهای گازی
مشتری، زحل، اورانوس و نپتون عمدتاً از گاز و یخ تشکیل شدهاند.
⭐ کمربند سیارکها
بین مریخ و مشتری کمربندی از هزاران قطعه سنگی وجود دارد.

{
orbit.style.animationPlayState = 'paused';
});
btn.textContent = "\u25b6\ufe0f \u067e\u062e\u0634";
btn.classList.add('paused');
} else {
solarSystem.style.animationPlayState = 'running';
solarSystem.querySelectorAll('.orbit').forEach(orbit => {
orbit.style.animationPlayState = 'running';
});
btn.textContent = "\u23f8\ufe0f \u062a\u0648\u0642\u0641";
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 \u0646\u0645\u0627\u06cc\u0634 \u0645\u062f\u0627\u0631\u0647\u0627";
} else {
solarSystem.classList.remove('hide-orbits');
btn.textContent = "\ud83d\udd18 \u0645\u062f\u0627\u0631\u0647\u0627";
}
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;">