Skip to content

Deedsogado/EarthMoon

Repository files navigation

EarthMoon

3D model of earth and moon

Created using HTML, CSS, Javascript, and WebGL shaders

Controls

Press spacebar to toggle animation. Can still rotate with mouse. Does not save laptop power. Press backspace to toggle program running. Cannot rotate using mouse. Saves laptop power.

Press A to go to default view (psuedo-isomorphic) Press I to spin camera around y-axis. Press R to reset camera (undo mouse drags).

Press x to look down x-axis from positive direction. Press y to look down y-axis from positive direction. Press z to look down z-axis from positive direction.

Press shift + X to look down x-axis from negative direction. Press shift + Y to look down y-axis from negative direction. Press shift + Z to look down z-axis from negative direction.

Click and drag mouse to rotate earth. Only works in Modes "A" and "I". Click mouse once to repeat the same rotation that you used in the last click-and-drag. Scroll mouse wheel to zoom in and out.

Extras / Features:

Correct day night cycles. In sunlight, you can see the surface of the earth.
In darkness, you can see city lights.

Correct Moon rotation. Moon orbits earth once every 27 days. Same side of moon always faces earth.
alt text

About

3D model of earth and moon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published