O'Reilly logo

Beginning Facebook Game Apps Development by Wayne Graham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Canvas: The 2D Context

The canvas element in HTML is a complex beast. The specification was originally meant to cover both two- and three-dimensional contexts. However, as of the writing of this book, the 3D context was split from the original specification and reorganized under a new specification named WebGL. If you are working in three-dimensional space, you will use the “webgl” context, and if you are working in two-dimensional space, you will use the “2d” context. The webgl context is developing quite quickly, and there are some absolutely beautiful examples of using the 3D context on the web. However, its use in HTML5 games lags behind the 2D context by quite a lot. Not only are browsers still working on the implementations and details ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required