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

Bridging Facebook with WebGL


This first demonstration is a start-to-finish example of how you can grab your own Facebook image and texture it onto a flat plane with WebGL. Along the way, we will be confronted by several technical issues and solutions that will also be instructive.

Prepare for lift off

To create a Facebook application, we need our own server to host the application and register it with Facebook. It might be rather obvious, but be sure that you are logged in to Facebook first. Begin with Facebook's developer site at https://developers.facebook.com. Navigate to Apps | Create a New App. We will be asked for an app name or website, in which case I simply used my website address. The Namespace field is optional, but it is recommended that we select the closest choice from the selection box. Since nothing really matched—after all, Facebook in 3D is ahead of its time—I selected Communication. Facebook uses this information to catalog applications written by developers.

Creating a new...