You are previewing Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL.

Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL

Cover of Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL by James L. Williams Published by Addison-Wesley Professional
O'Reilly logo

7. Creating Games with WebGL and Three.js

In previous chapters, we took great pains to learn the hard way first before diving into libraries and frameworks that make our coding life simpler. WebGL is a beast. Based on OpenGL ES 2.0, which itself is a simplification of the much older Open GL API, it’s still rather large. Although it stands to reason that one might use Canvas 2D or SVG without the benefit of a framework, the same is not the case with WebGL. There are many concerns to be taken into account, including lighting, texturing, depth of field, particle systems, and collision detection and response, that make operating without a framework much like walking a tight rope without a net. The framework we will be using extensively in this chapter ...

The best content for your career. Discover unlimited learning on demand for around $1/day.