Three.js allows the creation of graphical processing unit (GPU)-accelerated 3D animations using the JavaScript language as part of a website without relying on proprietary browser plugins.[4][5] This is possible due to the advent of WebGL,[6] a low-level graphics API created specifically for the web.[7]
High-level libraries such as Three.js, Babylon.js, Verge3D and many more make it possible to author complex 3D computer animations for display in the browser without the effort required for a traditional standalone application or a plugin.[8]
History
Three.js was first released by Ricardo Cabello on GitHub in April 2010.[2] The origins of the library can be traced back to his involvement with the demoscene in the early 2000s.[9] The code was originally developed in the ActionScript language used by Adobe Flash, later being ported to JavaScript in 2009. In Cabello's mind, there were two strong points that justified the shift away from ActionScript: Firstly, JavaScript provided greater platform independence. Secondly, applications written in JavaScript would not need to be compiled by the developer beforehand, unlike Flash applications.
Additional contributions by Cabello include API design, CanvasRenderer, SVGRenderer, and being responsible for merging the commits by the various contributors into the project.
With the advent of WebGL, Paul Brunt was able to implement the new rendering technology quite easily as Three.js was designed with the rendering code as a module rather than in the core itself.[10] Branislav Uličný, an early contributor, started with Three.js in 2010 after having posted a number of WebGL demos on his own site. He wanted WebGL renderer capabilities in Three.js to exceed those of CanvasRenderer or SVGRenderer.[10] His major contributions generally involve materials, shaders, and post-processing.
Soon after the introduction of WebGL 1.0 on Firefox 4 in March 2011, Joshua Koo came on board. He built his first Three.js demo for 3D text in September 2011.[10] His contributions frequently relate to geometry generation.
Starting from version 118, Three.js uses WebGL 2.0 by default. Older version of the standard is still available via WebGL1Renderer class.[11]
Three.js has over 1950 contributors on GitHub.[12]
Physically based rendering (PBR): support for physically accurate materials like MeshStandardMaterial and MeshPhysicalMaterial[18][19]
Instancing: use of InstancedMesh for efficient rendering of thousands of repeated objects[20]
Post-processing: built-in post-processing pipeline with effects such as bloom, depth of field, outline, motion blur, SSAO, and FXAA[21][22]
Built-in editor: graphical scene editor available online for building and exporting 3D scenes[23]
Interactive controls: built-in controls such as OrbitControls, DragControls, TransformControls, and PointerLockControls for user interaction and navigation[24][25]
Alternative renderers: in addition to WebGLRenderer,[26] Three.js also provides SVGRenderer[27] and CSS3DRenderer,[28] as well as experimental support for WebGPURenderer.
Three.js runs in all browsers with support for WebGL 1.0 or WebGL 2.0.
Parisi, Tony (2012). Webgl Up and Running. Sebastopol: Oreilly & Associates Inc. ISBN9781449323578.
Seidelin, Jacob (2012). HTML5 games : creating fun with HTML5, CSS3, and WebGL. Chichester, West Sussex, U.K: John Wiley & Sons. pp. 412–414. ISBN978-1119975083. - "Three.js can make game development easier by taking care of low-level details"