Book Image

WebGL Game Development

By : Sumeet Arora
Book Image

WebGL Game Development

By: Sumeet Arora

Overview of this book

<p>WebGL, the web implementation of Open GL, is a JavaScript API used to render interactive 3D graphics within any compatible web browser, without the need for plugins. It helps you create detailed, high-quality graphical 3D objects easily. WebGL elements can be mixed with other HTML elements and composites to create high-quality, interactive, creative, innovative graphical 3D objects.</p> <p>This book begins with collecting coins in Super Mario, killing soldiers in Contra, and then quickly evolves to working out strategies in World of Warcraft. You will be guided through creating animated characters, image processing, and adding effects as part of the web page canvas to the 2D/3D graphics. Pour life into your gaming characters and learn how to create special effects seen in the most powerful 3D games. Each chapter begins by showing you the underlying mathematics and its programmatic implementation, ending with the creation of a complete game scene to build a wonderful virtual world.</p>
Table of Contents (17 chapters)
WebGL Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


This chapter focused on making our code capable to handle the loading and rendering of multiple objects. The other important aspect we covered in this chapter was the use of stacks to maintain the state of mvMatrix for object transformation operations and rendering.

The other major code update was addition of the rendering of our scene at a predefined frame rate. We also learned about positional lights and how to handle multiple lights in any scene. Also keep in mind that using lights in a scene is a GPU-intensive operation and if you have added a specular component to your light, then the calculations become more intensive. The overall performance of your game will depend on the intelligent use of lights in your scene.

We will play more with textures in our next chapter and will learn how to beautify the scenes even more.