Lights, camera, action!

"Lights, camera, action!" is an old Hollywood phrase to start filming, but it is just as applicable to interactive 3D graphics. So, let's add lights, cameras, and interactivity to our X3D scenes.

Lights, camera, action!

Engage thrusters

This scene retains the first two objects created previously and adds a point light that can be thought of as a light bulb—a light from a single point emanating in all directions. We turned off the headlight inside the <NavigationInfo> tag, and at the same time, restricted movement in the scene by setting type to NONE, simply to introduce this as part of the demo. At the same time, the <Viewpoint> tag or camera is introduced ...

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.