3D without plugins in your browser with JavaScript: three.js

3D without plugins in your browser with JavaScript: three.js

Until very recently, we needed plugins to perform tasks that now seem trivial to us: playing sound, watching videos, even the simplest button animation. But this is changing; the evolution of browsers is frantic, and the upcoming release of the final HTML5 and CSS3 specifications and other standards (currently drafts) makes us think that we will soon have a new revolution on the web. This will allow creatives to unleash their imagination without clashing with usability, accessibility, and SEO, as has been the case until now.

In a new demonstration of the possibilities of standards, mrdoob provides us with a framework written entirely in JavaScript for 3D object manipulation. This frees us from the burden of performing many of the calculations necessary for something as simple as generating perspective based on camera positioning. We simply have to worry about placing the objects and the camera on our canvas to start playing with 3D in our browser. three.js is capable of working on canvas (a mode supported by IE9, Safari 4, FF4, Chrome) and using WebGL, a specification that allows the browser to use the graphics card (GPU) to render the scene, with the resulting improvement in speed and graphic quality (supported by Chrome and FF4). It is almost obvious to say that canvas mode has limitations regarding the use of textures, lights, and particle systems. But it is perfectly functional for many applications.