Three.js
Lua error in package.lua at line 80: module 'strict' not found.
300px
Screen captures of Three.js examples
|
|
Original author(s) | Ricardo Cabello (Mr.doob) |
---|---|
Developer(s) | Three.js Authors[1] |
Initial release | April 24, 2010[2] |
Stable release | r75 / March 15, 2016 |
Development status | Active |
Written in | JavaScript |
Type | JavaScript library |
License | MIT[1] |
Website | threejs |
Three.js is a cross-browser JavaScript library/API used to create and display animated 3D computer graphics in a web browser. Three.js uses WebGL. The source code is hosted in a repository on GitHub.
Contents
Overview
Three.js allows the creation of GPU-accelerated 3D animations using the JavaScript language as part of a website without relying on proprietary browser plugins.[3][4] This is possible thanks to the advent of WebGL.[5]
High-level libraries such as Three.js or GLGE, SceneJS, PhiloGL or a number of other libraries make it possible to author complex 3D computer animations that display in the browser without the effort required for a traditional standalone application or a plugin.[6]
History
Three.js was first released by Ricardo Cabello to GitHub in April 2010.[2] The origins of the library can be traced back to his involvement with the demoscene in the early 2000s. The code was first developed in ActionScript, then in 2009 ported to JavaScript. In Cabello's mind, the two strong points for the transfer to JavaScript were not having to compile the code before each run and platform independence. With the advent of WebGL, Paul Brunt was able to add the renderer for this quite easily as Three.js was designed with the rendering code as a module rather than in the core itself.[7] Cabello's contributions include API design, CanvasRenderer, SVGRenderer and being responsible for merging the commits by the various contributors into the project.
The second contributor in terms of commits, Branislav Ulicny 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.[7] His major contributions generally involve materials, shaders and post-processing.
Soon after the introduction of WebGL on Firefox 4 in March 2011, Joshua Koo came on board. He built his first Three.js demo for 3D text in September 2011.[7] His contributions frequently relate to geometry generation.
There are over 390 contributors in total.[7]
Features
Three.js includes the following features:[8]
- Effects: Anaglyph, cross-eyed and parallax barrier.
- Scenes: add and remove objects at run-time; fog
- Cameras: perspective and orthographic; controllers: trackball, FPS, path and more
- Animation: armatures, forward kinematics, inverse kinematics, morph and keyframe
- Lights: ambient, direction, point and spot lights; shadows: cast and receive
- Materials: Lambert, Phong, smooth shading, textures and more
- Shaders: access to full OpenGL Shading Language (GLSL) capabilities: lens flare, depth pass and extensive post-processing library
- Objects: meshes, particles, sprites, lines, ribbons, bones and more - all with Level of detail
- Geometry: plane, cube, sphere, torus, 3D text and more; modifiers: lathe, extrude and tube
- Data loaders: binary, image, JSON and scene
- Utilities: full set of time and 3D math functions including frustum, matrix, quaternion, UVs and more
- Export and import: utilities to create Three.js-compatible JSON files from within: Blender, openCTM, FBX, Max, and OBJ
- Support: API documentation is under construction, public forum and wiki in full operation
- Examples: Over 150 files of coding examples plus fonts, models, textures, sounds and other support files
- Debugging: Stats.js,[9] WebGL Inspector,[10] Three.js Inspector[11]
Three.js runs in all browsers supported by WebGL.
Three.js is made available under the MIT license.[1]
Usage
The Three.js library is a single JavaScript file. It can be included within a web page by linking to a local or remote copy.
<script src="js/three.min.js"></script>
The following code creates a scene, adds a camera and a cube to the scene, creates a WebGL renderer and adds its viewport in the document.body element. Once loaded, the cube rotates about its X- and Y-axis.
<script>
var camera, scene, renderer,
geometry, material, mesh;
init();
animate();
function init() {
scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 10000 );
camera.position.z = 1000;
geometry = new THREE.BoxGeometry( 200, 200, 200 );
material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true } );
mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
}
function animate() {
requestAnimationFrame( animate );
render();
}
function render() {
mesh.rotation.x += 0.01;
mesh.rotation.y += 0.02;
renderer.render( scene, camera );
}
</script>
Selected Uses and Works
Lua error in package.lua at line 80: module 'strict' not found. The Three.js library is being used for a wide variety of applications and purposes. The following lists identify selected uses and works.
Mixed Media
- The Little Black Jacket, 2012, CHANEL's classic revisited by Karl Lagerfeld and Carine Roitfeld. An online exhibition displaying 113 pictures of celebrities photographed by Karl Lagerfeld.[12]
- Daftunes, 2012, an interactive sound visualizing project.[13][14]
- PlayPit, 2012[15]
- Rome the album | 3 Dreams in Black the film, 2011, produced by Chris Milk. "'3 Dreams of Black' is the trippiest WebGL interactive music video you've seen all day"[16][17][18]
- One Millionth Tower, 2011 - "It exists in a 3-D setting made possible by a JavaScript library called three.js, which lets viewers walk around the high-rise neighborhood." -[19]
- Ellie Goulding's Lights, 12 October 2011, "an interactive & colorful music video experience using webgl"[20][21][22]
- Hello Racer, 2011 - Awarded the FWA Site Of The Day for today, June 5, 2011[23][24]
- WebGL Reader, 2011[25]
- The Wilderness Downtown, 2010
Model Visualization and Scene Creation Applications
- 3D Gerber Viewer[26]
- Clara.io[27]
- Kuda[28]
- Our Bricks[29]
- P3D[30]
- repovizz[31]
- Shapesmith[32]
- Stackhack[33]
- Sunglass[34]
- ThingView[35]
- Three Fab[36]
- ThreeNodes[37]
- ThreeScene[38]
- Verold Studio[39]
- WebGL Craft[40]
- zb3D Grapher[41]
- SimLab Composer[42]
Game and Simulation Authoring Tools
Games
- Cubiverse - Voxel based games creation with user worlds scripted in JavaScript, 2015
- Cube - a game about Google Maps, 2012[45][46]
- Ocuara - a Survival Horror MMO Proof-of-concept, 2014[47]
- MafiaEmpires - a Mafia MMO, 2014[48]
- Tiny Shipping, 2012[49][50]
- Marble Soccer, 2012[51][52]
- Three.js Tetris, 2012[53][54]
- Trigger Rally, 2012[55][56]
- ChuClone, 2012[57][58][59]
- WebGL Zombies vs Cow, 2012[60][61]
- Pacmaze, 2011 - a FOSS multiplayer online 3D Pac-Man clone[62][63][64]
- Slimetribe - turn-based and RPG-like game experiment, 2012[65]
Education
- Interactive 3D Graphics - Massive Open Online Course, 2013[66]
- PhysGL.org (http://www.physgl.org) - JavaScript wrappers to three.js with an web-based IDE, to make 3D graphics easily accessible to students and teachers, 2012[67]
Community
Online IDEs with built-in support for Three.js are available at WebGL Playground,[68] HTML Snippet[69] and jsFiddle.[70] Documentation is available for the API[71] as well as general advice on the Wiki.[72] Support for developers committing to the library is provided via the Issues forum on GitHub,[73] while support for developers building apps and web pages is provided via StackOverflow.[74] Real-time on-line support is provided using IRC via Freenode.[75] Most of the developers are also on Twitter.
See also
References
- ↑ 1.0 1.1 1.2 Lua error in package.lua at line 80: module 'strict' not found.
- ↑ 2.0 2.1 Lua error in package.lua at line 80: module 'strict' not found.
- ↑ O3D
- ↑ Unity (game engine)
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ 7.0 7.1 7.2 7.3 Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ One Millionth TowerOne Millionth Tower
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ ThingView
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Interactive 3D Graphics
- ↑ "3D computer graphics for everyone"
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
Bibliography
A number of computer science textbooks refer to Three.js as a tool for simplifying the development process for WebGL applications as well as an easy method for becoming familiar with the concepts of WebGL. These textbooks in order of appearance include:
- Lua error in package.lua at line 80: module 'strict' not found.
- Lua error in package.lua at line 80: module 'strict' not found.
- Lua error in package.lua at line 80: module 'strict' not found. - "Three.js can make game development easier by taking care of low-level details"
- Lua error in package.lua at line 80: module 'strict' not found.
- Lua error in package.lua at line 80: module 'strict' not found.
- Lua error in package.lua at line 80: module 'strict' not found.
External links
Wikimedia Commons has media related to Three.js. |