Book Image

WebGL HOTSHOT

By : Mitch Williams
Book Image

WebGL HOTSHOT

By: Mitch Williams

Overview of this book

Table of Contents (17 chapters)
WebGL HOTSHOT
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction to WebGL


In the previous project, we learned to use X3D, which declares the location of items in 3D space, including that of lights and the camera. There were additional JavaScript libraries to read (parse) X3D that links directly to WebGL. X3D is a great file format to learn 3D concepts. I regularly taught classes on X3D to students in high schools and post-graduate courses at the University of California. However, WebGL gets us closer to 3D technology and gives us more direct access to the graphics card, and offers more capabilities to control the imagery.

WebGL uses JavaScript programming in a regular HTML web page. It eventually loads the 3D models to the graphics card to draw (render) 3D scenes. Many applications can use either X3D, which is a file format, or WebGL, which involves JavaScript programming; I have had projects where I switched back and forth between the two. X3D was preferred when I had multiple transforms, such as the Earth in the Solar System demonstration...