This project is an interactive solar system simulation that allows users to explore and learn about various celestial bodies in our solar system. The simulation is built using HTML5 Canvas and JavaScript, providing a visually engaging and educational experience.
- Interactive 3D-like representation of the solar system
- Realistic orbital movements of planets and moons
- Zoom and pan functionality for detailed exploration
- Informative tooltips with facts and key features for each celestial body
- Adjustable animation speed
- Responsive design that works on various screen sizes
index.html
: The main HTML file that sets up the structure of the web pagesolarsystem.js
: The core JavaScript file containing the simulation logic and datastyles.css
: CSS file for styling the simulation and UI elements
- Ensure all files (
index.html
,solarsystem.js
, andstyles.css
) are in the same directory. - Open the
index.html
file in a modern web browser (Chrome, Firefox, Safari, or Edge recommended).
- Zoom: Use the mouse wheel to zoom in and out of the solar system.
- Pan: Click and drag the mouse to move around the solar system.
- View Information: Click on any celestial body to display a tooltip with facts and key features.
- Adjust Speed: Use the slider at the top of the screen to change the animation speed.
- Close Tooltip: Click the "Close" button or click anywhere outside the tooltip to resume the animation.
The solarSystemData
object in solarsystem.js
contains all the information about the celestial bodies. You can easily add, remove, or modify celestial bodies by editing this object.
This project uses pure JavaScript and doesn't require any external libraries or frameworks. It does use the 'Space Mono' font from Google Fonts, which is linked in the HTML file.
This simulation should work in all modern browsers that support HTML5 Canvas. For the best experience, use the latest version of Chrome, Firefox, Safari, or Edge.
- Add more celestial bodies, including asteroids and comets
- Implement a day/night cycle for planets
- Add options for different view modes (top-down, ecliptic plane, etc.)
- Include more detailed information and possibly link to external resources for each body
[Add your chosen license here]
[Your Name]
- NASA for providing factual information about celestial bodies
- [Any other acknowledgments or resources you used]