There are many WebGL frameworks that are available to abstract away the lower-level application programming interface (API) calls that we have covered in the first six chapters of the book. This abstraction helps to make WebGL development easier and more productive. We will discuss several WebGL frameworks in the next chapter. In this chapter we will concentrate on one of the most widely used frameworks — Three.js. We will cover the following:
  • A background of the library

  • How to start development with Three.js

  • Falling back to a 2D canvas context for rendering if WebGL is not supported

  • Three.js API calls to easily create cameras, objects, and use lighting models

  • Show the equivalent Three.js code to some examples found in previous chapters, which used direct low-level WebGL API calls

  • Introduce tQuery, a library that blends Three.js with jQuery selectors


Application Programming Interface Triangular Prism Custom Mesh Scene Object Geometry Object 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Brian Danchilla 2012

Authors and Affiliations

  • Brian Danchilla

There are no affiliations available

Personalised recommendations