Creating an animated Solar System with multiple cameras for navigation

We conclude this 3D graphics overview with our first application, a Solar System with several cameras and planets undergoing multiple animations. First, we will look at the organization of these objects in a condensed version of the X3D code (the <IndexedFaceSet> node in the Earth was removed from here since it consists of thousands of values).

Engage thrusters

Earth comprises of three <Transform> nodes for its rotation around the Sun, the seasons, and the 24-hour day. Note that in the Earth's outermost transformation, center (0, 0, 10) is at the same distance from the Sun as the Earth's translation (0, 0, -10). This is because the center of the Earth's yearly rotation is the ...

Get WebGL HOTSHOT 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.