Game Development Reference
In-Depth Information
Hello, Three.js
This chapter will take you from zero to sixty with a new Three.js project. We'll cover
what Three.js is, how to get started with writing code for it, and the components of a
basic scene.
The wonderful world of Three.js
Three.js is a JavaScript library that simplifies displaying 3D graphics in web browsers.
Artists, major brands, and many others are increasingly using Three.js to power
immersive online experiences that can reach millions of people across many platforms.
There are many inspiring demos of the technology at
http://threejs.org/
.
Three.js is usually used with a new technology called
WebGL
, a JavaScript API
for rendering graphics without plugins. The API is based on
OpenGL
, a desktop
graphics API
(GL
stands for
graphics library
). Because it uses the client's graphics
processing unit to accelerate rendering, WebGL is fast! However, many mobile
browsers as well as Internet Explorer 10 and below do not support WebGL.
Luckily, Three.js supports rendering with the
HTML5 Canvas API
as well as
other technologies such as
Scalable Vector Graphics
instead.
You can find up-to-date information on browser
support at
http://caniuse.com/webgl
.