Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guilherme-marcello/js-webgl-solar-system-model
A Solar System Model written in Javascript using the WebGL API
https://github.com/guilherme-marcello/js-webgl-solar-system-model
javascript solar-system twgl webgl webgl-api
Last synced: 6 days ago
JSON representation
A Solar System Model written in Javascript using the WebGL API
- Host: GitHub
- URL: https://github.com/guilherme-marcello/js-webgl-solar-system-model
- Owner: guilherme-marcello
- License: mit
- Created: 2023-11-30T11:24:50.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2023-12-03T23:00:37.000Z (12 months ago)
- Last Synced: 2024-11-10T17:07:50.289Z (6 days ago)
- Topics: javascript, solar-system, twgl, webgl, webgl-api
- Language: HTML
- Homepage:
- Size: 22.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Solar System Viewer
## Description
Solar System Viewer is a simple HTML-based project that allows you to explore the solar system in a basic 3D environment. The project utilizes WebGL for rendering and includes a set of interactive features to enhance user experience.
## Features
- View the solar system in 3D.
- Navigate around the target using WASD and arrow keys.
- Toggle the drawing of moons on and off (M).
- Toggle the drawing of planet's orbits on and off (O).
- Pause/resume the animation with Enter or Space.
- Adjust the animation speed with X (increase) and Z (decrease).
- Switch between Gouraud and Phong shading techniques using B.
- Enable/disable ambient (7), diffuse (8), and specular (9) components of lighting.## Celestial Bodies
The project includes the following celestial bodies, all with orbital times up to the defined time scale (default: 1200 seconds per 365 days):- Sun
- Mercury
- Venus
- Earth
- Moon
- Mars
- Jupiter
- Io
- Europa
- Ganymede
- Callisto
- Saturn
- Titan
- Uranus
- Neptune
- Triton
- Pluto
- Charon## Installation
1. Launch the project:
Open `main.html` in a modern web browser.
## Folder Structure
* main.html: The main HTML file for the project.
* textures: Directory containing textures for planets, moons, etc. (JPEG, PNG, etc.).
* libs: Directory containing JavaScript libraries used in the project.
* celestial.js:
- celestial-full.js: Code defining celestial bodies and their features.
* space.js:
- space-full.js: Code with handlers for movement and keyboard interactions.
* twgl.js/:
- TWGL.js library, copied from the TWGL.js project.