Getting Started
Start a new project in 3DE. Choose the 3D starter project (with Animation) template from the menu. Then save it with the name Moon Phases.
Before coding, letâs dial down the brightness of the ambient light thatâs automatically added to our scene.
â | âvarâ scene = ânewâ THREE.Scene(); |
â | âvarâ flat = {flatShading: âtrueâ}; |
» | âvarâ light = ânewâ THREE.AmbientLight(â'white'â, 0.1); |
â | scene.add(light); |
There is some ambient light in spaceâespecially that reflected light near planets and moons. But nearly all of the light in the solar system comes from the Sun. Weâll add the Sun shortly.
In addition to changing the light, letâs also switch to an orthographic camera. When we talked about these ...
Get 3D Game Programming for Kids, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.