浏览代码

Merge remote-tracking branch 'upstream/master' into dev

Aleksandar Rodic 11 年之前
父节点
当前提交
369cd252d7
共有 100 个文件被更改,包括 2535 次插入1701 次删除
  1. 2 2
      README.md
  2. 1 1
      bower.json
  3. 691 348
      build/three.js
  4. 218 199
      build/three.min.js
  5. 5 4
      docs/api/core/BufferGeometry.html
  6. 1 1
      docs/api/core/Projector.html
  7. 8 2
      docs/api/core/Raycaster.html
  8. 36 30
      docs/api/extras/FontUtils.html
  9. 11 11
      docs/api/extras/ImageUtils.html
  10. 16 15
      docs/api/extras/SceneUtils.html
  11. 10 8
      docs/api/extras/core/Path.html
  12. 15 1
      docs/api/extras/geometries/LatheGeometry.html
  13. 2 2
      docs/api/extras/geometries/TextGeometry.html
  14. 17 15
      docs/api/extras/helpers/ArrowHelper.html
  15. 5 4
      docs/api/extras/helpers/AxisHelper.html
  16. 67 0
      docs/api/extras/helpers/BoundingBoxHelper.html
  17. 12 9
      docs/api/extras/helpers/CameraHelper.html
  18. 16 5
      docs/api/extras/helpers/GridHelper.html
  19. 5 5
      docs/api/extras/objects/ImmediateRenderObject.html
  20. 11 11
      docs/api/extras/renderers/plugins/LensFlarePlugin.html
  21. 15 13
      docs/api/extras/renderers/plugins/ShadowMapPlugin.html
  22. 12 11
      docs/api/extras/renderers/plugins/SpritePlugin.html
  23. 6 3
      docs/api/extras/shaders/ShaderFlares.html
  24. 0 29
      docs/api/extras/shaders/ShaderSprite.html
  25. 2 0
      docs/api/lights/AreaLight.html
  26. 61 61
      docs/api/lights/PointLight.html
  27. 18 58
      docs/api/loaders/ImageLoader.html
  28. 22 22
      docs/api/loaders/Loader.html
  29. 45 2
      docs/api/loaders/LoadingManager.html
  30. 22 46
      docs/api/loaders/MaterialLoader.html
  31. 20 19
      docs/api/materials/LineDashedMaterial.html
  32. 8 8
      docs/api/materials/Material.html
  33. 5 5
      docs/api/materials/MeshBasicMaterial.html
  34. 1 1
      docs/api/materials/MeshDepthMaterial.html
  35. 10 6
      docs/api/materials/MeshFaceMaterial.html
  36. 1 1
      docs/api/materials/MeshNormalMaterial.html
  37. 1 6
      docs/api/materials/MeshPhongMaterial.html
  38. 2 2
      docs/api/materials/ParticleSystemMaterial.html
  39. 2 1
      docs/api/math/Color.html
  40. 30 1
      docs/api/math/Vector2.html
  41. 32 3
      docs/api/math/Vector3.html
  42. 31 1
      docs/api/math/Vector4.html
  43. 11 14
      docs/api/objects/Bone.html
  44. 6 4
      docs/api/objects/Mesh.html
  45. 6 1
      docs/api/objects/ParticleSystem.html
  46. 15 17
      docs/api/objects/SkinnedMesh.html
  47. 20 9
      docs/api/objects/Sprite.html
  48. 57 45
      docs/api/renderers/CanvasRenderer.html
  49. 6 10
      docs/api/renderers/WebGLRenderTarget.html
  50. 104 83
      docs/api/renderers/WebGLRenderer.html
  51. 11 9
      docs/api/renderers/renderables/RenderableObject.html
  52. 3 6
      docs/api/scenes/Scene.html
  53. 16 15
      docs/api/textures/CompressedTexture.html
  54. 19 14
      docs/api/textures/DataTexture.html
  55. 149 152
      docs/api/textures/Texture.html
  56. 1 0
      docs/list.js
  57. 1 1
      editor/css/types.css
  58. 2 1
      editor/index.html
  59. 22 58
      editor/js/Editor.js
  60. 13 4
      editor/js/Loader.js
  61. 24 6
      editor/js/Menubar.Add.js
  62. 5 0
      editor/js/Menubar.File.js
  63. 2 2
      editor/js/Sidebar.Geometry.BoxGeometry.js
  64. 12 8
      editor/js/Sidebar.Geometry.js
  65. 1 0
      editor/js/Sidebar.Material.js
  66. 24 8
      editor/js/Viewport.js
  67. 1 1
      examples/canvas_camera_orthographic.html
  68. 1 1
      examples/canvas_camera_orthographic2.html
  69. 213 0
      examples/canvas_geometry2_sandbox.html
  70. 1 1
      examples/canvas_geometry_cube.html
  71. 1 1
      examples/canvas_geometry_hierarchy.html
  72. 1 1
      examples/canvas_geometry_panorama.html
  73. 1 1
      examples/canvas_geometry_panorama_fisheye.html
  74. 1 1
      examples/canvas_interactive_cubes.html
  75. 1 1
      examples/canvas_interactive_cubes_tween.html
  76. 1 1
      examples/canvas_interactive_lines.html
  77. 15 12
      examples/canvas_interactive_voxelpainter.html
  78. 0 2
      examples/canvas_lines_colors.html
  79. 2 2
      examples/canvas_materials.html
  80. 1 1
      examples/canvas_materials_depth.html
  81. 10 25
      examples/canvas_morphtargets_horse.html
  82. 1 1
      examples/css3d_sandbox.html
  83. 11 4
      examples/css3d_youtube.html
  84. 6 1
      examples/index.html
  85. 1 6
      examples/js/BufferGeometryUtils.js
  86. 8 8
      examples/js/Mirror.js
  87. 1 1
      examples/js/Octree.js
  88. 15 18
      examples/js/UCSCharacter.js
  89. 8 8
      examples/js/WaterShader.js
  90. 3 2
      examples/js/controls/FirstPersonControls.js
  91. 2 2
      examples/js/controls/FlyControls.js
  92. 102 76
      examples/js/controls/OrbitControls.js
  93. 6 3
      examples/js/controls/PathControls.js
  94. 11 11
      examples/js/controls/TransformControls.js
  95. 1 1
      examples/js/crossfade/scenes.js
  96. 55 0
      examples/js/exporters/Geometry2Exporter.js
  97. 17 65
      examples/js/exporters/GeometryExporter.js
  98. 10 2
      examples/js/exporters/ObjectExporter.js
  99. 1 1
      examples/js/exporters/SceneExporter.js
  100. 1 1
      examples/js/loaders/BinaryLoader.js

+ 2 - 2
README.md

@@ -35,7 +35,7 @@ This code creates a scene, then creates a camera, adds the camera and cube to th
 
 		scene = new THREE.Scene();
 
-		geometry = new THREE.CubeGeometry( 200, 200, 200 );
+		geometry = new THREE.BoxGeometry( 200, 200, 200 );
 		material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true } );
 
 		mesh = new THREE.Mesh( geometry, material );
@@ -62,7 +62,7 @@ This code creates a scene, then creates a camera, adds the camera and cube to th
 
 </script>
 ```
-If everything went well you should see [this](http://jsfiddle.net/ksRyQ/).
+If everything went well you should see [this](http://jsfiddle.net/Gy4w7/).
 
 ### Change log ###
 

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
 	"name": "three.js",
-	"version": "0.0.65",
+	"version": "0.0.66",
 	"homepage": "http://threejs.org/",
 	"description": "JavaScript 3D library",
 	"main": "build/three.js",

文件差异内容过多而无法显示
+ 691 - 348
build/three.js


文件差异内容过多而无法显示
+ 218 - 199
build/three.min.js


+ 5 - 4
docs/api/core/BufferGeometry.html

@@ -21,7 +21,7 @@
 
 		<h3>[name]()</h3>
 		<div>
-			This creates a new [name]. It also sets several properties to an default value.
+		This creates a new [name]. It also sets several properties to an default value.
 		</div>
 
 
@@ -68,7 +68,7 @@
 
 		<h3>.[page:boolean hasTangents]</h3>
 		<div>
-		todo
+		True if BufferGeometry has tangents. Set in [page:BufferGeometry BufferGeometry.computeTangents].
 		</div> 
 
 		<h2>Methods</h2>
@@ -110,9 +110,10 @@
 		You need to call this when you want the bufferGeometry removed while the application is running.
 		</div>
 
-		<h3>.normalizeNormals() [page:todo]</h3>
+		<h3>.normalizeNormals()</h3>
 		<div>
-		todo
+		Every normal vector in a geometry will have a magnitude of 1.
+		This will correct lighting on the geometry surfaces.
 		</div>
 
 		<h2>Source</h2>

+ 1 - 1
docs/api/core/Projector.html

@@ -17,7 +17,7 @@
 
 		<h3>[name]()</h3>
 		<div>
-		todo
+		Creates a new projector Object. It initializes a lot of variables that the projector uses to project the points.
 		</div>
 		
 		

+ 8 - 2
docs/api/core/Raycaster.html

@@ -71,7 +71,10 @@
 		[page:Boolean recursive] — If set, it also checks all descendants. Otherwise it only checks intersecton with the object.
 		</div>
 		<div>
-		checks all intersection between the ray and the object with or without the descendants.
+		checks all intersection between the ray and the object with or without the descendants. Intersections are returned sorted by distance, closest first.
+        <code>
+            [ { distance, point, face, faceIndex, object }, ... ]
+        </code>
 		</div>
 
 		<h3>.intersectObjects( [page:Array objects], [page:Boolean recursive] )</h3>
@@ -80,7 +83,10 @@
 		[page:Boolean recursive] — If set, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects.
 		</div>
 		<div>
-		checks all intersection between the ray and the objects with or without the descendants.
+		checks all intersection between the ray and the objects with or without the descendants. Intersections are returned sorted by distance, closest first.
+        <code>
+            [ { distance, point, face, faceIndex, object }, ... ]
+        </code>
 		</div>
 
 

+ 36 - 30
docs/api/extras/FontUtils.html

@@ -9,7 +9,7 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">A class for text operations in three.js (See [page:TextGeometry])</div>
 
 
 		<h2>Properties</h2>
@@ -18,87 +18,93 @@
 
 		<h3>.[page:number divisions]</h3>
 		<div>
-		todo
+		The amount of segments in a curve. Default is 10.
 		</div> 
 
 		<h3>.[page:string style]</h3>
 		<div>
-		todo
+		The style of the used font. Default is "normal".
 		</div> 
 
 		<h3>.[page:string weight]</h3>
 		<div>
-		todo
+		The weight of the used font. Default is "normal".
 		</div> 
 
 		<h3>.[page:string face]</h3>
 		<div>
-		todo
+		The name of the font. Default is "helvetiker".
 		</div> 
 
 		<h3>.[page:object faces]</h3>
 		<div>
-		todo
+		All Fonts which are already loaded in.
 		</div> 
 
 		<h3>.[page:number size]</h3>
 		<div>
-		todo
+		The size of the used Font. Default is 150.
 		</div> 
 
 		<h2>Methods</h2>
 
 
 
-		<h3>.drawText([page:todo text]) [page:todo]</h3>
+		<h3>.drawText([page:string text]) [page:Object]</h3>
 		<div>
-		text -- todo
+		text -- The text to draw.
 		</div>
 		<div>
-		todo
+		Calculates the path and offset of the text in the used font. It returns an  object like { paths : fontPaths, offset : width }.
 		</div>
 
-		<h3>.Triangulate([page:todo contour], [page:todo indices]) [page:todo]</h3>
+		<h3>.Triangulate([page:Array contour], [page:Boolean indices]) [page:Array]</h3>
 		<div>
-		contour -- todo <br />
-		indices -- todo
+		contour -- Array of vector2 to define an contour <br />
+		indices -- A boolean indicating if you need to return indices.
 		</div>
 		<div>
-		todo
+		Triangulates a contour into an array of faces.
 		</div>
 
-		<h3>.extractGlyphPoints([page:todo c], [page:todo face], [page:todo scale], [page:todo offset], [page:todo path]) [page:todo]</h3>
+		<h3>.extractGlyphPoints([page:string c], [page:string face], [page:number scale], [page:number offset], [page:Path path]) [page:Object]</h3>
 		<div>
-		c -- todo <br />
-		face -- todo <br />
-		scale -- todo <br />
-		offset -- todo <br />
-		path -- todo
+		c -- The character to extract. <br />
+		face -- The face to use. <br />
+		scale -- The scale of the character. <br />
+		offset -- The offset of the character compared to begin of the path. <br />
+		path -- THe path to which to add the character points.
 		</div>
 		<div>
-		todo
+		This ectracts the glyphPoints of the character of the face and returns an object containing the path and the new offset.
 		</div>
 
-		<h3>.generateShapes([page:todo text], [page:todo parameters]) [page:todo]</h3>
+		<h3>.generateShapes([page:string text], [page:Object parameters]) [page:Array]</h3>
 		<div>
-		text -- todo <br />
-		parameters -- todo
+		text -- The text to generate the shapes from.<br />
+		parameters -- The parameter containing <br />
+			size -- Default is 100.
+			curveSegments -- Default is 4.
+			font -- Default is "helvetiker".
+			weight -- Default is "normal".
+			style -- Default is "normal".
+
 		</div>
 		<div>
-		todo
+		Generates shapes from the text and return them as an Array of [page:Shape].
 		</div>
 
-		<h3>.loadFace([page:todo data]) [page:todo]</h3>
+		<h3>.loadFace([page:Object data]) [page:Object]</h3>
 		<div>
-		data -- todo
+		data -- The data of the face.
 		</div>
 		<div>
-		todo
+		This loads and saves the data of the face and return the data. When you add the font Data as javascriptfile, then this automatically get called. So there is no need to do this yourself.
 		</div>
 
-		<h3>.getFace() [page:todo]</h3>
+		<h3>.getFace() [page:Object]</h3>
 		<div>
-		todo
+		Returns the used font its data based on its style and weight.
 		</div>
 
 		<h2>Source</h2>

+ 11 - 11
docs/api/extras/ImageUtils.html

@@ -9,7 +9,7 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">A Helper class to ease the loading of images of different types.</div>
 		
 
 		<h2>Properties</h2>
@@ -18,30 +18,30 @@
 
 		<h3>.[page:string crossOrigin]</h3>
 		<div>
-		todo
+		The crossOrigin string to implement CORS for loading the image from a different domain that allows CORS.
 		</div> 
 
 		<h2>Methods</h2>
 
 
 
-		<h3>.generateDataTexture([page:todo width], [page:todo height], [page:todo color]) [page:todo]</h3>
+		<h3>.generateDataTexture([page:Number width], [page:Number height], [page:Number color]) [page:DataTexture]</h3>
 		<div>
-		width -- todo <br />
-		height -- todo <br />
-		color -- todo
+		width -- The width of the texture. <br />
+		height -- The width of the texture. <br />
+		color -- The hexadecimal value of the color.
 		</div>
 		<div>
-		todo
+		Generates a texture of a single color. It is a DataTexture with format, RGBFormat.
 		</div>
 
-		<h3>.parseDDS([page:todo buffer], [page:todo loadMipmaps]) [page:todo]</h3>
+		<h3>.parseDDS([page:String buffer], [page:boolean loadMipmaps]) [page:CompressedTexture]</h3>
 		<div>
-		buffer -- todo <br />
-		loadMipmaps -- todo
+		buffer -- A string containing the data of the dds. <br />
+		loadMipmaps -- A boolean to indicate if you need to load the mipmaps. Default is True.
 		</div>
 		<div>
-		todo
+		Parses a DDS Image from the string into a CompressedTexture. 
 		</div>
 
 		<h3>.loadCompressedTexture([page:todo url], [page:todo mapping], [page:todo onLoad], [page:todo onError]) [page:todo]</h3>

+ 16 - 15
docs/api/extras/SceneUtils.html

@@ -9,39 +9,40 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">A class containing usefull utility functions for scene manipulation.</div>
 
 
 		<h2>Methods</h2>
 
 
-		<h3>.createMultiMaterialObject([page:todo geometry], [page:todo materials]) [page:todo]</h3>
+		<h3>.createMultiMaterialObject([page:Geometry geometry], [page:Array materials]) [page:Object3D]</h3>
 		<div>
-		geometry -- todo <br />
-		materials -- todo
+		geometry -- The geometry for the Object. <br />
+		materials -- The materials for the object.
 		</div>
 		<div>
-		todo
+		Creates an new Object3D an new mesh for each material defined in materials. Beware that this is not the same as Meshfacematerial which defines multiple material for 1 mesh.<br />
+		This is mostly useful for object that need a material and a wireframe implementation.
 		</div>
 
-		<h3>.attach([page:todo child], [page:todo scene], [page:todo parent]) [page:todo]</h3>
+		<h3>.attach([page:Object3D child], [page:Object3D scene], [page:Object3D parent])</h3>
 		<div>
-		child -- todo <br />
-		scene -- todo <br />
-		parent -- todo
+		child -- The object to add to the parent  <br />
+		scene -- The scene to detach the object on. <br />
+		parent -- The parent to attach the object from.
 		</div>
 		<div>
-		todo
+		Attaches the object to the parent without the moving the object in the worldspace.
 		</div>
 
-		<h3>.detach([page:todo child], [page:todo parent], [page:todo scene]) [page:todo]</h3>
+		<h3>.detach([page:Object3D child], [page:Object3D parent], [page:Object3D scene])</h3>
 		<div>
-		child -- todo <br />
-		parent -- todo <br />
-		scene -- todo
+		child -- The object to remove from the parent  <br />
+		scene -- The scene to attach the object on. <br />
+		parent -- The parent to detach the object from.
 		</div>
 		<div>
-		todo
+		Detaches the object from the parent and adds it back to the scene without moving in worldspace.
 		</div>
 
 		<h2>Source</h2>

+ 10 - 8
docs/api/extras/core/Path.html

@@ -17,10 +17,10 @@
 
 		<h3>[name]([page:todo points])</h3>
 		<div>
-		points -- todo
+		points -- array of Vector2
 		</div>
 		<div>
-		todo
+		Creates a Path from the points. The first vector defines the offset. After that the lines get defined.
 		</div>
 
 
@@ -29,25 +29,27 @@
 
 		<h3>.[page:array actions]</h3>
 		<div>
-		todo
+		The possible actions that define the path.
 		</div> 
 
 		<h2>Methods</h2>
 
 		<h3>.fromPoints ( vectors ) </h3>
-		<div>todo</div>
+		<div>
+		Adds to the Path from the points. The first vector defines the offset. After that the lines get defined.
+		</div>
 
 		<h3>.moveTo ( x, y ) </h3>
-		<div>todo</div>
+		<div>This moves the offset to x and y</div>
 
 		<h3>.lineTo ( x, y ) </h3>
-		<div>todo</div>
+		<div>This creates a line from the offset to X and Y and updates the offset to X and Y.</div>
 
 		<h3>.quadraticCurveTo ( aCPx, aCPy, aX, aY ) </h3>
-		<div>todo</div>
+		<div>This creates a quadratic curve from the offset to aX and aY with aCPx and aCPy as control point and updates the offset to aX and aY.</div>
 
 		<h3>.bezierCurveTo ( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) </h3>
-		<div>todo</div>
+		<div>This creates a bezier curve from the offset to aX and aY with aCP1x, aCP1y and aCP1x, aCP1y  as control points and updates the offset to aX and aY.</div>
 
 		<h3>.splineThru ( pts /*Array of Vector*/ ) </h3>
 		<div>todo</div>

+ 15 - 1
docs/api/extras/geometries/LatheGeometry.html

@@ -14,6 +14,20 @@
 		<div class="desc">Class for generating meshes with axial symmetry. Possible uses include donuts, pipes, vases etc. The lathe rotate around the Z axis.</div>
 
 
+		<h2>Example</h2>
+
+		<code>
+		var points = [];
+		for ( var i = 0; i < 10; i ++ ) {
+			points.push( new THREE.Vector3( Math.sin( i * 0.2 ) * 15 + 50, 0, ( i - 5 ) * 2 ) );
+
+		}
+		var geometry = new THREE.LatheGeometry( points );
+		var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
+		var lathe = new THREE.Mesh( geometry, material );
+		scene.add( lathe );
+		</code>
+
 		<h2>Constructor</h2>
 
 
@@ -25,7 +39,7 @@
 		phiLength — the radian (0 to 2*PI) range of the lathed section 2*PI is a closed lathe, less than 2PI is a portion. Default is 2*PI
 		</div>
 		<div>
-		todo
+		This creates a LatheGeometry based on the parameters.
 		</div>
 
 

+ 2 - 2
docs/api/extras/geometries/TextGeometry.html

@@ -11,7 +11,7 @@
 		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">This object creates an 3D object of text as a single object.</div>
 
 
 		<h2>Constructor</h2>
@@ -19,7 +19,7 @@
 
 		<h3>[name]([page:String text], [page:Object parameters])</h3>
 		<div>
-		text — todo <br />
+		text — The text that needs to be shown. <br />
 		parameters — Object that can contain the following parameters.
 		<ul>
 			<li>size — Float. Size of the text.</li>

+ 17 - 15
docs/api/extras/helpers/ArrowHelper.html

@@ -9,7 +9,7 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">An 3D arrow Object.</div>
 
 
 		<h2>Example</h2>
@@ -28,15 +28,17 @@
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo dir], [page:todo origin], [page:todo length], [page:todo hex])</h3>
+		<h3>[name]([page:Vector3 dir], [page:Vector3 origin], [page:Number length], [page:Number hex], [page:Number headLength], [page:Number headWidth] )</h3>
 		<div>
 		dir -- Vector3 -- direction from origin <br />
 		origin -- Vector3 <br />
 		length -- scalar <br />
-		hex -- hexadecimal value to define color ex:0xffff00
+		hex -- hexadecimal value to define color ex:0xffff00<br />
+		headLength -- The length of the head of the arrow<br />
+		headWidth -- The length of the width of the arrow
 		</div>
 		<div>
-		todo
+		This creates an arrow starting in origin in the direction dir for a certain length. It is also possible to change color.
 		</div>
 
 
@@ -46,40 +48,40 @@
 
 		<h3>.[page:Line line]</h3>
 		<div>
-		todo
+		Contains the line part of the arrowHelper.
 		</div> 
 
 		<h3>.[page:Mesh cone]</h3>
 		<div>
-		todo
+		Contains the cone part of the arrowHelper.
 		</div> 
 
 		<h2>Methods</h2>
 
 
 
-		<h3>.setColor([page:todo hex]) [page:todo]</h3>
+		<h3>.setColor([page:Number hex])</h3>
 		<div>
-		hex -- todo
+		hex -- The hexadicmal value of the color
 		</div>
 		<div>
-		todo
+		Sets the color of the arrowHelper.
 		</div>
 
-		<h3>.setLength([page:todo length]) [page:todo]</h3>
+		<h3>.setLength([page:Number length])</h3>
 		<div>
-		length -- todo
+		length -- The desired length
 		</div>
 		<div>
-		todo
+		Sets the length of the arrowhelper.
 		</div>
 
-		<h3>.setDirection([page:todo dir]) [page:todo]</h3>
+		<h3>.setDirection([page:vector3 dir])</h3>
 		<div>
-		dir -- todo
+		dir -- The desired direction in euler format.
 		</div>
 		<div>
-		todo
+		Sets the direction of the arrowhelper.
 		</div>
 
 		<h2>Source</h2>

+ 5 - 4
docs/api/extras/helpers/AxisHelper.html

@@ -9,7 +9,8 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">An axis object to visualize the the 3 axes in a simple way. <br />
+			The X axis is red. The Y axis is green. The Z axis is blue.</div>
 
 
 		<h2>Example</h2>
@@ -21,12 +22,12 @@
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo size])</h3>
+		<h3>[name]([page:Number size])</h3>
 		<div>
-		size -- Define the size of the helper
+		size -- Define the size of the of the line representing the axes.
 		</div>
 		<div>
-		todo
+		Creates an axisHelper with lines of length size.
 		</div>
 
 		<h2>Source</h2>

+ 67 - 0
docs/api/extras/helpers/BoundingBoxHelper.html

@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="utf-8" />
+		<script src="../../../list.js"></script>
+		<script src="../../../page.js"></script>
+		<link type="text/css" rel="stylesheet" href="../../../page.css" />
+	</head>
+	<body>
+		<h1>[name]</h1>
+
+		<div class="desc">A helper object to show the world-axis-aligned bounding box for an object.</div>
+
+
+		<h2>Example</h2>
+
+		<code>var dir = new THREE.Vector3( 1, 0, 0 );
+		var origin = new THREE.Vector3( 0, 0, 0 );
+		var length = 1;
+		var hex = 0xffff00;
+
+		var arrowHelper = new THREE.ArrowHelper( dir, origin, length, hex );
+		scene.add( arrowHelper );
+		</code>
+
+
+
+		<h2>Constructor</h2>
+
+
+		<h3>[name]([page:Object3D object], [page:Number hex])</h3>
+		<div>
+		object -- Object3D -- the object3D to show the world-axis-aligned boundingbox.<br />
+		hex -- hexadecimal value to define color ex:0x888888
+		</div>
+		<div>
+		This creates an line object to the boundingbox.
+		</div>
+
+
+		<h2>Properties</h2>
+
+
+
+		<h3>.[page:Object3D object]</h3>
+		<div>
+		Contains the object3D to show the world-axis-aligned boundingbox.
+		</div> 
+
+		<h3>.[page:Box3 box]</h3>
+		<div>
+		Contains the bounding box of the object.
+		</div> 
+
+		<h2>Methods</h2>
+
+		<h3>.update()</h3>
+		<div>
+		Updates the BoundingBoxHelper based on the object property.
+		</div>
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 12 - 9
docs/api/extras/helpers/CameraHelper.html

@@ -9,18 +9,21 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">
+		The camera Helper is an Object3D which helps visualizing what a camera contains in its frustum.<br />
+		It visualizes the frustum with an line Geometry.	
+		</div>
 
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo camera])</h3>
+		<h3>[name]([page:Camera camera])</h3>
 		<div>
-		camera -- todo
+		camera -- The camera to visualize.
 		</div>
 		<div>
-		todo
+		This create a new [Name] for the specified camera.
 		</div>
 
 
@@ -29,20 +32,20 @@
 
 		<h3>.[page:object pointMap]</h3>
 		<div>
-		todo
+		This contains the points to viualize the cameraHelper
 		</div> 
 
-		<h3>.[page:PerspectiveCamera camera]</h3>
+		<h3>.[page:Camera camera]</h3>
 		<div>
-		todo
+		The camera to visualize.
 		</div> 
 
 		<h2>Methods</h2>
 
 
-		<h3>.update() [page:todo]</h3>
+		<h3>.update()</h3>
 		<div>
-		todo
+		Updates the helper based on the projectionMatrix of the camera.
 		</div>
 
 		<h2>Source</h2>

+ 16 - 5
docs/api/extras/helpers/GridHelper.html

@@ -9,7 +9,7 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">The GridHelper is an object to define grids. Grids are two-dimensional arrays of lines.</div>
 
 
 		<h2>Example</h2>
@@ -27,13 +27,24 @@
 
 		<h2>Constructor</h2>
 
-		<h3>[name]([page:todo size], [page:todo step])</h3>
+		<h3>[name]([page:number size], [page:Number step])</h3>
 		<div>
-		size -- todo <br />
-		step -- todo
+		size -- The size of the grid <br />
+		step -- The size of the step btween 2 lines 
 		</div>
 		<div>
-		todo
+		Creates a new [name] of size 'size' and with steps of size 'step'.
+		</div>
+		
+		<h2>Methods</h2>
+
+		<h3>.setColors([page:number colorCenterLine], [page:Number colorGrid])</h3>
+		<div>
+		colorCenterLine -- The color of the centerline. This can be a [page:Color], a hexadecimal value and an CSS-Color name. <br />
+		colorGrid -- The color of the lines of the grid. This can be a [page:Color], a hexadecimal value and an CSS-Color name.
+		</div>
+		<div>
+		Updates the color of the grid lines.
 		</div>
 
 

+ 5 - 5
docs/api/extras/objects/ImmediateRenderObject.html

@@ -9,7 +9,7 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">base class for immediate rendering objects.</div>
 
 
 		<h2>Constructor</h2>
@@ -17,19 +17,19 @@
 
 		<h3>[name]()</h3>
 		<div>
-		todo
+		This creates a new [name]. 
 		</div>
 
 
 		<h2>Methods</h2>
 
 
-		<h3>.render([page:todo renderCallback]) [page:todo]</h3>
+		<h3>.render([page:Function renderCallback])</h3>
 		<div>
-		renderCallback -- todo
+		renderCallback -- A function to render the generated object.
 		</div>
 		<div>
-		todo
+		This function needs to be overridden to start the creation of the object and should call renderCallback when finished.
 		</div>
 
 		<h2>Source</h2>

+ 11 - 11
docs/api/extras/renderers/plugins/LensFlarePlugin.html

@@ -9,7 +9,7 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">The Webglrenderer plugin class that allows lensflares to be rendered in the WebglRenderer. This plugin is automatically loaded in the Webglrenderer.</div>
 
 
 		<h2>Constructor</h2>
@@ -17,7 +17,7 @@
 
 		<h3>[name]()</h3>
 		<div>
-		todo
+		Creates a new [name]. 
 		</div>
 
 
@@ -26,23 +26,23 @@
 
 
 
-		<h3>.init([page:todo renderer]) [page:todo]</h3>
+		<h3>.init([page:WebglRenderer renderer])</h3>
 		<div>
-		renderer -- todo
+		renderer -- The WebglRenderer that uses the plugin.
 		</div>
 		<div>
-		todo
+		Initializes the plugin to work with the renderer. This gets called when the plugin gets added as a plugin to the renderer.
 		</div>
 
-		<h3>.render([page:todo scene], [page:todo camera], [page:todo viewportWidth], [page:todo viewportHeight]) [page:todo]</h3>
+		<h3>.render([page:Scene scene], [page:Camera camera], [page:Number viewportWidth], [page:Number viewportHeight])</h3>
 		<div>
-		scene -- todo <br />
-		camera -- todo <br />
-		viewportWidth -- todo <br />
-		viewportHeight -- todo
+		scene -- The scene to render. <br />
+		camera -- The camera to render. <br />
+		viewportWidth -- The width of the viewport. <br />
+		viewportHeight -- The height of the viewport.
 		</div>
 		<div>
-		todo
+		Renders the lensflares defined in the scene. This gets automatically called as post render function to draw the lensflares.
 		</div>
 
 		<h2>Source</h2>

+ 15 - 13
docs/api/extras/renderers/plugins/ShadowMapPlugin.html

@@ -9,7 +9,9 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">The Webglrenderer plugin class that allows shadowmaps to be rendered in the WebglRenderer. This plugin is automatically loaded in the Webglrenderer.</div>
+
+
 
 
 		<h2>Constructor</h2>
@@ -17,7 +19,7 @@
 
 		<h3>[name]()</h3>
 		<div>
-		todo
+		Creates a new [name]. 
 		</div>
 
 
@@ -25,30 +27,30 @@
 
 
 
-		<h3>.init([page:todo renderer]) [page:todo]</h3>
+		<h3>.init([page:WebglRenderer renderer])</h3>
 		<div>
-		renderer -- todo
+		renderer -- The WebglRenderer that uses the plugin.
 		</div>
 		<div>
-		todo
+		Initializes the plugin to work with the renderer. This gets called when the plugin gets added as a plugin to the renderer.
 		</div>
 
-		<h3>.update([page:todo scene], [page:todo camera]) [page:todo]</h3>
+		<h3>.update([page:Scene scene], [page:Camera camera]) </h3>
 		<div>
-		scene -- todo <br />
-		camera -- todo
+		scene -- The scene to render. <br />
+		camera -- The camera to render.
 		</div>
 		<div>
-		todo
+		Updates the textures nessecary for the shadowmaps. This gets called by updateShadowMap in [page:WebglRenderer].
 		</div>
 
-		<h3>.render([page:todo scene], [page:todo camera]) [page:todo]</h3>
+		<h3>.render([page:Scene scene], [page:Camera camera])</h3>
 		<div>
-		scene -- todo <br />
-		camera -- todo
+		scene -- The scene to render. <br />
+		camera -- The camera to render.
 		</div>
 		<div>
-		todo
+		Prepares the shadowmaps to be rendered defined in the scene. This gets automatically called as pre render function to draw the lensflares.
 		</div>
 
 		<h2>Source</h2>

+ 12 - 11
docs/api/extras/renderers/plugins/SpritePlugin.html

@@ -9,7 +9,7 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">The Webglrenderer plugin class that allows Sprites to be rendered in the WebglRenderer. This plugin is automatically loaded in the Webglrenderer.</div>
 
 
 		<h2>Constructor</h2>
@@ -17,31 +17,32 @@
 
 		<h3>[name]()</h3>
 		<div>
-		todo
+		Creates a new [name]. 
 		</div>
 
 
+
 		<h2>Methods</h2>
 
 
 
-		<h3>.init([page:todo renderer]) [page:todo]</h3>
+		<h3>.init([page:WebglRenderer renderer])</h3>
 		<div>
-		renderer -- todo
+		renderer -- The WebglRenderer that uses the plugin.
 		</div>
 		<div>
-		todo
+		Initializes the plugin to work with the renderer. This gets called when the plugin gets added as a plugin to the renderer.
 		</div>
 
-		<h3>.render([page:todo scene], [page:todo camera], [page:todo viewportWidth], [page:todo viewportHeight]) [page:todo]</h3>
+		<h3>.render([page:Scene scene], [page:Camera camera], [page:Number viewportWidth], [page:Number viewportHeight])</h3>
 		<div>
-		scene -- todo <br />
-		camera -- todo <br />
-		viewportWidth -- todo <br />
-		viewportHeight -- todo
+		scene -- The scene to render. <br />
+		camera -- The camera to render. <br />
+		viewportWidth -- The width of the viewport. <br />
+		viewportHeight -- The height of the viewport.
 		</div>
 		<div>
-		todo
+		Renders the sprites defined in the scene. This gets automatically called as post-render function to draw the lensflares.
 		</div>
 
 		<h2>Source</h2>

+ 6 - 3
docs/api/extras/shaders/ShaderFlares.html

@@ -9,7 +9,10 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">
+		Contains the shader code fragments of the lensflare implementations. 
+		These shouldn't be edited.
+		</div>
 
 
 		<h2>Properties</h2>
@@ -17,12 +20,12 @@
 
 		<h3>.[page:object lensFlare]</h3>
 		<div>
-		todo
+		The object that contains the vertex code and fragment code of the lensflares implementation when there are no vertex textures available. 
 		</div> 
 
 		<h3>.[page:object lensFlareVertexTexture]</h3>
 		<div>
-		todo
+		The object that contains the vertex code and fragment code of the lensflares implementation when there are vertex textures available.
 		</div> 
 
 

+ 0 - 29
docs/api/extras/shaders/ShaderSprite.html

@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8" />
-		<script src="../../../list.js"></script>
-		<script src="../../../page.js"></script>
-		<link type="text/css" rel="stylesheet" href="../../../page.css" />
-	</head>
-	<body>
-		<h1>[name]</h1>
-
-		<div class="desc">todo</div>
-
-
-		<h2>Properties</h2>
-
-
-		<h3>.[page:object sprite]</h3>
-		<div>
-		todo
-		</div> 
-
-
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-	</body>
-</html>

+ 2 - 0
docs/api/lights/AreaLight.html

@@ -7,6 +7,8 @@
 		<link type="text/css" rel="stylesheet" href="../../page.css" />
 	</head>
 	<body>
+        [page:Object3D] &rarr; [page:Light] &rarr;
+
 		<h1>[name]</h1>
 
 		<div class="desc">This illuminates the scene from a complete surface. This light only works in the [page:WebGLDeferredRenderer deferredrenderer]. </div>

+ 61 - 61
docs/api/lights/PointLight.html

@@ -1,62 +1,62 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8" />
-		<script src="../../list.js"></script>
-		<script src="../../page.js"></script>
-		<link type="text/css" rel="stylesheet" href="../../page.css" />
-	</head>
-	<body>
-		[page:Object3D] &rarr; [page:Light] &rarr;
-
-		<h1>[name]</h1>
-
-		<div class="desc">
-			Affects objects using [page:MeshLambertMaterial] or [page:MeshPhongMaterial].
-		</div>
-
-
-		<h2>Example</h2>
-
-		<code>var light = new THREE.PointLight( 0xff0000, 1, 100 );
-light.position.set( 50, 50, 50 );
-scene.add( light );</code>
-
-
-		<h2>Constructor</h2>
-
-
-		<h3>[name]([page:Integer hex], [page:Float intensity], [page:todo distance])</h3>
-		<div>
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="utf-8" />
+		<script src="../../list.js"></script>
+		<script src="../../page.js"></script>
+		<link type="text/css" rel="stylesheet" href="../../page.css" />
+	</head>
+	<body>
+		[page:Object3D] &rarr; [page:Light] &rarr;
+
+		<h1>[name]</h1>
+
+		<div class="desc">
+			Affects objects using [page:MeshLambertMaterial] or [page:MeshPhongMaterial].
+		</div>
+
+
+		<h2>Example</h2>
+
+		<code>var light = new THREE.PointLight( 0xff0000, 1, 100 );
+light.position.set( 50, 50, 50 );
+scene.add( light );</code>
+
+
+		<h2>Constructor</h2>
+
+
+		<h3>[name]([page:Integer hex], [page:Float intensity], [page:Number distance])</h3>
+		<div>
 		[page:Integer hex] — Numeric value of the RGB component of the color. <br />
-		[page:Float intensity] — Numeric value of the light's strength/intensity. <br />
-		distance -- todo
-		</div>
-		<div>
-		Creates a light at a specific position in the scene.  The light shines in all directions (roughly similar to a light bulb.)
-	
-		</div>
-
-
-		<h2>Properties</h2>
-
-		<h3>.[page:Float intensity]</h3>
-		<div>
-			Light's intensity.<br />
-			Default - *1.0*.
-		</div>
-
-		<h3>.[page:Float distance]</h3>
-		<div>
-			If non-zero, light will attenuate linearly from maximum intensity at light *position* down to zero at *distance*.<br />
-			Default — *0.0*.
-		</div>
-		
-		<h2>Methods</h2>
-
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-	</body>
-</html>
+		[page:Float intensity] — Numeric value of the light's strength/intensity. <br />
+		[page:Number distance] -- The distance of the light where the intensity is 0. When distance is 0, then the distance is endless. 
+		</div>
+		<div>
+		Creates a light at a specific position in the scene.  The light shines in all directions (roughly similar to a light bulb.)
+	
+		</div>
+
+
+		<h2>Properties</h2>
+
+		<h3>.[page:Float intensity]</h3>
+		<div>
+			Light's intensity.<br />
+			Default - *1.0*.
+		</div>
+
+		<h3>.[page:Float distance]</h3>
+		<div>
+			If non-zero, light will attenuate linearly from maximum intensity at light *position* down to zero at *distance*.<br />
+			Default — *0.0*.
+		</div>
+		
+		<h2>Methods</h2>
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 18 - 58
docs/api/loaders/ImageLoader.html

@@ -10,85 +10,45 @@
 		<h1>[name]</h1>
 
 		<div class="desc">A loader for loading an [page:Image image].</div>
-		<div class="desc">Unlike other loaders, this one emits events instead of using predefined callbacks. So if you're interested in getting notified when <em>things</em> happen, you need to add listeners to the object.</div>
-		
+
 		<h2>Constructor</h2>
 
 
-		<h3>[name]()</h3>
-		<div>
-		todo
-		</div>
-
-		
-		<h2>Events</h2>
-		
-		<h3>load</h3>
-		<div class="desc">
-		Dispatched when the image has completed loading
-		</div>
+		<h3>[name]([page:LoadingManager manager)</h3>
+        <div>
+        manager -- The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+        </div>
 		<div>
-		content — loaded image
-		</div>
-		
-		<h3>error</h3>
-		<div class="desc">
-		Dispatched when the image can't be loaded
-		</div>
-		<div>
-		message — error message
+		Creates a new [name].
 		</div>
 		
 		<h2>Properties</h2>
 
-		<h3>.[page:object crossOrigin]</h3>
+		<h3>.[page:string crossOrigin]</h3>
 		<div>
-		todo
+		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
 		</div> 
 
 		<h2>Methods</h2>
 
-		<h3>.load( [page:String url] )</h3>
+		<h3>.load( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] ) [page:Image]</h3>
 		<div>
+        onLoad -- Will be called when load completes. The argument will be the loaded Imageloader.
+        onProgress -- Will be called while load progresses. The argument will be the progress event.
+        onError -- Will be called when load errors.
 		url — required
 		</div>
-		
-		<div class="desc">Begin loading from <em>url</em></div>
-
-		<h3>.dispatchEvent([page:todo event]) [page:todo]</h3>
-		<div>
-		event -- todo
-		</div>
-		<div>
-		todo
-		</div>
-
-		<h3>.hasEventListener([page:todo type], [page:todo listener]) [page:todo]</h3>
-		<div>
-		type -- todo <br />
-		listener -- todo
-		</div>
 		<div>
-		todo
-		</div>
+        Begin loading from url and return the [page:Image image] object that will contain the data.
+        </div>
 
-		<h3>.removeEventListener([page:todo type], [page:todo listener]) [page:todo]</h3>
-		<div>
-		type -- todo <br />
-		listener -- todo
-		</div>
+        <h3>.setCrossOrigin([page:String value])</h3>
 		<div>
-		todo
+        value -- The crossOrigin string.
 		</div>
-
-		<h3>.addEventListener([page:todo type], [page:todo listener]) [page:todo]</h3>
 		<div>
-		type -- todo <br />
-		listener -- todo
-		</div>
-		<div>
-		todo
-		</div>
+        The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
+        </div>
 
 		<h2>Source</h2>
 

+ 22 - 22
docs/api/loaders/Loader.html

@@ -17,10 +17,10 @@
 
 		<h3>[name]([page:Boolean showStatus])</h3>
 		<div>
-		showStatus -- todo
+		showStatus -- Show the status of loading div.
 		</div>
 		<div>
-		todo
+		Creates a new [name]. This should be called as base class.
 		</div>
 
 
@@ -46,56 +46,56 @@
 		
 		<h3>.[page:string crossOrigin]</h3>
 		<div>
-		todo
+		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
 		</div> 
 
 		<h2>Methods</h2>
 
-		<h3>.needsTangents([page:todo materials]) [page:todo]</h3>
+		<h3>.needsTangents([page:Array materials]) [page:Boolean]</h3>
 		<div>
-		materials -- todo
+		materials -- an array of [page:Material]
 		</div>
 		<div>
-		todo
+		Checks if the loaded object needs tangents based on its materials.
 		</div>
 
-		<h3>.updateProgress([page:todo progress]) [page:todo]</h3>
+		<h3>.updateProgress([page:object progress])</h3>
 		<div>
-		progress -- todo
+		progress -- an object containing loaded(contains the amount of bytes loaded) and optionally total (containing the total amount of bytes).
 		</div>
 		<div>
-		todo
+		Updates the DOM object with the progress made.
 		</div>
 
-		<h3>.createMaterial([page:todo m], [page:todo texturePath]) [page:todo]</h3>
+		<h3>.createMaterial([page:object m], [page:string texturePath]) [page:Material]</h3>
 		<div>
-		m -- todo <br />
-		texturePath -- todo
+		m -- The parameters to create the material. <br />
+		texturePath -- The base path of the textures.
 		</div>
 		<div>
-		todo
+		Creates the Material based on the parameters m.
 		</div>
 
-		<h3>.initMaterials([page:todo materials], [page:todo texturePath]) [page:todo]</h3>
+		<h3>.initMaterials([page:Array materials], [page:string texturePath]) [page:Array]</h3>
 		<div>
-		materials -- todo <br />
-		texturePath -- todo
+		materials -- an array of parameters to create materials. <br />
+		texturePath --  The base path of the textures.
 		</div>
 		<div>
-		todo
+		Creates an array of [page:Material] based on the array of parameters m. The index of the parameters decide the correct index of the materials.
 		</div>
 
-		<h3>.extractUrlBase([page:todo url]) [page:todo]</h3>
+		<h3>.extractUrlBase([page:string url])</h3>
 		<div>
-		url -- todo
+		url --  The url to extract the base url from.
 		</div>
 		<div>
-		todo
+		Extract the base from the URL. 
 		</div>
 
-		<h3>.addStatusElement() [page:todo]</h3>
+		<h3>.addStatusElement() [page:DOMElement]</h3>
 		<div>
-		todo
+		Add a DOM element to indicate the progress and returns the DOMElement
 		</div>
 
 

+ 45 - 2
docs/api/loaders/LoadingManager.html

@@ -28,9 +28,52 @@ loader.load( 'file.obj', function ( object ) {
 
 		<h2>Constructor</h2>
 
-		<h3>[name]()</h3>
+		<h3>[name]([page:function onLoad], [page:function onProgress], [page:function onError])</h3>
 		<div>
-		todo
+		[page:function onLoad] -- The function that needs to be called when all loaders are done.
+		[page:function onProgress] -- The function that needs to be called when an item is complete.
+		[page:function onError] -- The function that needs to be called when an item is errors.
+		</div>
+		<div>
+		Creates a [name].
+		</div>
+		
+		
+		<h2>Properties</h2>
+
+		<h3>.[page:function onLoad]</h3>
+		<div>
+		The function that needs to be called when all loaders are done. 
+		</div> 
+
+		<h3>.[page:function onProgress]</h3>
+		<div>
+		The function that needs to be called when an item is complete. The arguments are url(The url of the item just loaded),<br />
+		loaded(the amount of items already loaded), total( The total amount of items to be loaded.)
+		</div> 
+
+		<h3>.[page:function onError]</h3>
+		<div>
+		The function that needs to be called when an item errors.
+		</div> 
+		
+		
+		<h2>Methods</h2>
+
+		<h3>.itemStart( [page:String url] )</h3>
+		<div>
+		url — the url to load
+		</div>
+		<div>
+		This should be called by any loader used by the manager when the loader starts loading an url. These shouldn't be called outside a loader.
+		</div>
+
+		<h3>.itemEnd( [page:String url] )</h3>
+		<div>
+		url — the url to load
+		</div>
+		<div>
+		This should be called by any loader used by the manager when the loader ended loading an url.  These shouldn't be called outside a loader.
 		</div>
 
 		<h2>Source</h2>

+ 22 - 46
docs/api/loaders/MaterialLoader.html

@@ -9,72 +9,48 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
-
+		<div class="desc">A loader for loading an [page:Material material].</div>
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]()</h3>
+		<h3>[name]([page:LoadingManager manager)</h3>
+        <div>
+        manager -- The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+        </div>
 		<div>
-		todo
+		Creates a new [name].
 		</div>
 
 
 		<h2>Methods</h2>
 
-
-
-		<h3>.load([page:todo url]) [page:todo]</h3>
-		<div>
-		url -- todo
-		</div>
-		<div>
-		todo
-		</div>
-
-		<h3>.removeEventListener([page:todo type], [page:todo listener]) [page:todo]</h3>
-		<div>
-		type -- todo <br />
-		listener -- todo
-		</div>
-		<div>
-		todo
-		</div>
-
-		<h3>.parse([page:todo json]) [page:todo]</h3>
+		<h3>.load( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] ) [page:Image]</h3>
 		<div>
-		json -- todo
+        onLoad -- Will be called when load completes. The argument will be the loaded Imageloader.
+        onProgress -- Will be called while load progresses. The argument will be the progress event.
+        onError -- Will be called when load errors.
+		url — required
 		</div>
 		<div>
-		todo
-		</div>
+        Begin loading from url and return the [page:Material material] object that will contain the data.
+        </div>
 
-		<h3>.addEventListener([page:todo type], [page:todo listener]) [page:todo]</h3>
+        <h3>.setCrossOrigin([page:String value])</h3>
 		<div>
-		type -- todo <br />
-		listener -- todo
+        value -- The crossOrigin string.
 		</div>
 		<div>
-		todo
-		</div>
+        The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
+        </div>
 
-		<h3>.dispatchEvent([page:todo event]) [page:todo]</h3>
-		<div>
-		event -- todo
+        <h3>.parse([page:Object json]) {
+        <div>
+        json -- The json object containing the parameters of the Material.
 		</div>
 		<div>
-		todo
-		</div>
-
-		<h3>.hasEventListener([page:todo type], [page:todo listener]) [page:todo]</h3>
-		<div>
-		type -- todo <br />
-		listener -- todo
-		</div>
-		<div>
-		todo
-		</div>
+        Creates a new [page:Material material] of the type 'json.type' and with parameters defined in the json object.
+        </div>
 
 		<h2>Source</h2>
 

+ 20 - 19
docs/api/materials/LineDashedMaterial.html

@@ -11,18 +11,22 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">A material for drawing wireframe-style geometries with dashed lines.</div>
 
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo parameters])</h3>
+		<h3>[name]([page:Object parameters])</h3>
+		<div>parameters is an object with one or more properties defining the material's appearance.</div>
 		<div>
-		parameters -- todo
-		</div>
-		<div>
-		todo
+		color — Line color in hexadecimal. Default is 0xffffff.<br />
+		linewidth — Line thickness. Default is 1.<br />
+		scale  — The scale of the dashed part of a line. Default is 1.<br />
+		dashSize  — The size of the dash. Default is 3.<br />
+		gapSize - The size of the gap. Default is 1.<br />
+		vertexColors — Define how the vertices gets colored. Default is THREE.NoColors.<br />
+		fog — Define whether the material color is affected by global fog settings. Default is false.
 		</div>
 
 
@@ -32,38 +36,35 @@
 
 		<h3>.[page:number scale]</h3>
 		<div>
-		todo
+		The scale of the dashed part of a line.
 		</div> 
 
 		<h3>.[page:Color color]</h3>
 		<div>
-		todo
+		Sets the color of the line. Default is 0xffffff.
 		</div> 
 
 		<h3>.[page:boolean vertexColors]</h3>
-		<div>
-		todo
-		</div> 
+		<div>Define how the vertices gets colored. Possible values are THREE.NoColors, THREE.FaceColors and THREE.VertexColors. Default is THREE.NoColors.</div>
+		<div>This setting might not have any effect when used with certain renderers.</div>
 
 		<h3>.[page:number dashSize]</h3>
 		<div>
-		todo
+		The size of the dash. This is both the gap with the stroke. Default is 3.
 		</div> 
 
 		<h3>.[page:boolean fog]</h3>
-		<div>
-		todo
-		</div> 
+		<div>Define whether the material color is affected by global fog settings.</div>
+		<div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.</div>
 
 		<h3>.[page:number gapSize]</h3>
 		<div>
-		todo
+		The size of the gap. Default is 1.
 		</div> 
 
 		<h3>.[page:number linewidth]</h3>
-		<div>
-		todo
-		</div> 
+		<div>Controls line thickness. Default is 1.</div>
+		<div>Due to limitations in the <a href="https://code.google.com/p/angleproject/" target="_blank">ANGLE layer</a>, on Windows platforms linewidth will always be 1 regardless of the set value.</div>
 
 		<h2>Methods</h2>
 

+ 8 - 8
docs/api/materials/Material.html

@@ -137,25 +137,25 @@
 		
 		<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
 		
-		<h3>.clone([page:todo material]) [page:todo]</h3>
+		<h3>.clone([page:material material]) [page:Material]</h3>
 		<div>
-		material -- todo
+		material -- this material gets the cloned information (optional). 
 		</div>
 		<div>
-		todo
+		This clones the material in the optional parameter and returns it.
 		</div>
 
-		<h3>.dispose() [page:todo]</h3>
+		<h3>.dispose()</h3>
 		<div>
-		todo
+		This disposes the material.
 		</div>
 
-		<h3>.setValues([page:todo values]) [page:todo]</h3>
+		<h3>.setValues([page:object values])</h3>
 		<div>
-		values -- todo
+		values -- a container with parameters.
 		</div>
 		<div>
-		todo
+		Sets the properties based on the *values*.
 		</div>
 
 		<h2>Source</h2>

+ 5 - 5
docs/api/materials/MeshBasicMaterial.html

@@ -83,24 +83,24 @@
 		<h3>.[page:Boolean morphTargets]</h3>
 		<div>Define whether the material uses morphTargets. Default is false.</div>	
 		
-		<h3>.[page:object map]</h3>
+		<h3>.[page:Texture map]</h3>
 		<div>
-		todo
+		Sets the texture map. Default is  null.
 		</div> 
 
 		<h3>.[page:number combine]</h3>
 		<div>
-		todo
+		How to combine the result of the surface's color with the environment map, if any.
 		</div> 
 
 		<h3>.[page:number reflectivity]</h3>
 		<div>
-		todo
+		How much the environment map affects the surface; also see "combine".
 		</div> 
 
 		<h3>.[page:number refractionRatio]</h3>
 		<div>
-		todo
+		The index of refraction for an environment map using [page:Textures THREE.CubeRefractionMapping]. Default is *0.98*.
 		</div> 
 
 		<h2>Methods</h2>

+ 1 - 1
docs/api/materials/MeshDepthMaterial.html

@@ -16,7 +16,7 @@
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo parameters])</h3>
+		<h3>[name]([page:Object parameters])</h3>
 		<div>
 		parameters is an object with one or more properties defining the material's appearance. 
 		</div>

+ 10 - 6
docs/api/materials/MeshFaceMaterial.html

@@ -11,18 +11,22 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">
+		A Material to define multiple materials for the same geometry. 
+		The geometry decides which material is used for which faces by the [page:Face3 faces materialindex].
+		The materialindex corresponds with the index of the material in the materials array.
+		</div>
 
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo materials])</h3>
+		<h3>[name]([page:Array materials])</h3>
 		<div>
-		materials -- todo
+		materials -- The materials for the geometry.
 		</div>
 		<div>
-		todo
+		Creates a MeshFaceMaterial with the correct materials.
 		</div>
 
 
@@ -30,9 +34,9 @@
 
 
 
-		<h3>.[page:array materials]</h3>
+		<h3>.[page:Array materials]</h3>
 		<div>
-		todo
+		Get or set the materials for the geometry. 
 		</div> 
 
 		<h2>Methods</h2>

+ 1 - 1
docs/api/materials/MeshNormalMaterial.html

@@ -17,7 +17,7 @@
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo parameters])</h3>
+		<h3>[name]([page:Object parameters])</h3>
 		<div>
 		parameters is an object with one or more properties defining the material's appearance. 
 		</div>

+ 1 - 6
docs/api/materials/MeshPhongMaterial.html

@@ -135,12 +135,7 @@
 		<h3>.[page:boolean wrapAround]</h3>
 		<div>
 		todo
-		</div> 
-
-		<h3>.[page:boolean perPixel]</h3>
-		<div>
-		todo
-		</div> 
+		</div>
 
 		<h3>.[page:object normalMap]</h3>
 		<div>

+ 2 - 2
docs/api/materials/ParticleSystemMaterial.html

@@ -22,7 +22,7 @@
 		
 		<div>
 		color — Particle color in hexadecimal. Default is 0xffffff.<br />
-		map — a [page:Texture texture]. Default is null. // TODO: specify what is its purpose<br />
+		map — a [page:Texture texture].If defined, then a point has the data from texture as colors. Default is null.<br />
 		size — Define size of particles. Default is 1.0.<br />
 		sizeAttenuation — Enable/disable size attenuation with distance.<br />
 		vertexColors — Define whether the material uses vertex colors, or not. Default is false.<br />
@@ -37,7 +37,7 @@
 		
 		<h3>.[page:Texture map]</h3>
 		
-		<div>Sets the color of the particles using data from a texture (?).</div>
+		<div>Sets the color of the particles using data from a texture.</div>
 		
 		<h3>.[page:Number size]</h3>
 		

+ 2 - 1
docs/api/math/Color.html

@@ -18,6 +18,7 @@
 		<code>var color = new THREE.Color();</code>
 		<code>var color = new THREE.Color( 0xff0000 );</code>
 		<code>var color = new THREE.Color("rgb(255,0,0)");</code>
+		<code>var color = new THREE.Color( 1, 0, 0 );</code>
 
 
 		<h2>Constructor</h2>
@@ -25,7 +26,7 @@
 
 		<h3>[name]( value )</h3>
 		<div>
-		value — optional argument that sets initial color.  Can be a hexadecimal or a CSS-style string, for example, "rgb(250, 0,0)", "rgb(100%,0%,0%)", "#ff0000", "#f00", or "red"
+		value — optional argument that sets initial color.  Can be a hexadecimal or a CSS-style string, for example, "rgb(250, 0,0)", "rgb(100%,0%,0%)", "#ff0000", "#f00", or "red", or three arguments that represent color channels.
 		</div>
 
 		<h2>Properties</h2>

+ 30 - 1
docs/api/math/Vector2.html

@@ -140,7 +140,36 @@
 		max -- [page:Vector2] containing the max x and y values in the desired range
 		</div>
 		<div>
-		If this vector's x or y value is greater than the max vector's x or y value, it is replaced by the corresponding value. <br />  If this vector's x or y value is less than the min vector's x or y value, it is replace by the corresponding value.
+		If this vector's x or y value is greater than the max vector's x or y value, it is replaced by the corresponding value. <br />	If this vector's x or y value is less than the min vector's x or y value, it is replace by the corresponding value.
+		</div>
+
+		<h3>.clampScalar([page:Float min], [page:Float max]) [page:Vector2 this]</h3>
+		<div>
+		min -- [page:Float] the minimum value the components will be clamped to <br />
+		max -- [page:Float] the maximum value the components will be clamped to
+		</div>
+		<div>
+		If this vector's x or y values are greater than the max value, they are replaced by the max value. <br />  If this vector's x or y values are less than the min value, they are replace by the min value.
+		</div>
+
+		<h3>.floor() [page:Vector2]</h3>
+		<div>
+		The components of the vector are rounded downwards (towards negative infinity) to an integer value.
+		</div>
+
+		<h3>.ceil() [page:Vector2]</h3>
+		<div>
+		The components of the vector are rounded upwards (towards positive infinity) to an integer value.
+		</div>
+
+		<h3>.round() [page:Vector2]</h3>
+		<div>
+		The components of the vector are rounded towards the nearest integer value.
+		</div>
+
+		<h3>.roundToZero() [page:Vector2]</h3>
+		<div>
+		The components of the vector are rounded towards zero (up if negative, down if positive) to an integer value.
 		</div>
 
 		<h3>.lerp([page:Vector2 v], [page:Float alpha]) [page:Vector2 this]</h3>

+ 32 - 3
docs/api/math/Vector3.html

@@ -190,6 +190,35 @@
 		If this vector's x, y or z value is less than the min vector's x, y or z value, it is replace by the corresponding value.
 		</div>
 
+		<h3>.clampScalar([page:Float min], [page:Float max]) [page:Vector3 this]</h3>
+		<div>
+		min -- [page:Float] the minimum value the components will be clamped to <br />
+		max -- [page:Float] the maximum value the components will be clamped to
+		</div>
+		<div>
+		If this vector's x, y or z values are greater than the max value, they are replaced by the max value. <br />  If this vector's x, y or z values are less than the min value, they are replace by the min value.
+		</div>
+
+		<h3>.floor() [page:Vector3]</h3>
+		<div>
+		The components of the vector are rounded downwards (towards negative infinity) to an integer value.
+		</div>
+
+		<h3>.ceil() [page:Vector3]</h3>
+		<div>
+		The components of the vector are rounded upwards (towards positive infinity) to an integer value.
+		</div>
+
+		<h3>.round() [page:Vector3]</h3>
+		<div>
+		The components of the vector are rounded towards the nearest integer value.
+		</div>
+
+		<h3>.roundToZero() [page:Vector3]</h3>
+		<div>
+		The components of the vector are rounded towards zero (up if negative, down if positive) to an integer value.
+		</div>
+
 		<h3>.applyMatrix3([page:Matrix3 m]) [page:Vector3 this]</h3>
 		<div>
 		m -- [page:Matrix3]
@@ -330,12 +359,12 @@
 		Sets this vector's x, y, and z equal to the column of the matrix specified by the index.
 		</div>
 
-		<h3>.reflect([page:Vector3 vector]) [page:Vector3 this]</h3>
+		<h3>.reflect([page:Vector3 normal]) [page:Vector3 this]</h3>
 		<div>
-		vector -- [page:Vector3] the vector to reflect about
+		normal -- [page:Vector3] the normal to the reflecting plane
 		</div>
 		<div>
-		Reflects this vector about a vector.
+		Reflect incident vector off of plane orthogonal to normal. normal is assumed to have unit length.
 		</div>
 
 		<h3>.fromArray([page:Array array]) [page:Vector3 this]</h3>

+ 31 - 1
docs/api/math/Vector4.html

@@ -130,6 +130,36 @@
 		If this vector's x, y, z, or w value is less than the min vector's x, y, z, or w value, it is replace by the corresponding value.
 		</div>
 
+		<h3>.clampScalar([page:Float min], [page:Float max]) [page:Vector4 this]</h3>
+		<div>
+		min -- [page:Float] the minimum value the components will be clamped to <br />
+		max -- [page:Float] the maximum value the components will be clamped to
+		</div>
+		<div>
+		If this vector's x, y, z or w values are greater than the max value, they are replaced by the max value. <br />
+		If this vector's x, y, z or w values are less than the min value, they are replace by the min value.
+		</div>
+
+		<h3>.floor() [page:Vector4]</h3>
+		<div>
+		The components of the vector are rounded downwards (towards negative infinity) to an integer value.
+		</div>
+
+		<h3>.ceil() [page:Vector4]</h3>
+		<div>
+		The components of the vector are rounded upwards (towards positive infinity) to an integer value.
+		</div>
+
+		<h3>.round() [page:Vector4]</h3>
+		<div>
+		The components of the vector are rounded towards the nearest integer value.
+		</div>
+
+		<h3>.roundToZero() [page:Vector4]</h3>
+		<div>
+		The components of the vector are rounded towards zero (up if negative, down if positive) to an integer value.
+		</div>
+
 		<h3>.applyMatrix4([page:Matrix4 m]) [page:Vector4 this]</h3>
 		<div>
 		m -- [page:Matrix4]
@@ -210,7 +240,7 @@
 		value -- [page:Float]
 		</div>
 		<div>
-		Sets the value of the vector component  x, y, or z by an index.<br/><br/>
+		Sets the value of the vector component	x, y, or z by an index.<br/><br/>
 		
 		Index 0: x<br/>
 		Index 1: y<br/>

+ 11 - 14
docs/api/objects/Bone.html

@@ -11,46 +11,43 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">A bone which is part of a SkinnedMesh.</div>
 
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo belongsToSkin])</h3>
+		<h3>[name]([page:SkinnedMesh belongsToSkin])</h3>
 		<div>
-		belongsToSkin -- todo
+		belongsToSkin -- An instance of [page:SkinnedMesh].
 		</div>
 		<div>
-		todo
+		This creates a new instance of a bone from the skin.
 		</div>
 
-
 		<h2>Properties</h2>
 
-
-
 		<h3>.[page:Matrix4 skinMatrix]</h3>
 		<div>
-		todo
+		The matrix of the bone.
 		</div> 
 
-		<h3>.[page:todo skin]</h3>
+		<h3>.[page:SkinnedMesh skin]</h3>
 		<div>
-		todo
+		The skin that contains this bone. 
 		</div> 
 
 		<h2>Methods</h2>
 
 
 
-		<h3>.update([page:todo parentSkinMatrix], [page:todo forceUpdate]) [page:todo]</h3>
+		<h3>.update([page:Matrix4 parentSkinMatrix], [page:boolean  forceUpdate])</h3>
 		<div>
-		parentSkinMatrix -- todo <br />
-		forceUpdate -- todo
+		parentSkinMatrix -- the matrix of the parent bone.<br />
+		forceUpdate -- force the update of the skinmatrix.
 		</div>
 		<div>
-		todo
+		This updates the matrix of the bone and the matrices of its children.
 		</div>
 
 		<h2>Source</h2>

+ 6 - 4
docs/api/objects/Mesh.html

@@ -50,12 +50,14 @@
 		<div>
 		name — a morph target name<br />
 		</div>
-
+		<div>
 		Returns the index of a morph target defined by name.
-
-		<h3>.updateMorphTargets() [page:todo]</h3>
+		</div>
+		
+		
+		<h3>.updateMorphTargets()</h3>
 		<div>
-		todo
+		Updates the morphtargets to have no influence on the object.
 		</div>
 
 		<h2>Source</h2>

+ 6 - 1
docs/api/objects/ParticleSystem.html

@@ -40,11 +40,16 @@
 
 		<h3>.[page:boolean sortParticles]</h3>
 		<div>
-		todo
+		When set, then the particles should be depth sorted (from far to near), based on camera, in the renderer every frame. 
 		</div> 
 
 		<h2>Methods</h2>
 		
+		<h3>.clone()</h3>
+		<div>
+		This creates a clone of the particle system.
+		</div> 
+		
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 15 - 17
docs/api/objects/SkinnedMesh.html

@@ -11,20 +11,20 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">An 3d object that has bones data. These Bones can then be used to animate the vertices of the object.</div>
 
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo geometry], [page:todo material], [page:todo useVertexTexture])</h3>
+		<h3>[name]([page:Geometry geometry], [page:Material material], [page:boolean useVertexTexture])</h3>
 		<div>
-		geometry -- todo <br />
-		material -- todo <br />
-		useVertexTexture -- todo
+                geometry — An instance of [page:Geometry].<br />
+                material — An instance of [page:Material] (optional).<br />
+		useVertexTexture -- Defines wether a vertex texture can be used (optional).
 		</div>
 		<div>
-		todo
+		This Creates a new instance of skinnedMesh. 
 		</div>
 
 
@@ -34,39 +34,37 @@
 
 		<h3>.[page:array bones]</h3>
 		<div>
-		todo
+		This contains the array of bones for this mesh. These should be set in the constructor.
 		</div> 
 
 		<h3>.[page:Matrix4 identityMatrix]</h3>
 		<div>
-		todo
+		This is an identityMatrix to calculate the bones matrices from.
 		</div> 
 
 		<h3>.[page:boolean useVertexTexture]</h3>
 		<div>
-		todo
+		The boolean defines whether a vertex texture is used to calculate the bones. This boolean shouldn't be changed after constructor.
 		</div> 
 
 		<h3>.[page:array boneMatrices]</h3>
 		<div>
-		todo
+		This array of matrices contains the matrices of the bones. These get calculated in the constructor.
 		</div> 
 
 		<h2>Methods</h2>
 
-
-
-		<h3>.pose() [page:todo]</h3>
+		<h3>.pose()</h3>
 		<div>
-		todo
+		This method sets the skinnedmesh in the rest pose.
 		</div>
 
-		<h3>.addBone([page:todo bone]) [page:todo]</h3>
+		<h3>.addBone([page:Bone bone]) [page:Bone]</h3>
 		<div>
-		bone -- todo
+		bone -- This is the bone that needs to be added. (optional)
 		</div>
 		<div>
-		todo
+		This method adds the bone to the skinnedmesh when it is provided. It creates a new bone and adds that when no bone is given.
 		</div>
 
 		<h2>Source</h2>

+ 20 - 9
docs/api/objects/Sprite.html

@@ -11,17 +11,26 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">A sprite is an plane in an 3d scene which faces always towards the camera. </div>
+
+                <h2>Example</h2>
+                
+                <code>
+                var map = THREE.ImageUtils.loadTexture( "sprite.png" );
+                var material = new THREE.SpriteMaterial( { map: map, color: 0xffffff, fog: true } );
+                var sprite = new THREE.Sprite( material );
+                scene.add( sprite );
+                </code>
 
 
 		<h2>Constructor</h2>
 
-		<h3>[name]([page:todo material])</h3>
+		<h3>[name]([page:Material material])</h3>
 		<div>
-		material -- todo
+                material — An instance of [page:Material] (optional).
 		</div>
 		<div>
-		todo
+		This creates a new sprite with an specific material.
 		</div>
 
 
@@ -29,13 +38,15 @@
 
 		<h3>.[page:SpriteMaterial material]</h3>
 		<div>
-		todo
+		An instance of [page:Material], defining the object's appearance. Default is a [page:SpriteMaterial] which is a white plane.
 		</div> 
+-
+           	<h2>Methods</h2>
 
-		<h3>.[page:Float rotation]</h3>
-		<div>
-		todo
-		</div>
+                <h3>.clone()</h3>
+                <div>
+                This creates a new clone of the sprite.
+                </div>
 
 
 		<h2>Source</h2>

+ 57 - 45
docs/api/renderers/CanvasRenderer.html

@@ -28,106 +28,118 @@
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo parameters])</h3>
-		<div>
-		parameters -- todo
-		</div>
+		<h3>[name]([page:object parameters])</h3>
+        <div>parameters is an optional object with properties defining the renderer's behaviour. The constructor also accepts no parameters at all. In all cases, it will assume sane defaults when parameters are missing.</div>
+
 		<div>
-		todo
+		canvas — A [page:Canvas] where the renderer draws its output.<br />
+		devicePixelRatio — The device its pixelRatio.<br />
 		</div>
 
 
 		<h2>Properties</h2>
 
 
-		<h3>.[page:object info]</h3>
-		<div>
-		todo
-		</div> 
+        <h3>.[page:Object info]</h3>
 
-		<h3>.[page:object domElement]</h3>
+		<div>An object with a series of statistical information about the graphics board memory and the rendering process. Useful for debugging or just for the sake of curiosity. The object contains the following fields:</div>
 		<div>
-		todo
-		</div> 
+		<ul>
+			<li>render:
+				<ul>
+					<li>vertices</li>
+					<li>faces</li>
+				</ul>
+			</li>
+		</ul>
+		</div>
+
+        <h3>.[page:DOMElement domElement]</h3>
+
+		<div>A [page:Canvas] where the renderer draws its output.<br />
+		This is automatically created by the renderer in the constructor (if not provided already); you just need to add it to your page.</div>
 
 		<h3>.[page:number devicePixelRatio]</h3>
 		<div>
-		todo
+		The pixel ration of the devices.
 		</div> 
 
-		<h3>.[page:boolean autoClear]</h3>
+		<h3>.[page:Boolean autoClear]</h3>
 		<div>
-		todo
-		</div> 
+        Defines whether the renderer should automatically clear its output before rendering.
+        </div>
 
-		<h3>.[page:boolean sortObjects]</h3>
+		<h3>.[page:Boolean sortObjects]</h3>
 		<div>
-		todo
-		</div> 
+        Defines whether the renderer should sort objects. Default is true.
+        </div>
+		<div>
+        Note: Sorting is used to attempt to properly render objects that have some degree of transparency.  By definition, sorting objects may not work in all cases.  Depending on the needs of application, it may be neccessary to turn off sorting and use other methods to deal with transparency rendering e.g. manually determining the object rendering order.
+        </div>
 
 		<h3>.[page:boolean sortElements]</h3>
 		<div>
-		todo
+		Defines whether the renderer should sort the face of each object. Default is true.
 		</div> 
 
 		<h2>Methods</h2>
 
 
-		<h3>.getMaxAnisotropy() [page:todo]</h3>
+		<h3>.getMaxAnisotropy() [page:number]</h3>
 		<div>
-		todo
+		This returns the anisotropy level of the textures.
 		</div>
 
-		<h3>.render([page:todo scene], [page:todo camera]) [page:todo]</h3>
+		<h3>.render( [page:Scene scene], [page:Camera camera])</h3>
 		<div>
-		scene -- todo <br />
-		camera -- todo
+		scene -- The scene to render. <br />
+		camera -- the camera to view the scene.
 		</div>
 		<div>
-		todo
+        Render a scene using a camera.
 		</div>
 
-		<h3>.clear() [page:todo]</h3>
+		<h3>.clear()</h3>
 		<div>
-		todo
+		Tells the renderer to clear its color drawing buffer with the clearcolor.
 		</div>
 
-		<h3>.setClearColor([page:todo color], [page:todo alpha]) [page:todo]</h3>
+		<h3>.setClearColor([page:Color color], [page:number alpha])</h3>
 		<div>
-		color -- todo <br />
-		alpha -- todo
+		color -- The color to clear the canvas with. <br />
+		alpha -- The alpha channel to clear the canvas with.
 		</div>
 		<div>
-		todo
+		This set the clearColor and the clearAlpha.
 		</div>
 
-		<h3>.setFaceCulling() [page:todo]</h3>
+		<h3>.setFaceCulling() </h3>
 		<div>
-		todo
+		Empty function to keep compability with [page:WebglRenderer].
 		</div>
 
-		<h3>.supportsVertexTextures() [page:todo]</h3>
+		<h3>.supportsVertexTextures()</h3>
 		<div>
-		todo
+		Empty function to keep compability with [page:WebglRenderer].
 		</div>
 
-		<h3>.setSize([page:todo width], [page:todo height], [page:todo updateStyle]) [page:todo]</h3>
+		<h3>.setSize([page:Number width], [page:Number height], [page:boolean updateStyle])</h3>
 		<div>
-		width -- todo <br />
-		height -- todo <br />
-		updateStyle -- todo
+		width -- The width of the drawing canvas. <br />
+		height -- The height of the drawing canvas. <br />
+		updateStyle -- If set, update the css of the canvas too.
 		</div>
 		<div>
-		todo
+		This set the size of the drawing canvas and if updateStyle is set, then the css of the canvas is updated too.
 		</div>
 
-		<h3>.setClearColorHex([page:todo hex], [page:todo alpha]) [page:todo]</h3>
+		<h3>.setClearColorHex([page:number hex], [page:number alpha])</h3>
 		<div>
-		hex -- todo <br />
-		alpha -- todo
+		hex -- The the hexadecimal value of the color to clear the canvas with. <br />
+        alpha -- The alpha channel to clear the canvas with.
 		</div>
 		<div>
-		todo
+		This set the clearColor and the clearAlpha.
 		</div>
 
 		<h2>Source</h2>

+ 6 - 10
docs/api/renderers/WebGLRenderTarget.html

@@ -9,26 +9,22 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">A render target is a buffer where the video card draws pixels for a scene that is being rendered in the background. It is used in different effects. </div>
 
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo width], [page:todo height], [page:todo options])</h3>
+		<h3>[name]([page:Number width], [page:Number height], [page:Object options])</h3>
 		<div>
-		width -- todo <br />
-		height -- todo <br />
-		options -- todo
+		width -- The width of the renderTarget. <br />
+		height -- The height of the renderTarget. <br />
+		options -- The options of the renderTarget. They are alot like the options of a texture.
 		</div>
 		<div>
-		todo
+		Creates a new renderTarget with a certain width and height.
 		</div>
 
-
-		<h3>[name]()</h3>
-
-
 		<h2>Properties</h2>
 
 

+ 104 - 83
docs/api/renderers/WebGLRenderer.html

@@ -38,7 +38,7 @@
 		<div>A [page:Canvas] where the renderer draws its output.<br />
 		This is automatically created by the renderer in the constructor (if not provided already); you just need to add it to your page.</div>
 
-		<h3>.[page:todo context]</h3>
+		<h3>.[page:WebGLRenderingContext context]</h3>
 
 		<div>The HTML5 Canvas's 'webgl' context obtained from the canvas where the renderer will draw.</div>
 
@@ -73,28 +73,24 @@
 
 		<div>Defines whether the renderer should auto update objects. Default is true.</div>
 
-		<div>TODO</div>
-
-		<!-- Physically based shading -->
-
 		<h3>.[page:Boolean gammaInput]</h3>
 
-		<div>Default is false. TODO</div>
+		<div>Default is false. If set, then it expects that all textures and colors are premultiplied gamma.</div>
 
 
 		<h3>.[page:Boolean gammaOutput]</h3>
 
-		<div>Default is false. TODO</div>
+		<div>Default is false.  If set, then it expects that all textures and colors need to be outputted in premultiplied gamma.</div>
 
 
 		<h3>.[page:Boolean shadowMapEnabled]</h3>
 
-		<div>Default is false. TODO</div>
+		<div>Default is false. If set, use shadow maps in the scene.</div>
 
 
 		<h3>.[page:Boolean shadowMapAutoUpdate]</h3>
 
-		<div>Default is true. TODO</div>
+		<div>Default is true. If set, autoupdate the shadowmaps every frame.</div>
 
 
 		<h3>.[page:Integer shadowMapType]</h3>
@@ -103,34 +99,34 @@
 		<div>Options are THREE.BasicShadowMap, THREE.PCFShadowMap, THREE.PCFSoftShadowMap. Default is THREE.PCFShadowMap.</div>
 
 
-		<h3>.[page:Boolean shadowMapCullFace]</h3>
+		<h3>.[page:Integer shadowMapCullFace]</h3>
 
-		<div>Default is true. TODO</div>
+		<div>Default is THREE.CullFaceFront. The faces that needed to be culled. Possible values: THREE.CullFaceFront and THREE.CullFaceBack</div>
 
 
-		<h3>.[page:Boolean shadowMapDebug]</h3>
+		<h3>[page:Boolean shadowMapDebug]</h3>
 
-		<div>Default is false. TODO</div>
+		<div>Default is false. If set, then the shadowmaps get a specific color to identify which shadow is from which shadowmap.</div>
 
 
 		<h3>.[page:Boolean shadowMapCascade]</h3>
 
-		<div>Default is false. TODO</div>
+		<div>Default is false. If Set, use cascaded shadowmaps. See [link:http://developer.download.nvidia.com/SDK/10.5/opengl/src/cascaded_shadow_maps/doc/cascaded_shadow_maps.pdf cascaded shadowmaps] for more information.</div>
 
 
 		<h3>.[page:Integer maxMorphTargets]</h3>
 
-		<div>Default is 8. TODO</div>
+		<div>Default is 8. The maximum number of MorphTargets allowed in a shader. Keep in mind that the standard materials only allow 8 MorphTargets.</div>
 
 
 		<h3>.[page:Integer maxMorphNormals]</h3>
 
-		<div>Default is 4. TODO</div>
+		<div>Default is 4. The maximum number of MorphNormals allowed in a shader. Keep in mind that the standard materials only allow 4 MorphNormals. </div>
 
 
 		<h3>.[page:Boolean autoScaleCubemaps]</h3>
 
-		<div>Default is true. TODO</div>
+		<div>Default is true. If set, then Cubemaps are scaled, when the are bigger the the maximum size, to make sure that they aren't bigger then the maximum size.</div>
 
 
 		<h3>.[page:Boolean renderPluginsPre]</h3>
@@ -170,17 +166,13 @@
 
 		<h3>.[page:ShadowMapPlugin shadowMapPlugin]</h3>
 		<div>
-		todo
+		This contains the reference to the shadowMapPlugin.
 		</div> 
 
-		<h3>.[page:number shadowMapCullFace]</h3>
-		<div>
-		todo
-		</div> 
 
 		<h3>.[page:number devicePixelRatio]</h3>
 		<div>
-		todo
+		The pixel ration of the devices. 
 		</div> 
 
 		<h2>Methods</h2>
@@ -240,121 +232,150 @@
 		<div>Tells the shadow map plugin to update using the passed scene and camera parameters.</div>
 
 
-		<h3>.renderBufferImmediate( [page:Object3D object], [page:??? program], [page:??? shading] )</h3>
+		<h3>.renderBufferImmediate( [page:Object3D object], [page:shaderprogram program], [page:Material shading] )</h3>
 		<div>object — an instance of [page:Object3D]]<br />
-		program — an instance of ???<br />
-		shading — an instance of ???<br />
+		program — an instance of shaderProgram<br />
+		shading — an instance of Material<br />
 		</div>
-		<div>TODO.</div>
+		<div>
+        Render an immediate buffer. Gets called by renderImmediateObject.
+        </div>
 
 
-		<h3>.renderBufferDirect(  camera, lights, fog, material, geometryGroup, object )</h3>
-		<div>TODO.</div>
+		<h3>.renderBufferDirect( [page:Camera camera], [page:Array lights], [page:Fog fog], [page:Material material], [page:Object geometryGroup], [page:Object3D object] )</h3>
+		<div>Render a buffer geometry group using the camera and with the correct material.</div>
 
 
-		<h3>.renderBuffer( camera, lights, fog, material, geometryGroup, object )</h3>
-		<div>TODO.</div>
+		<h3>.renderBuffer( [page:Camera camera], [page:Array lights], [page:Fog fog], [page:Material material], [page:Object geometryGroup], [page:Object3D object] )</h3>
+		<div>Render a geometry group using the camera and with the correct material.</div>
 
 
 		<h3>.render( [page:Scene scene], [page:Camera camera], [page:WebGLRenderTarget renderTarget], [page:Boolean forceClear] )</h3>
 		<div>Render a scene using a camera.</div>
 		<div>The render is done to the renderTarget (if specified) or to the canvas as usual.</div>
-		<div>If forceClear is true, the canvas will be cleared before rendering, even if the renderer's autoClear property is false.</div>
-
+        <div>If forceClear is true the depth, stencil and color buffers will be cleared before rendering even if the renderer's autoClear property is false.</div>
+        <div>Even with forceClear set to true you can prevent certain buffers being cleared by setting either the .autoClearColor, .autoClearStencil or .autoClearDepth properties to false.</div>
 
 		<h3>.renderImmediateObject( camera, lights, fog, material, object )</h3>
-		<div>TODO.</div>
+		<div>Renders an immediate Object using a camera.</div>
 
 
 		<h3>.initWebGLObjects( [page:Scene scene] )</h3>
-		<div>TODO.</div>
-
+		<div>
+		[page:Scene scene] -- The scene to initialize.
+		</div>
+		<div>
+		This method initializes the scene. This means adding and removing all objects from the scene and updating them to make sure we have the correct webgl buffers. 
+		</div>
 
-		<h3>.initMaterial( material, lights, fog, object )</h3>
-		<div>TODO.</div>
 
+		<h3>.initMaterial( [page:Material material], [page:Array lights], [page:Fog fog], [page:Object3D object])</h3>
+		<div>
+		[page:Material material] -- The material to initialize.<br />
+		[page:Array lights] -- An array of lights that influence the material.<br />
+		[page:Fog fog] -- The fog of the scene.<br />
+		[page:Object3D object] -- The object of the material that needs init.
+		</div>
+		<div>
+		This method initializes the material as a webgl program to be used.
+		</div>
 
 		<h3>.setFaceCulling( cullFace, frontFace )</h3>
 		<div>
-		[page:String cullFace] — "back", "front", "front_and_back", or false.<br />
-		[page:String frontFace] — "ccw" or "cw<br />
+		[page:String cullFace] —- "back", "front", "front_and_back", or false.<br />
+		[page:String frontFace] —- "ccw" or "cw<br />
 		</div>
 		<div>Used for setting the gl frontFace, cullFace states in the GPU, thus enabling/disabling face culling when rendering.</div>
 		<div>If cullFace is false, culling will be disabled.</div>
 
 
-		<h3>.setDepthTest( depthTest )</h3>
-		<div>TODO.</div>
-
-
-		<h3>.setDepthWrite( depthWrite )</h3>
-		<div>TODO.</div>
-
-
-		<h3>.setBlending( blending, blendEquation, blendSrc, blendDst )</h3>
-		<div>TODO.</div>
-
-
-		<h3>.setTexture( texture, slot )</h3>
-		<div>TODO.</div>
-
-
-		<h3>.setRenderTarget( renderTarget )</h3>
-		<div>TODO.</div>
+		<h3>.setDepthTest( [page:boolean depthTest] )</h3>
+		<div>
+		depthTest -- The boolean to decide if depth of a fragment needs to be tested against the depth buffer . <br />
+		</div>
+		<div>
+		This sets, based on depthTest, whether or not the depth data needs to be tested against the depth buffer.
+		</div>
 
+		<h3>.setDepthWrite( [page:boolean depthWrite] )</h3>
+		<div>
+		depthWrite -- The boolean to decide if depth of a fragment needs to be kept. <br />
+		</div>
+		<div>
+		This sets, based on depthWrite, whether or not the depth data needs to be written in the depth buffer.
+		</div>
 
 
-		<h3>.supportsCompressedTextureS3TC() [page:todo]</h3>
+		<h3>.setBlending( [page:number blending], [page:number blendEquation], [page:number blendSrc], [page:number blendDst] )</h3>
 		<div>
-		todo
+		blending -- A number indicating the blending mode. Possible value are THREE.NoBlending, THREE.NormalBlending, THREE.AdditiveBlending, THREE.SubtractiveBlending, THREE.MultiplyBlending or THREE.CustomBlending <br />
+		blendEquation -- When blending is THREE.CustomBlending, then you can set the blendEquation. Possible values are THREE.AddEquation, THREE.SubtractEquation or THREE.ReverseSubtractEquation.<br />
+		blendSrc -- When blending is THREE.CustomBlending, then you can set the blendSrc. Possible values are THREE.ZeroFactor, THREE.OneFactor,THREE.SrcColorFactor, THREE.OneMinusSrcColorFactor, THREE.SrcAlphaFactor, THREE.OneMinusSrcAlphaFactor, THREE.DstAlphaFactor, THREE.OneMinusDstAlphaFactor, THREE.DstColorFactor,THREE.OneMinusDstColorFactor or THREE.SrcAlphaSaturateFactor<br />
+		blendDst -- When blending is THREE.CustomBlending, then you can set the blendDst. Possible values are THREE.ZeroFactor, THREE.OneFactor,THREE.SrcColorFactor, THREE.OneMinusSrcColorFactor, THREE.SrcAlphaFactor, THREE.OneMinusSrcAlphaFactor, THREE.DstAlphaFactor, THREE.OneMinusDstAlphaFactor, THREE.DstColorFactor,THREE.OneMinusDstColorFactor or THREE.SrcAlphaSaturateFactor
 		</div>
-
-		<h3>.getMaxAnisotropy() [page:todo]</h3>
 		<div>
-		todo
+		This method sets the correct blending.
 		</div>
-
-		<h3>.getPrecision() [page:todo]</h3>
+		
+		<h3>.setTexture( [page:Texture texture], [page:number slot] )</h3>
 		<div>
-		todo
+		texture -- The [page:Texture texture] that needs to be set.<br />
+		slot -- The number indicating which slot should be used by the texture.
+		</div>
+		<div>
+		This method sets the correct texture to the correct slot for the wegl shader. The slot number can be found as a value of the uniform of the sampler.
+		</div>
+		
+		<h3>.setRenderTarget( [page:WebGLRenderTarget renderTarget] )</h3>
+		<div>
+		renderTarget -- The [page:WebGLRenderTarget renderTarget] that needs to be activated.<br />
+		</div>
+		<div>
+		This method sets the active rendertarget.
 		</div>
 
-		<h3>.setMaterialFaces([page:todo material]) [page:todo]</h3>
+		<h3>.supportsCompressedTextureS3TC() [page:boolean]</h3>
 		<div>
-		material -- todo
+		This method returns true if the webgl implementation supports compressed textures of the format S3TC.
 		</div>
+
+		<h3>.getMaxAnisotropy() [page:number]</h3>
 		<div>
-		todo
+		This returns the anisotropy level of the textures.
 		</div>
 
-		<h3>.supportsStandardDerivatives() [page:todo]</h3>
+		<h3>.getPrecision() [page:string]</h3>
 		<div>
-		todo
+		This gets the precision used by the shaders. It returns "highp","mediump" or "lowp".
 		</div>
 
-		<h3>.supportsFloatTextures() [page:todo]</h3>
+		<h3>.setMaterialFaces([page:Material material])</h3>
 		<div>
-		todo
+		material -- The [page:Material material] with side that shouldn't be culled.  
+		</div>
+		<div>
+		This sets which side needs to be culled in the webgl renderer.
 		</div>
 
-		<h3>.clearTarget([page:todo renderTarget], [page:todo color], [page:todo depth], [page:todo stencil]) [page:todo]</h3>
+		<h3>.supportsStandardDerivatives() [page:boolean]</h3>
 		<div>
-		renderTarget -- todo <br />
-		color -- todo <br />
-		depth -- todo <br />
-		stencil -- todo
+		This method returns true if the webgl implementation supports standard derivatives.
 		</div>
+
+		<h3>.supportsFloatTextures() [page:boolean]</h3>
 		<div>
-		todo
+		This method returns true if the webgl implementation supports float textures.
 		</div>
 
-		<h3>.setClearColorHex([page:todo hex], [page:todo alpha]) [page:todo]</h3>
+		<h3>.clearTarget([page:WebGLRenderTarget renderTarget], [page:boolean color], [page:boolean depth], [page:boolean stencil]) </h3>
 		<div>
-		hex -- todo <br />
-		alpha -- todo
+		renderTarget -- The [page:WebGLRenderTarget renderTarget] that needs to be cleared.<br />
+		color -- If set, then the color gets cleared. <br />
+		depth -- If set, then the depth gets cleared. <br />
+		stencil -- If set, then the stencil gets cleared.
 		</div>
 		<div>
-		todo
+		This method clears a rendertarget. To do this, it activates the rendertarget.
 		</div>
 
 		<h2>Source</h2>

+ 11 - 9
docs/api/renderers/renderables/RenderableObject.html

@@ -9,7 +9,7 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">This class is a wrapper class to contain extra information about the object that needs to be rendered.</div>
 
 
 		<h2>Constructor</h2>
@@ -17,25 +17,27 @@
 
 		<h3>[name]()</h3>
 		<div>
-		todo
+		Creates a new [name]. This is used in [page:Projector].
 		</div>
 
 
-		<h3>[name]()</h3>
-
-
 		<h2>Properties</h2>
 
 
 
-		<h3>.[page:object object]</h3>
+		<h3>.[page:Object3d object]</h3>
 		<div>
-		todo
+		The object that needs to be rendered.
 		</div> 
 
-		<h3>.[page:object z]</h3>
+		<h3>.[page:Number z]</h3>
+		<div>
+		This contains the the z index of the object. This makes it faster/easier to sort the object based on its z-index.  
+		</div> 
+		
+		<h3>.[page:Number id]</h3>
 		<div>
-		todo
+		This contains the the id of the object.
 		</div> 
 
 		<h2>Methods</h2>

+ 3 - 6
docs/api/scenes/Scene.html

@@ -18,7 +18,7 @@
 
 		<h3>[name]()</h3>
 		<div>
-		todo
+		Create a new scene object.
 		</div>
 
 
@@ -32,13 +32,10 @@
 		
 		<div>If not null, it will force everything in the scene to be rendered with that material. Default is null.</div>
 		
-		<h3>.[page:Boolean matrixAutoUpdate]</h3>
-		
-		<div>??? - Default is false.</div>
-		
 		<h3>.[page:boolean autoUpdate]</h3>
 		<div>
-		todo
+		Default is true. If set, then the renderer checks every frame if the scene and it's objects needs matrix updates. 
+		When it isn't, then you have to maintain all matrices in the scene yourself.  
 		</div> 
 
 		<h2>Methods</h2>

+ 16 - 15
docs/api/textures/CompressedTexture.html

@@ -11,28 +11,29 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">
+			Creates a texture based on data in compressed form.
+		</div>
 
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo mipmaps], [page:todo width], [page:todo height], [page:todo format], [page:todo type], [page:todo mapping], [page:todo wrapS], [page:todo wrapT], [page:todo magFilter], [page:todo minFilter], [page:todo anisotropy])</h3>
+		<h3>[name]([page:Array mipmaps], [page:Number width], [page:Number height], [page:Number format], [page:Number type], [page:Number mapping], [page:Number wrapS], [page:Number wrapT], [page:Number magFilter], [page:Number minFilter], [page:Number anisotropy])</h3>
 		<div>
-		mipmaps -- todo <br />
-		width -- todo <br />
-		height -- todo <br />
-		format -- todo <br />
-		type -- todo <br />
-		mapping -- todo <br />
-		wrapS -- todo <br />
-		wrapT -- todo <br />
-		magFilter -- todo <br />
-		minFilter -- todo <br />
-		anisotropy -- todo
-		</div>
+		mipmaps -- The mipmaps array should contains objects with data, width and height. The mipmaps should be from of the correct format and type. <br />
+		width -- The width of the biggest mipmap<br />
+		height -- The height of the biggest mipmap <br />
+		format -- The format used in the mipmaps <br />
+		type -- The type used in the mipmaps <br />
+		mapping --  How the image is applied to the object. An object type of THREE.UVMapping() is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; THREE.SphericalReflectionMapping, a spherical reflection map projection; and THREE.SphericalRefractionMapping.<br />
+		wrapS -- The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.<br />
+		wrapT -- The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.<br />
+		magFilter -- How the texture is sampled when a texel covers more than one pixel. The default is THREE.LinearFilter, which takes the four closest texels and bilinearly interpolates among them. The other option is THREE.NearestFilter, which uses the value of the closest texels.<br />
+		minFilter -- How the texture is sampled when a texel covers less than one pixel. The default is THREE.LinearMipMapLinearFilter, which uses mipmapping and a trilinear filter. Other choices are THREE.NearestFilter, THREE.NearestMipMapNearestFilter, THREE.NearestMipMapLinearFilter, THREE.LinearFilter, and THREE.LinearMipMapNearestFilter. These vary whether the nearest texel or nearest four texels are retrieved on the nearest mipmap or nearest two mipmaps. Interpolation occurs among the samples retrieved.<br />
+		anisotropy -- The number of samples taken along the axis through the pixel that has the highest density of texels. By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used. Use renderer.getMaxAnisotropy() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.</div>
 		<div>
-		todo
+		This creates a texture from compressed data. This is mostly used in ImageUtils.loadCompressedTexture.
 		</div>
 
 

+ 19 - 14
docs/api/textures/DataTexture.html

@@ -9,28 +9,33 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">
+		Creates a texture directly from bitmapdata, width and height.
+		</div>
 
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo data], [page:todo width], [page:todo height], [page:todo format], [page:todo type], [page:todo mapping], [page:todo wrapS], [page:todo wrapT], [page:todo magFilter], [page:todo minFilter], [page:todo anisotropy])</h3>
+		<h3>[name]([page:ArraybufferView data], [page:Integer width], [page:Integer height], [page:number format], [page:number type], [page:number mapping], [page:number wrapS], [page:number wrapT], [page:number magFilter], [page:number minFilter], [page:number anisotropy])</h3>
 		<div>
-		data -- todo <br />
-		width -- todo <br />
-		height -- todo <br />
-		format -- todo <br />
-		type -- todo <br />
-		mapping -- todo <br />
-		wrapS -- todo <br />
-		wrapT -- todo <br />
-		magFilter -- todo <br />
-		minFilter -- todo <br />
-		anisotropy -- todo
+		data -- The data should be arraybufferview. It contains the data of image based on the type and format.<br />
+		width -- The width of the image. <br />
+		height -- The height of the image. <br />
+		format -- The default is THREE.RGBAFormat for the texture. Other formats are: THREE.AlphaFormat, THREE.RGBFormat, THREE.LuminanceFormat, and THREE.LuminanceAlphaFormat. There are also compressed texture formats, if the S3TC extension is supported: THREE.RGB_S3TC_DXT1_Format, THREE.RGBA_S3TC_DXT1_Format, THREE.RGBA_S3TC_DXT3_Format, and THREE.RGBA_S3TC_DXT5_Format.<br />
+		type -- The default is THREE.UnsignedByteType. Other valid types (as WebGL allows) are THREE.ByteType, THREE.ShortType, THREE.UnsignedShortType, THREE.IntType, THREE.UnsignedIntType, THREE.FloatType, THREE.UnsignedShort4444Type, THREE.UnsignedShort5551Type, and THREE.UnsignedShort565Type.<br />
+		mapping -- How the image is applied to the object. An object type of THREE.UVMapping() is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; THREE.SphericalReflectionMapping, a spherical reflection map projection; and THREE.SphericalRefractionMapping.<br />
+		wrapS -- The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.<br />
+		wrapT -- The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.<br />
+		magFilter -- How the texture is sampled when a texel covers more than one pixel. The default is THREE.LinearFilter, which takes the four closest texels and bilinearly interpolates among them. The other option is THREE.NearestFilter, which uses the value of the closest texel.<br />
+		minFilter -- How the texture is sampled when a texel covers less than one pixel. The default is THREE.LinearMipMapLinearFilter, which uses mipmapping and a trilinear filter. Other choices are THREE.NearestFilter, THREE.NearestMipMapNearestFilter, THREE.NearestMipMapLinearFilter, THREE.LinearFilter, and THREE.LinearMipMapNearestFilter. These vary whether the nearest texel or nearest four texels are retrieved on the nearest mipmap or nearest two mipmaps. Interpolation occurs among the samples retrieved.<br />
+		anisotropy -- The number of samples taken along the axis through the pixel that has the highest density of texels. By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used. Use renderer.getMaxAnisotropy() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.
 		</div>
 		<div>
-		todo
+		This loads a image through the bitmap values. The values are dependant on the type and format.
+	 	If the type is THREE.UnsignedByteType, a Uint8Array must be supplied. If it is THREE.UnsignedShort4444Type, THREE.UnsignedShort5551Type or THREE.UnsignedShort565Type, a Uint16Array must be supplied.<br />
+	 	If the format is THREE.RGBAFormat, data needs 4 values for 1 pixel. These are supplied in the Red,Green,Blue and alpha sequence. <br />
+	 	Except if the type is THREE.UnsignedShort4444Type, THREE.UnsignedShort5551Type or THREE.UnsignedShort565Type.
 		</div>
 
 

+ 149 - 152
docs/api/textures/Texture.html

@@ -1,152 +1,149 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8" />
-		<script src="../../list.js"></script>
-		<script src="../../page.js"></script>
-		<link type="text/css" rel="stylesheet" href="../../page.css" />
-	</head>
-	<body>
-		<h1>[name]</h1>
-
-		<div class="desc">Create a texture to apply to a surface or as a reflection or refraction map.</div>
-
-
-		<h2>Constructor</h2>
-
-		<h3>[name]( image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy )</h3>
-
-		<h2>Example</h2>
-
-		<code>
-		// load a texture, set wrap mode to repeat
-		var texture = THREE.ImageUtils.loadTexture( "textures/water.jpg" );
-		texture.wrapS = THREE.RepeatWrapping;
-		texture.wrapT = THREE.RepeatWrapping;
-		texture.repeat.set( 4, 4 );
-		</code>
-
-		<h2>Properties</h2>
-
-		<h3>.[page:Image image]</h3>
-		<div>
-		An Image object, typically created using the ImageUtils or [page:ImageLoader ImageLoader] classes. The Image object can include an image (e.g., PNG, JPG, GIF, DDS), video (e.g., MP4, OGG/OGV), or set of six images for a cube map. To use video as a texture you need to have a playing HTML5 video element as a source for your texture image and continuously update this texture as long as video is playing.
-		</div>
-
-		<h3>.[page:object mapping]</h3>
-		<div>
-		How the image is applied to the object. An object type of THREE.UVMapping() is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; THREE.SphericalReflectionMapping, a spherical reflection map projection; and THREE.SphericalRefractionMapping.
-		</div>
-
-		<h3>.[page:number wrapS]</h3>
-		<div>
-		The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.
-		</div>
-
-		<h3>.[page:number wrapT]</h3>
-		<div>
-		The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.
-		</div>
-
-		<h3>.[page:number magFilter]</h3>
-		<div>
-		How the texture is sampled when a texel covers more than one pixel. The default is THREE.LinearFilter, which takes the four closest texels and bilinearly interpolates among them. The other option is THREE.NearestFilter, which uses the value of the closest texel.
-		</div>
-
-		<h3>.[page:number minFilter]</h3>
-		<div>
-		How the texture is sampled when a texel covers less than one pixel. The default is THREE.LinearMipMapLinearFilter, which uses mipmapping and a trilinear filter. Other choices are THREE.NearestFilter, THREE.NearestMipMapNearestFilter, THREE.NearestMipMapLinearFilter, THREE.LinearFilter, and THREE.LinearMipMapNearestFilter. These vary whether the nearest texel or nearest four texels are retrieved on the nearest mipmap or nearest two mipmaps. Interpolation occurs among the samples retrieved.
-		</div>
-
-		<h3>.[page:number format]</h3>
-		<div>
-		The default is THREE.RGBAFormat for the texture. Other formats are: THREE.AlphaFormat, THREE.RGBFormat, THREE.LuminanceFormat, and THREE.LuminanceAlphaFormat. There are also compressed texture formats, if the S3TC extension is supported: THREE.RGB_S3TC_DXT1_Format, THREE.RGBA_S3TC_DXT1_Format, THREE.RGBA_S3TC_DXT3_Format, and THREE.RGBA_S3TC_DXT5_Format.
-		</div>
-
-		<h3>.[page:number type]</h3>
-		<div>
-		The default is THREE.UnsignedByteType. Other valid types (as WebGL allows) are THREE.ByteType, THREE.ShortType, THREE.UnsignedShortType, THREE.IntType, THREE.UnsignedIntType, THREE.FloatType, THREE.UnsignedShort4444Type, THREE.UnsignedShort5551Type, and THREE.UnsignedShort565Type.
-		</div>
-
-		<h3>.[page:number anisotropy]</h3>
-		<div>
-		The number of samples taken along the axis through the pixel that has the highest density of texels. By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used. Use renderer.getMaxAnisotropy() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.
-		</div>
-
-		<h3>.[page:boolean needsUpdate]</h3>
-		<div>
-		If a texture is changed after creation, set this flag to true so that the texture is properly set up. Particularly important for setting the wrap mode.
-		</div>
-
-		<h3>.[page:Vector2 repeat]</h3>
-		<div>
-		How many times the texture is repeated across the surface, in each direction U and V.
-		</div>
-
-		<h3>.[page:Vector2 offset]</h3>
-		<div>
-		How much a single repetition of the texture is offset from the beginning, in each direction U and V. Typical range is 0.0 to 1.0.
-		</div>
-
-		<h3>.[page:string name]</h3>
-		<div>
-		Given name of the texture, empty string by default.
-		</div>
-
-		<h3>.[page:boolean generateMipmaps]</h3>
-		<div>
-		Whether to generate mipmaps (if possible) for a texture. True by default.
-		</div>
-
-		<h3>.[page:boolean flipY]</h3>
-		<div>
-		False by default, set this to true if the texture needs to be flipped vertically.
-		</div>
-
-		<h3>.[page:array mipmaps]</h3>
-		<div>
-		Array of mipmaps generated.
-		</div>
-
-		<h3>.[page:number unpackAlignment]</h3>
-		<div>
-		4 by default. Specifies the alignment requirements for the start of each pixel row in memory. The allowable values are 1 (byte-alignment), 2 (rows aligned to even-numbered bytes), 4 (word-alignment), and 8 (rows start on double-word boundaries). See <a href="http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml">glPixelStorei</a> for more information.
-		</div>
-
-		<h3>.[page:boolean premultiplyAlpha]</h3>
-		<div>
-		False by default, which is the norm for PNG images. Set to true if the RGB values have been stored premultiplied by alpha.
-		</div>
-
-		<h3>.[page:object onUpdate]</h3>
-		<div>
-		A callback function, called when the texture is updated (e.g., when needsUpdate has been set to true and then the texture is used).
-		</div>
-
-		<h3>.[page:number id]</h3>
-		<div>
-		An internal ID number, starting from 0; should not be modified. THREE.TextureIdCount is the number of textures created so far.
-		</div>
-
-		<h2>Methods</h2>
-
-		<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
-
-		<h3>.clone([page:todo texture]) [page:todo]</h3>
-		<div>
-		Make copy of texture. Note this is not a "deep copy", the image is shared.
-		</div>
-		<div>
-		todo
-		</div>
-
-		<h3>.dispose() [page:todo]</h3>
-		<div>
-		Call [page:EventDispatcher EventDispatcher].dispatchEvent with a 'dispose' event type.
-		</div>
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-	</body>
-</html>
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="utf-8" />
+		<script src="../../list.js"></script>
+		<script src="../../page.js"></script>
+		<link type="text/css" rel="stylesheet" href="../../page.css" />
+	</head>
+	<body>
+		<h1>[name]</h1>
+
+		<div class="desc">Create a texture to apply to a surface or as a reflection or refraction map.</div>
+
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy )</h3>
+
+		<h2>Example</h2>
+
+		<code>
+		// load a texture, set wrap mode to repeat
+		var texture = THREE.ImageUtils.loadTexture( "textures/water.jpg" );
+		texture.wrapS = THREE.RepeatWrapping;
+		texture.wrapT = THREE.RepeatWrapping;
+		texture.repeat.set( 4, 4 );
+		</code>
+
+		<h2>Properties</h2>
+
+		<h3>.[page:Image image]</h3>
+		<div>
+		An Image object, typically created using the ImageUtils or [page:ImageLoader ImageLoader] classes. The Image object can include an image (e.g., PNG, JPG, GIF, DDS), video (e.g., MP4, OGG/OGV), or set of six images for a cube map. To use video as a texture you need to have a playing HTML5 video element as a source for your texture image and continuously update this texture as long as video is playing.
+		</div>
+
+		<h3>.[page:object mapping]</h3>
+		<div>
+		How the image is applied to the object. An object type of THREE.UVMapping() is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; THREE.SphericalReflectionMapping, a spherical reflection map projection; and THREE.SphericalRefractionMapping.
+		</div>
+
+		<h3>.[page:number wrapS]</h3>
+		<div>
+		The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.
+		</div>
+
+		<h3>.[page:number wrapT]</h3>
+		<div>
+		The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.
+		</div>
+
+		<h3>.[page:number magFilter]</h3>
+		<div>
+		How the texture is sampled when a texel covers more than one pixel. The default is THREE.LinearFilter, which takes the four closest texels and bilinearly interpolates among them. The other option is THREE.NearestFilter, which uses the value of the closest texel.
+		</div>
+
+		<h3>.[page:number minFilter]</h3>
+		<div>
+		How the texture is sampled when a texel covers less than one pixel. The default is THREE.LinearMipMapLinearFilter, which uses mipmapping and a trilinear filter. Other choices are THREE.NearestFilter, THREE.NearestMipMapNearestFilter, THREE.NearestMipMapLinearFilter, THREE.LinearFilter, and THREE.LinearMipMapNearestFilter. These vary whether the nearest texel or nearest four texels are retrieved on the nearest mipmap or nearest two mipmaps. Interpolation occurs among the samples retrieved.
+		</div>
+
+		<h3>.[page:number format]</h3>
+		<div>
+		The default is THREE.RGBAFormat for the texture. Other formats are: THREE.AlphaFormat, THREE.RGBFormat, THREE.LuminanceFormat, and THREE.LuminanceAlphaFormat. There are also compressed texture formats, if the S3TC extension is supported: THREE.RGB_S3TC_DXT1_Format, THREE.RGBA_S3TC_DXT1_Format, THREE.RGBA_S3TC_DXT3_Format, and THREE.RGBA_S3TC_DXT5_Format.
+		</div>
+
+		<h3>.[page:number type]</h3>
+		<div>
+		The default is THREE.UnsignedByteType. Other valid types (as WebGL allows) are THREE.ByteType, THREE.ShortType, THREE.UnsignedShortType, THREE.IntType, THREE.UnsignedIntType, THREE.FloatType, THREE.UnsignedShort4444Type, THREE.UnsignedShort5551Type, and THREE.UnsignedShort565Type.
+		</div>
+
+		<h3>.[page:number anisotropy]</h3>
+		<div>
+		The number of samples taken along the axis through the pixel that has the highest density of texels. By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used. Use renderer.getMaxAnisotropy() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.
+		</div>
+
+		<h3>.[page:boolean needsUpdate]</h3>
+		<div>
+		If a texture is changed after creation, set this flag to true so that the texture is properly set up. Particularly important for setting the wrap mode.
+		</div>
+
+		<h3>.[page:Vector2 repeat]</h3>
+		<div>
+		How many times the texture is repeated across the surface, in each direction U and V.
+		</div>
+
+		<h3>.[page:Vector2 offset]</h3>
+		<div>
+		How much a single repetition of the texture is offset from the beginning, in each direction U and V. Typical range is 0.0 to 1.0.
+		</div>
+
+		<h3>.[page:string name]</h3>
+		<div>
+		Given name of the texture, empty string by default.
+		</div>
+
+		<h3>.[page:boolean generateMipmaps]</h3>
+		<div>
+		Whether to generate mipmaps (if possible) for a texture. True by default.
+		</div>
+
+		<h3>.[page:boolean flipY]</h3>
+		<div>
+		False by default, set this to true if the texture needs to be flipped vertically.
+		</div>
+
+		<h3>.[page:array mipmaps]</h3>
+		<div>
+		Array of mipmaps generated.
+		</div>
+
+		<h3>.[page:number unpackAlignment]</h3>
+		<div>
+		4 by default. Specifies the alignment requirements for the start of each pixel row in memory. The allowable values are 1 (byte-alignment), 2 (rows aligned to even-numbered bytes), 4 (word-alignment), and 8 (rows start on double-word boundaries). See <a href="http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml">glPixelStorei</a> for more information.
+		</div>
+
+		<h3>.[page:boolean premultiplyAlpha]</h3>
+		<div>
+		False by default, which is the norm for PNG images. Set to true if the RGB values have been stored premultiplied by alpha.
+		</div>
+
+		<h3>.[page:object onUpdate]</h3>
+		<div>
+		A callback function, called when the texture is updated (e.g., when needsUpdate has been set to true and then the texture is used).
+		</div>
+
+		<h3>.[page:number id]</h3>
+		<div>
+		An internal ID number, starting from 0; should not be modified. THREE.TextureIdCount is the number of textures created so far.
+		</div>
+
+		<h2>Methods</h2>
+
+		<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
+
+		<h3>.clone([page:Texture texture])</h3>
+		<div>
+		Make copy of texture. Note this is not a "deep copy", the image is shared.
+		</div>
+
+		<h3>.dispose()</h3>
+		<div>
+		Call [page:EventDispatcher EventDispatcher].dispatchEvent with a 'dispose' event type.
+		</div>
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 1 - 0
docs/list.js

@@ -188,6 +188,7 @@ var list = {
 		"Extras / Helpers": [
 			[ "ArrowHelper", "api/extras/helpers/ArrowHelper" ],
 			[ "AxisHelper", "api/extras/helpers/AxisHelper" ],
+			[ "BoundingBoxHelper", "api/extras/helpers/BoundingBoxHelper" ],
 			[ "CameraHelper", "api/extras/helpers/CameraHelper" ],
 			[ "DirectionalLightHelper", "api/extras/helpers/DirectionalLightHelper" ],
 			[ "GridHelper", "api/extras/helpers/GridHelper" ],

+ 1 - 1
editor/css/types.css

@@ -32,7 +32,7 @@
 	color: #88ff88;
 }
 
-.CubeGeometry {
+.BoxGeometry {
 	color: #bbeebb;
 }
 .TorusGeometry {

+ 2 - 1
editor/index.html

@@ -35,6 +35,7 @@
 		<script src="../examples/js/BufferGeometryUtils.js"></script>
 
 		<script src="../examples/js/exporters/BufferGeometryExporter.js"></script>
+		<script src="../examples/js/exporters/Geometry2Exporter.js"></script>
 		<script src="../examples/js/exporters/GeometryExporter.js"></script>
 		<script src="../examples/js/exporters/MaterialExporter.js"></script>
 		<script src="../examples/js/exporters/ObjectExporter.js"></script>
@@ -61,8 +62,8 @@
 		<script src="js/Sidebar.Object3D.js"></script>
 		<script src="js/Sidebar.Geometry.js"></script>
 		<script src="js/Sidebar.Animation.js"></script>
+		<script src="js/Sidebar.Geometry.BoxGeometry.js"></script>
 		<script src="js/Sidebar.Geometry.CircleGeometry.js"></script>
-		<script src="js/Sidebar.Geometry.CubeGeometry.js"></script>
 		<script src="js/Sidebar.Geometry.CylinderGeometry.js"></script>
 		<script src="js/Sidebar.Geometry.IcosahedronGeometry.js"></script>
 		<script src="js/Sidebar.Geometry.PlaneGeometry.js"></script>

+ 22 - 58
editor/js/Editor.js

@@ -175,82 +175,45 @@ Editor.prototype = {
 
 		return function ( object ) {
 
-			if ( object instanceof THREE.Camera ) {
-
-				var picker = new THREE.Mesh( geometry, material );
-				picker.name = 'picker';
-				picker.userData.object = object;
-				picker.visible = false;
+			var helper;
 
-				var helper = new THREE.CameraHelper( object, 10 );
-				helper.add( picker );
-			
-				this.sceneHelpers.add( helper );
-				this.helpers[ object.id ] = helper;
+			if ( object instanceof THREE.Camera ) {
 
-				this.signals.helperAdded.dispatch( helper );
+				helper = new THREE.CameraHelper( object, 10 );
 
 			} else if ( object instanceof THREE.PointLight ) {
 
-				var picker = new THREE.Mesh( geometry, material );
-				picker.name = 'picker';
-				picker.userData.object = object;
-				picker.visible = false;
-
-				var helper = new THREE.PointLightHelper( object, 10 );
-				helper.add( picker );
-			
-				this.sceneHelpers.add( helper );
-				this.helpers[ object.id ] = helper;
-
-				this.signals.helperAdded.dispatch( helper );
+				helper = new THREE.PointLightHelper( object, 10 );
 
 			} else if ( object instanceof THREE.DirectionalLight ) {
 
-				var picker = new THREE.Mesh( geometry, material );
-				picker.name = 'picker';
-				picker.userData.object = object;
-				picker.visible = false;
-
-				var helper = new THREE.DirectionalLightHelper( object, 20 );
-				helper.add( picker );
-
-				this.sceneHelpers.add( helper );
-				this.helpers[ object.id ] = helper;
-
-				this.signals.helperAdded.dispatch( helper );
+				helper = new THREE.DirectionalLightHelper( object, 20 );
 
 			} else if ( object instanceof THREE.SpotLight ) {
 
-				var picker = new THREE.Mesh( geometry, material );
-				picker.name = 'picker';
-				picker.userData.object = object;
-				picker.visible = false;
-
-				var helper = new THREE.SpotLightHelper( object, 10 );
-				helper.add( picker );
+				helper = new THREE.SpotLightHelper( object, 10 );
 
-				this.sceneHelpers.add( helper );
-				this.helpers[ object.id ] = helper;
+			} else if ( object instanceof THREE.HemisphereLight ) {
 
-				this.signals.helperAdded.dispatch( helper );
+				helper = new THREE.HemisphereLightHelper( object, 10 );
 
-			} else if ( object instanceof THREE.HemisphereLight ) {
+			} else {
 
-				var picker = new THREE.Mesh( geometry, material );
-				picker.name = 'picker';
-				picker.userData.object = object;
-				picker.visible = false;
+				// no helper for this object type
+				return;
 
-				var helper = new THREE.HemisphereLightHelper( object, 10 );
-				helper.add( picker );
+			}
 
-				this.sceneHelpers.add( helper );
-				this.helpers[ object.id ] = helper;
+			var picker = new THREE.Mesh( geometry, material );
+			picker.name = 'picker';
+			picker.userData.object = object;
+			picker.visible = false;
+			helper.add( picker );
 
-				this.signals.helperAdded.dispatch( helper );
+			this.sceneHelpers.add( helper );
+			this.helpers[ object.id ] = helper;
 
-			}
+			this.signals.helperAdded.dispatch( helper );
 
 		};
 
@@ -376,8 +339,8 @@ Editor.prototype = {
 
 		var types = {
 
+			'BoxGeometry': THREE.BoxGeometry,
 			'CircleGeometry': THREE.CircleGeometry,
-			'CubeGeometry': THREE.CubeGeometry,
 			'CylinderGeometry': THREE.CylinderGeometry,
 			'ExtrudeGeometry': THREE.ExtrudeGeometry,
 			'IcosahedronGeometry': THREE.IcosahedronGeometry,
@@ -394,6 +357,7 @@ Editor.prototype = {
 			'TorusKnotGeometry': THREE.TorusKnotGeometry,
 			'TubeGeometry': THREE.TubeGeometry,
 			'Geometry': THREE.Geometry,
+			'Geometry2': THREE.Geometry2,
 			'BufferGeometry': THREE.BufferGeometry
 
 		};

+ 13 - 4
editor/js/Loader.js

@@ -33,13 +33,13 @@ var Loader = function ( editor ) {
 				var reader = new FileReader();
 				reader.addEventListener( 'load', function ( event ) {
 
-					var contents = event.target.result;
+					var data = new Uint8Array( event.target.result );
 
-					var stream = new CTM.Stream( contents );
+					var stream = new CTM.Stream( data );
 					stream.offset = 0;
 
 					var loader = new THREE.CTMLoader();
-					loader.createModelClassic( new CTM.File( stream ), function( geometry ) {
+					loader.createModelBuffers( new CTM.File( stream ), function( geometry ) {
 
 						geometry.sourceType = "ctm";
 						geometry.sourceFile = file.name;
@@ -50,11 +50,12 @@ var Loader = function ( editor ) {
 						mesh.name = filename;
 
 						editor.addObject( mesh );
+						editor.select( mesh );
 
 					} );
 
 				}, false );
-				reader.readAsBinaryString( file );
+				reader.readAsArrayBuffer( file );
 
 				break;
 
@@ -74,6 +75,7 @@ var Loader = function ( editor ) {
 						collada.scene.name = filename;
 
 						editor.addObject( collada.scene );
+						editor.select( collada.scene );
 
 					} );
 
@@ -150,6 +152,7 @@ var Loader = function ( editor ) {
 					object.name = filename;
 
 					editor.addObject( object );
+					editor.select( object );
 
 				}, false );
 				reader.readAsText( file );
@@ -175,6 +178,7 @@ var Loader = function ( editor ) {
 					mesh.name = filename;
 
 					editor.addObject( mesh );
+					editor.select( mesh );
 
 				}, false );
 				reader.readAsText( file );
@@ -198,6 +202,7 @@ var Loader = function ( editor ) {
 					mesh.name = filename;
 
 					editor.addObject( mesh );
+					editor.select( mesh );
 
 				}, false );
 
@@ -227,6 +232,7 @@ var Loader = function ( editor ) {
 					var mesh = new THREE.Mesh( geometry, material );
 
 					editor.addObject( mesh );
+					editor.select( mesh );
 
 				}, false );
 				reader.readAsBinaryString( file );
@@ -251,6 +257,7 @@ var Loader = function ( editor ) {
 					mesh.name = filename;
 
 					editor.addObject( mesh );
+					editor.select( mesh );
 
 				}, false );
 				reader.readAsText( file );
@@ -320,6 +327,7 @@ var Loader = function ( editor ) {
 			mesh.name = filename;
 
 			editor.addObject( mesh );
+			editor.select( mesh );
 
 		} else if ( data.metadata.type.toLowerCase() === 'object' ) {
 
@@ -333,6 +341,7 @@ var Loader = function ( editor ) {
 			} else {
 
 				editor.addObject( result );
+				editor.select( result );
 
 			}
 

+ 24 - 6
editor/js/Menubar.Add.js

@@ -18,6 +18,26 @@ Menubar.Add = function ( editor ) {
 	var meshCount = 0;
 	var lightCount = 0;
 
+	// add object
+
+	var option = new UI.Panel();
+	option.setClass( 'option' );
+	option.setTextContent( 'Object3D' );
+	option.onClick( function () {
+
+		var mesh = new THREE.Object3D();
+		mesh.name = 'Object3D ' + ( ++ meshCount );
+
+		editor.addObject( mesh );
+		editor.select( mesh );
+
+	} );
+	options.add( option );
+
+	// divider
+
+	options.add( new UI.HorizontalRule() );
+
 	// add plane
 
 	var option = new UI.Panel();
@@ -36,19 +56,17 @@ Menubar.Add = function ( editor ) {
 		var mesh = new THREE.Mesh( geometry, material );
 		mesh.name = 'Plane ' + ( ++ meshCount );
 
-		mesh.rotation.x = - Math.PI/2;
-
 		editor.addObject( mesh );
 		editor.select( mesh );
 
 	} );
 	options.add( option );
 
-	// add cube
+	// add box
 
 	var option = new UI.Panel();
 	option.setClass( 'option' );
-	option.setTextContent( 'Cube' );
+	option.setTextContent( 'Box' );
 	option.onClick( function () {
 
 		var width = 100;
@@ -59,9 +77,9 @@ Menubar.Add = function ( editor ) {
 		var heightSegments = 1;
 		var depthSegments = 1;
 
-		var geometry = new THREE.CubeGeometry( width, height, depth, widthSegments, heightSegments, depthSegments );
+		var geometry = new THREE.BoxGeometry( width, height, depth, widthSegments, heightSegments, depthSegments );
 		var mesh = new THREE.Mesh( geometry, new THREE.MeshPhongMaterial() );
-		mesh.name = 'Cube ' + ( ++ meshCount );
+		mesh.name = 'Box ' + ( ++ meshCount );
 
 		editor.addObject( mesh );
 		editor.select( mesh );

+ 5 - 0
editor/js/Menubar.File.js

@@ -91,6 +91,10 @@ Menubar.File = function ( editor ) {
 
 			exportGeometry( THREE.BufferGeometryExporter );
 
+		} else if ( geometry instanceof THREE.Geometry2 ) {
+
+			exportGeometry( THREE.Geometry2Exporter );
+
 		} else if ( geometry instanceof THREE.Geometry ) {
 
 			exportGeometry( THREE.GeometryExporter );
@@ -151,6 +155,7 @@ Menubar.File = function ( editor ) {
 		var output;
 
 		if ( exporter instanceof THREE.BufferGeometryExporter ||
+			 exporter instanceof THREE.Geometry2Exporter ||
 		     exporter instanceof THREE.GeometryExporter ) {
 
 			output = JSON.stringify( exporter.parse( object.geometry ), null, '\t' );

+ 2 - 2
editor/js/Sidebar.Geometry.CubeGeometry.js → editor/js/Sidebar.Geometry.BoxGeometry.js

@@ -1,4 +1,4 @@
-Sidebar.Geometry.CubeGeometry = function ( signals, object ) {
+Sidebar.Geometry.BoxGeometry = function ( signals, object ) {
 
 	var container = new UI.Panel();
 
@@ -72,7 +72,7 @@ Sidebar.Geometry.CubeGeometry = function ( signals, object ) {
 
 		object.geometry.dispose();
 
-		object.geometry = new THREE.CubeGeometry(
+		object.geometry = new THREE.BoxGeometry(
 			width.getValue(),
 			height.getValue(),
 			depth.getValue(),

+ 12 - 8
editor/js/Sidebar.Geometry.js

@@ -100,14 +100,14 @@ Sidebar.Geometry = function ( editor ) {
 
 			}
 
-			if ( geometry instanceof THREE.CircleGeometry ) {
+			if ( geometry instanceof THREE.BoxGeometry ) {
 
-				parameters = new Sidebar.Geometry.CircleGeometry( signals, object );
+				parameters = new Sidebar.Geometry.BoxGeometry( signals, object );
 				container.add( parameters );
 
-			} else if ( geometry instanceof THREE.CubeGeometry ) {
+			} else if ( geometry instanceof THREE.CircleGeometry ) {
 
-				parameters = new Sidebar.Geometry.CubeGeometry( signals, object );
+				parameters = new Sidebar.Geometry.CircleGeometry( signals, object );
 				container.add( parameters );
 
 			} else if ( geometry instanceof THREE.CylinderGeometry ) {
@@ -165,21 +165,25 @@ Sidebar.Geometry = function ( editor ) {
 			geometryVertices.setValue( geometry.vertices.length );
 			geometryFaces.setValue( geometry.faces.length );
 
+		} else if ( geometry instanceof THREE.Geometry2 ) {
+
+			geometryVertices.setValue( geometry.vertices.length / 3 );
+			geometryFaces.setValue( geometry.vertices.length / 9 );
+
 		} else if ( geometry instanceof THREE.BufferGeometry ) {
 
-			geometryVertices.setValue( geometry.attributes.position.numItems / 3 );
+			geometryVertices.setValue( geometry.attributes.position.array.length / 3 );
 
 			if ( geometry.attributes.index !== undefined ) {
 
-				geometryFaces.setValue( geometry.attributes.index.numItems / 3 );
+				geometryFaces.setValue( geometry.attributes.index.array.length / 3 );
 
 			} else {
 
-				geometryFaces.setValue( geometry.attributes.position.numItems / 3 / 3 );
+				geometryFaces.setValue( geometry.attributes.position.array.length / 9 );
 
 			}
 
-
 		}
 
 	}

+ 1 - 0
editor/js/Sidebar.Material.js

@@ -313,6 +313,7 @@ Sidebar.Material = function ( editor ) {
 
 		if ( object instanceof THREE.Sprite ) objectHasUvs = true;
 		if ( geometry instanceof THREE.Geometry && geometry.faceVertexUvs[ 0 ].length > 0 ) objectHasUvs = true;
+		if ( geometry instanceof THREE.Geometry2 && geometry.uvs.length > 0 ) objectHasUvs = true;
 		if ( geometry instanceof THREE.BufferGeometry && geometry.attributes.uv !== undefined ) objectHasUvs = true;
 
 		if ( material ) {

+ 24 - 8
editor/js/Viewport.js

@@ -26,7 +26,7 @@ var Viewport = function ( editor ) {
 
 	//
 
-	var camera = new THREE.PerspectiveCamera( 50, container.dom.offsetWidth / container.dom.offsetHeight, 1, 5000 );
+	var camera = new THREE.PerspectiveCamera( 50, 1, 1, 5000 );
 	camera.position.fromArray( editor.config.getKey( 'camera' ).position );
 	camera.lookAt( new THREE.Vector3().fromArray( editor.config.getKey( 'camera' ).target ) );
 
@@ -242,12 +242,24 @@ var Viewport = function ( editor ) {
 
 	} );
 
+	var saveTimeout;
+
 	signals.cameraChanged.add( function () {
 
-		editor.config.setKey( 'camera', {
-			position: camera.position.toArray(),
-			target: controls.center.toArray()
-		} );
+		if ( saveTimeout !== undefined ) {
+
+			clearTimeout( saveTimeout );
+
+		}
+
+		saveTimeout = setTimeout( function () {
+
+			editor.config.setKey( 'camera', {
+				position: camera.position.toArray(),
+				target: controls.center.toArray()
+			} );
+
+		}, 1000 );
 
 		render();
 
@@ -260,7 +272,8 @@ var Viewport = function ( editor ) {
 
 		if ( object !== null ) {
 
-			if ( object.geometry !== undefined ) {
+			if ( object.geometry !== undefined &&
+				 object instanceof THREE.Sprite === false ) {
 
 				selectionBox.update( object );
 				selectionBox.visible = true;
@@ -484,6 +497,11 @@ var Viewport = function ( editor ) {
 					vertices += geometry.vertices.length;
 					faces += geometry.faces.length;
 
+				} else if ( geometry instanceof THREE.Geometry2 ) {
+
+					vertices += geometry.vertices.length / 3;
+					faces += geometry.vertices.length / 9;
+
 				} else if ( geometry instanceof THREE.BufferGeometry ) {
 
 					vertices += geometry.attributes.position.array.length / 3;
@@ -561,8 +579,6 @@ var Viewport = function ( editor ) {
 		renderer.render( scene, camera );
 		renderer.render( sceneHelpers, camera );
 
-		//console.trace();
-
 	}
 
 	return container;

+ 1 - 1
examples/canvas_camera_orthographic.html

@@ -71,7 +71,7 @@
 
 				// Cubes
 
-				var geometry = new THREE.CubeGeometry( 50, 50, 50 );
+				var geometry = new THREE.BoxGeometry( 50, 50, 50 );
 				var material = new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, overdraw: 0.5 } );
 
 				for ( var i = 0; i < 100; i ++ ) {

+ 1 - 1
examples/canvas_camera_orthographic2.html

@@ -138,7 +138,7 @@
 
 				// Cubes
 
-				var geometry = new THREE.CubeGeometry( 50, 50, 50 );
+				var geometry = new THREE.BoxGeometry( 50, 50, 50 );
 				var material = new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, overdraw: 0.5 } );
 
 				for ( var i = 0; i < 100; i ++ ) {

+ 213 - 0
examples/canvas_geometry2_sandbox.html

@@ -0,0 +1,213 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<title>three.js canvas - geometry2 - sandbox</title>
+		<meta charset="utf-8">
+		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
+		<style>
+			body {
+				font-family: Monospace;
+				background-color: #f0f0f0;
+				margin: 0px;
+				overflow: hidden;
+			}
+		</style>
+	</head>
+	<body>
+
+		<script src="../build/three.min.js"></script>
+
+		<script src="../src/extras/geometries/BoxGeometry2.js"></script>
+		<script src="../src/extras/geometries/PlaneGeometry2.js"></script>
+
+		<script src="js/libs/stats.min.js"></script>
+
+		<script>
+
+			var container, stats;
+
+			var camera, scene, renderer;
+
+			var cube, plane;
+
+			var targetRotation = 0;
+			var targetRotationOnMouseDown = 0;
+
+			var mouseX = 0;
+			var mouseXOnMouseDown = 0;
+
+			var windowHalfX = window.innerWidth / 2;
+			var windowHalfY = window.innerHeight / 2;
+
+			init();
+			animate();
+
+			function init() {
+
+				container = document.createElement( 'div' );
+				document.body.appendChild( container );
+
+				camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 1000 );
+				camera.position.y = 150;
+				camera.position.z = 500;
+
+				scene = new THREE.Scene();
+
+				// Cube
+
+				console.time( 'box' );
+
+				var geometry = new THREE.BoxGeometry2( 200, 200, 200, 20, 20, 20 );
+
+				console.timeEnd( 'box' );
+
+				/*
+				for ( var i = 0; i < geometry.faces.length; i += 2 ) {
+
+					var hex = Math.random() * 0xffffff;
+					geometry.faces[ i ].color.setHex( hex );
+					geometry.faces[ i + 1 ].color.setHex( hex );
+
+				}
+				*/
+
+				var material = new THREE.MeshBasicMaterial( { /*vertexColors: THREE.FaceColors,*/ overdraw: 0.5, wireframe: true } );
+
+				cube = new THREE.Mesh( geometry, material );
+				cube.position.y = 150;
+				scene.add( cube );
+
+				// Plane
+
+				console.time( 'plane' );
+
+				var geometry = new THREE.PlaneGeometry2( 200, 200, 20, 20 );
+
+				console.timeEnd( 'plane' );
+
+				geometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) );
+
+				var material = new THREE.MeshBasicMaterial( { color: 0xff0000, overdraw: 0.5, wireframe: true } );
+
+				plane = new THREE.Mesh( geometry, material );
+				scene.add( plane );
+
+				renderer = new THREE.CanvasRenderer();
+				renderer.setSize( window.innerWidth, window.innerHeight );
+
+				container.appendChild( renderer.domElement );
+
+				stats = new Stats();
+				stats.domElement.style.position = 'absolute';
+				stats.domElement.style.top = '0px';
+				container.appendChild( stats.domElement );
+
+				document.addEventListener( 'mousedown', onDocumentMouseDown, false );
+				document.addEventListener( 'touchstart', onDocumentTouchStart, false );
+				document.addEventListener( 'touchmove', onDocumentTouchMove, false );
+
+				//
+
+				window.addEventListener( 'resize', onWindowResize, false );
+
+			}
+
+			function onWindowResize() {
+
+				windowHalfX = window.innerWidth / 2;
+				windowHalfY = window.innerHeight / 2;
+
+				camera.aspect = window.innerWidth / window.innerHeight;
+				camera.updateProjectionMatrix();
+
+				renderer.setSize( window.innerWidth, window.innerHeight );
+
+			}
+
+			//
+
+			function onDocumentMouseDown( event ) {
+
+				event.preventDefault();
+
+				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
+				document.addEventListener( 'mouseup', onDocumentMouseUp, false );
+				document.addEventListener( 'mouseout', onDocumentMouseOut, false );
+
+				mouseXOnMouseDown = event.clientX - windowHalfX;
+				targetRotationOnMouseDown = targetRotation;
+
+			}
+
+			function onDocumentMouseMove( event ) {
+
+				mouseX = event.clientX - windowHalfX;
+
+				targetRotation = targetRotationOnMouseDown + ( mouseX - mouseXOnMouseDown ) * 0.02;
+
+			}
+
+			function onDocumentMouseUp( event ) {
+
+				document.removeEventListener( 'mousemove', onDocumentMouseMove, false );
+				document.removeEventListener( 'mouseup', onDocumentMouseUp, false );
+				document.removeEventListener( 'mouseout', onDocumentMouseOut, false );
+
+			}
+
+			function onDocumentMouseOut( event ) {
+
+				document.removeEventListener( 'mousemove', onDocumentMouseMove, false );
+				document.removeEventListener( 'mouseup', onDocumentMouseUp, false );
+				document.removeEventListener( 'mouseout', onDocumentMouseOut, false );
+
+			}
+
+			function onDocumentTouchStart( event ) {
+
+				if ( event.touches.length === 1 ) {
+
+					event.preventDefault();
+
+					mouseXOnMouseDown = event.touches[ 0 ].pageX - windowHalfX;
+					targetRotationOnMouseDown = targetRotation;
+
+				}
+
+			}
+
+			function onDocumentTouchMove( event ) {
+
+				if ( event.touches.length === 1 ) {
+
+					event.preventDefault();
+
+					mouseX = event.touches[ 0 ].pageX - windowHalfX;
+					targetRotation = targetRotationOnMouseDown + ( mouseX - mouseXOnMouseDown ) * 0.05;
+
+				}
+
+			}
+
+			//
+
+			function animate() {
+
+				requestAnimationFrame( animate );
+
+				render();
+				stats.update();
+
+			}
+
+			function render() {
+
+				plane.rotation.y = cube.rotation.y += ( targetRotation - cube.rotation.y ) * 0.05;
+				renderer.render( scene, camera );
+
+			}
+
+		</script>
+
+	</body>
+</html>

+ 1 - 1
examples/canvas_geometry_cube.html

@@ -204,4 +204,4 @@
 		</script>
 
 	</body>
-</html>
+</html>

+ 1 - 1
examples/canvas_geometry_hierarchy.html

@@ -48,7 +48,7 @@
 
 				scene = new THREE.Scene();
 
-				var geometry = new THREE.CubeGeometry( 100, 100, 100 );
+				var geometry = new THREE.BoxGeometry( 100, 100, 100 );
 				var material = new THREE.MeshNormalMaterial( { overdraw: 0.5 } );
 
 				group = new THREE.Object3D();

+ 1 - 1
examples/canvas_geometry_panorama.html

@@ -78,7 +78,7 @@
 
 				];
 
-				mesh = new THREE.Mesh( new THREE.CubeGeometry( 300, 300, 300, 7, 7, 7 ), new THREE.MeshFaceMaterial( materials ) );
+				mesh = new THREE.Mesh( new THREE.BoxGeometry( 300, 300, 300, 7, 7, 7 ), new THREE.MeshFaceMaterial( materials ) );
 				mesh.scale.x = - 1;
 				scene.add( mesh );
 

+ 1 - 1
examples/canvas_geometry_panorama_fisheye.html

@@ -78,7 +78,7 @@
 
 				];
 
-				mesh = new THREE.Mesh( new THREE.CubeGeometry( 300, 300, 300, 7, 7, 7 ), new THREE.MeshFaceMaterial( materials ) );
+				mesh = new THREE.Mesh( new THREE.BoxGeometry( 300, 300, 300, 7, 7, 7 ), new THREE.MeshFaceMaterial( materials ) );
 				mesh.scale.x = - 1;
 				scene.add( mesh );
 

+ 1 - 1
examples/canvas_interactive_cubes.html

@@ -48,7 +48,7 @@
 
 				scene = new THREE.Scene();
 
-				var geometry = new THREE.CubeGeometry( 100, 100, 100 );
+				var geometry = new THREE.BoxGeometry( 100, 100, 100 );
 
 				for ( var i = 0; i < 10; i ++ ) {
 

+ 1 - 1
examples/canvas_interactive_cubes_tween.html

@@ -47,7 +47,7 @@
 
 				scene = new THREE.Scene();
 
-				var geometry = new THREE.CubeGeometry( 100, 100, 100 );
+				var geometry = new THREE.BoxGeometry( 100, 100, 100 );
 
 				for ( var i = 0; i < 20; i ++ ) {
 

+ 1 - 1
examples/canvas_interactive_lines.html

@@ -15,7 +15,7 @@
 	</head>
 	<body>
 
-		<script src="../build/three.js"></script>
+		<script src="../build/three.min.js"></script>
 
 		<script src="js/libs/stats.min.js"></script>
 

+ 15 - 12
examples/canvas_interactive_voxelpainter.html

@@ -30,9 +30,11 @@
 			target = new THREE.Vector3( 0, 200, 0 );
 			var normalMatrix = new THREE.Matrix3();
 
-			var cubeGeometry = new THREE.CubeGeometry( 50, 50, 50 );
+			var cubeGeometry = new THREE.BoxGeometry( 50, 50, 50 );
 			var cubeMaterial = new THREE.MeshLambertMaterial( { color: 0x00ff80, overdraw: 0.5 } );
 
+			var objects = [];
+
 			init();
 			animate();
 
@@ -46,7 +48,7 @@
 				info.style.top = '10px';
 				info.style.width = '100%';
 				info.style.textAlign = 'center';
-				info.innerHTML = '<a href="http://threejs.org" target="_blank">three.js</a> - voxel painter<br><strong>click</strong>: add voxel, <strong>control + click</strong>: remove voxel, <strong>shift</strong>: rotate, <a href="javascript:save()">save .png</a>';
+				info.innerHTML = '<a href="http://threejs.org" target="_blank">three.js</a> - voxel painter<br><strong>click</strong>: add voxel, <strong>shift + click</strong>: remove voxel, <strong>control</strong>: rotate, <a href="javascript:save()">save .png</a>';
 				container.appendChild( info );
 
 				camera = new THREE.PerspectiveCamera( 40, window.innerWidth / window.innerHeight, 1, 10000 );
@@ -85,6 +87,8 @@
 				plane.visible = false;
 				scene.add( plane );
 
+				objects.push( plane );
+
 				var material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true } );
 
 				mouse2D = new THREE.Vector3( 0, 10000, 0.5 );
@@ -159,18 +163,20 @@
 
 				event.preventDefault();
 
-				var intersects = raycaster.intersectObjects( scene.children );
+				var intersects = raycaster.intersectObjects( objects );
 
 				if ( intersects.length > 0 ) {
 
 					var intersect = intersects[ 0 ];
 
-					if ( isCtrlDown ) {
+					if ( isShiftDown ) {
 
 						if ( intersect.object != plane ) {
 
 							scene.remove( intersect.object );
 
+							objects.splice( objects.indexOf( intersect.object ), 1 );
+
 						}
 
 					} else {
@@ -180,16 +186,13 @@
 						var normal = intersect.face.normal.clone();
 						normal.applyMatrix3( normalMatrix ).normalize();
 
-						var position = new THREE.Vector3().addVectors( intersect.point, normal );
-
 						var voxel = new THREE.Mesh( cubeGeometry, cubeMaterial );
-						voxel.position.x = Math.floor( position.x / 50 ) * 50 + 25;
-						voxel.position.y = Math.floor( position.y / 50 ) * 50 + 25;
-						voxel.position.z = Math.floor( position.z / 50 ) * 50 + 25;
-						voxel.matrixAutoUpdate = false;
-						voxel.updateMatrix();
+						voxel.position.addVectors( intersect.point, normal );
+						voxel.position.divideScalar( 50 ).floor().multiplyScalar( 50 ).addScalar( 25 );
 						scene.add( voxel );
 
+						objects.push( voxel );
+
 					}
 
 				}
@@ -236,7 +239,7 @@
 
 			function render() {
 
-				if ( isShiftDown ) {
+				if ( isCtrlDown ) {
 
 					theta += mouse2D.x * 3;
 

+ 0 - 2
examples/canvas_lines_colors.html

@@ -139,8 +139,6 @@
 
 				renderer.setSize( window.innerWidth, window.innerHeight );
 
-				effectFXAA.uniforms[ 'resolution' ].value.set( 1 / window.innerWidth, 1 / window.innerHeight );
-
 				composer.reset();
 
 			}

+ 2 - 2
examples/canvas_materials.html

@@ -68,8 +68,8 @@
 				var materials = [
 
 					new THREE.MeshBasicMaterial( { color: 0x00ffff, wireframe: true, side: THREE.DoubleSide } ),
-					new THREE.MeshBasicMaterial( { color: 0xff0000, blending: THREE.AdditiveBlending, side: THREE.DoubleSide } ),
-					new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, side: THREE.DoubleSide, overdraw: true } ),
+					new THREE.MeshBasicMaterial( { color: 0xff0000, blending: THREE.AdditiveBlending } ),
+					new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, overdraw: true } ),
 					new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.SmoothShading, overdraw: true } ),
 					new THREE.MeshDepthMaterial( { overdraw: true } ),
 					new THREE.MeshNormalMaterial( { overdraw: true } ),

+ 1 - 1
examples/canvas_materials_depth.html

@@ -70,7 +70,7 @@
 
 				// Cubes
 
-				geometry = new THREE.CubeGeometry( 100, 100, 100 );
+				geometry = new THREE.BoxGeometry( 100, 100, 100 );
 				material = new THREE.MeshDepthMaterial( { overdraw: true } );
 
 				for ( var i = 0; i < 20; i ++ ) {

+ 10 - 25
examples/canvas_morphtargets_horse.html

@@ -23,7 +23,7 @@
 
 			var container, stats;
 			var camera, scene, projector, renderer;
-			var mesh;
+			var mesh, animation;
 
 			init();
 			animate();
@@ -60,12 +60,15 @@
 				scene.add( light );
 
 				var loader = new THREE.JSONLoader( true );
-				loader.load( "models/animated/horse.js", function( geometry ) {
+				loader.load( "models/animated/horse.js", function ( geometry ) {
 
 					mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( { color: 0x606060, morphTargets: true, overdraw: 0.5 } ) );
 					mesh.scale.set( 1.5, 1.5, 1.5 );
 					scene.add( mesh );
 
+					animation = new THREE.MorphAnimation( mesh );
+					animation.play();
+
 				} );
 
 				//
@@ -112,9 +115,7 @@
 			var radius = 600;
 			var theta = 0;
 
-			var duration = 1000;
-			var keyframes = 15, interpolation = duration / keyframes;
-			var lastKeyframe = 0, currentKeyframe = 0;
+			var prevTime = Date.now();
 
 			function render() {
 
@@ -125,29 +126,13 @@
 
 				camera.lookAt( camera.target );
 
-				if ( mesh ) {
-
-					// Alternate morph targets
-
-					var time = Date.now() % duration;
-
-					var keyframe = Math.floor( time / interpolation );
-
-					if ( keyframe != currentKeyframe ) {
-
-						mesh.morphTargetInfluences[ lastKeyframe ] = 0;
-						mesh.morphTargetInfluences[ currentKeyframe ] = 1;
-						mesh.morphTargetInfluences[ keyframe ] = 0;
-
-						lastKeyframe = currentKeyframe;
-						currentKeyframe = keyframe;
+				if ( animation ) {
 
-						// console.log( mesh.morphTargetInfluences );
+					var time = Date.now();
 
-					}
+					animation.update( time - prevTime );
 
-					mesh.morphTargetInfluences[ keyframe ] = ( time % interpolation ) / interpolation;
-					mesh.morphTargetInfluences[ lastKeyframe ] = 1 - mesh.morphTargetInfluences[ keyframe ];
+					prevTime = time;
 
 				}
 

+ 1 - 1
examples/css3d_sandbox.html

@@ -50,7 +50,7 @@
 
 				scene = new THREE.Scene();
 
-				geometry = new THREE.CubeGeometry( 200, 200, 200 );
+				geometry = new THREE.BoxGeometry( 200, 200, 200 );
 				material = new THREE.MeshBasicMaterial( { color: 0x000000, wireframe: true, wireframeLinewidth: 1 } );
 
 				mesh = new THREE.Mesh( geometry, material );

+ 11 - 4
examples/css3d_youtube.html

@@ -246,7 +246,7 @@
 					( function () {
 
 						var object = scene.children[ i ];
-						var delay = Math.random() * 100;
+						var delay = i * 15;
 
 						new TWEEN.Tween( object.position )
 							.to( { y: - 2000 }, 1000 )
@@ -269,7 +269,7 @@
 				request.send( null );
 
 			}
-
+			
 			function onData( event ) {
 
 				var data = JSON.parse( event.target.responseText );
@@ -279,9 +279,16 @@
 
 				for ( var i = 0; i < entries.length; i ++ ) {
 
-					var object = new Element( entries[ i ] );
-					scene.add( object );
+					( function ( data, time ) {
+
+						setTimeout( function () {
+
+							scene.add( new Element( data ) );
+
+						}, time );
 
+					} )( entries[ i ], i * 15 );
+				
 				}
 
 			}

+ 6 - 1
examples/index.html

@@ -108,6 +108,7 @@
 				"webgl_buffergeometry",
 				"webgl_buffergeometry_custom_attributes_particles",
 				"webgl_buffergeometry_lines",
+				"webgl_buffergeometry_lines_indexed",
 				"webgl_buffergeometry_particles",
 				"webgl_camera",
 				"webgl_custom_attributes",
@@ -147,6 +148,7 @@
 				"webgl_gpgpu_birds",
 				"webgl_hdr",
 				"webgl_helpers",
+				"webgl_interactive_buffergeometry",
 				"webgl_interactive_cubes",
 				"webgl_interactive_cubes_gpu",
 				"webgl_interactive_draggablecubes",
@@ -167,6 +169,7 @@
 				"webgl_loader_collada_skinning",
 				"webgl_loader_ctm",
 				"webgl_loader_ctm_materials",
+				"webgl_loader_gltf",
 				"webgl_loader_json_blender",
 				"webgl_loader_json_objconverter",
 				"webgl_loader_obj",
@@ -211,13 +214,13 @@
 				"webgl_morphnormals",
 				"webgl_morphtargets",
 				"webgl_morphtargets_horse",
+				"webgl_morphtargets_human",
 				"webgl_morphtargets_md2",
 				"webgl_morphtargets_md2_control",
 				"webgl_multiple_canvases_circle",
 				"webgl_multiple_canvases_complex",
 				"webgl_multiple_canvases_grid",
 				"webgl_multiple_views",
-				"webgl_multiple_windows",
 				"webgl_nearestneighbour",
 				"webgl_octree",
 				"webgl_octree_raycasting",
@@ -270,6 +273,7 @@
 				"css3d_youtube"
 			],
 			"misc": [
+				"misc_animation_keys",
 				"misc_controls_fly",
 				"misc_controls_oculusrift",
 				"misc_controls_orbit",
@@ -298,6 +302,7 @@
 				"canvas_geometry_shapes",
 				"canvas_geometry_terrain",
 				"canvas_geometry_text",
+				"canvas_geometry2_sandbox",
 				"canvas_interactive_cubes",
 				"canvas_interactive_cubes_tween",
 				"canvas_interactive_lines",

+ 1 - 6
examples/js/BufferGeometryUtils.js

@@ -62,9 +62,7 @@ THREE.BufferGeometryUtils = {
 
 		}
 
-		var i2 = 0, i3 = 0;
-
-		for ( var i = 0; i < faces.length; i ++ ) {
+		for ( var i = 0, i2 = 0, i3 = 0; i < faces.length; i ++, i2 += 6, i3 += 9 ) {
 
 			var face = faces[ i ];
 
@@ -173,9 +171,6 @@ THREE.BufferGeometryUtils = {
 
 			}
 
-			i3 += 9;
-			i2 += 6;
-
 		}
 
 		bufferGeometry.computeBoundingSphere();

+ 8 - 8
examples/js/Mirror.js

@@ -185,8 +185,8 @@ THREE.Mirror.prototype.updateTextureMatrix = function () {
 	this.normal.applyMatrix4( this.rotationMatrix );
 
 	var view = this.mirrorWorldPosition.clone().sub( this.cameraWorldPosition );
-	var reflectView = view.reflect( this.normal );
-	reflectView.add( this.mirrorWorldPosition );
+	view.reflect( this.normal ).negate();
+	view.add( this.mirrorWorldPosition );
 
 	this.rotationMatrix.extractRotation( this.camera.matrixWorld );
 
@@ -195,16 +195,16 @@ THREE.Mirror.prototype.updateTextureMatrix = function () {
 	this.lookAtPosition.add( this.cameraWorldPosition );
 
 	var target = this.mirrorWorldPosition.clone().sub( this.lookAtPosition );
-	var reflectTarget = target.reflect( this.normal );
-	reflectTarget.add( this.mirrorWorldPosition );
+	target.reflect( this.normal ).negate();
+	target.add( this.mirrorWorldPosition );
 
 	this.up.set( 0, -1, 0 );
 	this.up.applyMatrix4( this.rotationMatrix );
-	var reflectUp = this.up.reflect( this.normal );
+	this.up.reflect( this.normal ).negate();
 
-	this.mirrorCamera.position.copy(reflectView);
-	this.mirrorCamera.up = reflectUp;
-	this.mirrorCamera.lookAt( reflectTarget );
+	this.mirrorCamera.position.copy( view );
+	this.mirrorCamera.up = this.up;
+	this.mirrorCamera.lookAt( target );
 
 	this.mirrorCamera.updateProjectionMatrix();
 	this.mirrorCamera.updateMatrixWorld();

+ 1 - 1
examples/js/Octree.js

@@ -111,7 +111,7 @@
 		
 		if ( this.scene ) {
 			
-			this.visualGeometry = new THREE.CubeGeometry( 1, 1, 1 );
+			this.visualGeometry = new THREE.BoxGeometry( 1, 1, 1 );
 			this.visualMaterial = new THREE.MeshBasicMaterial( { color: 0xFF0066, wireframe: true, wireframeLinewidth: 1 } );
 			
 		}

+ 15 - 18
examples/js/UCSCharacter.js

@@ -54,9 +54,6 @@ THREE.UCSCharacter = function() {
 			mesh.receiveShadow = true;
 
 			animation = new THREE.Animation( mesh, geometry.animation.name );
-			animation.JITCompile = false;
-			animation.interpolationType = THREE.AnimationHandler.LINEAR;
-
 			animation.play();
 			
 			scope.setSkin(0);
@@ -98,31 +95,31 @@ THREE.UCSCharacter = function() {
 		var materials = [];
 		
 		for ( var i = 0; i < skins.length; i ++ ) {
-			materials[i] = new THREE.MeshLambertMaterial( {"colorDiffuse"  : [0.5880, 0.5880, 0.5880],
-														  "colorAmbient"  : [0.5880, 0.5880, 0.5880],
-														  "colorSpecular"  : [0.5000, 0.5000, 0.5000],
-														  "color" : 0xeeeeee,
-														  "transparency"  : 1.0,
-														  "specularCoef"  : 10.0,
-														  "wireframe" : false,
-														  "vertexColors" : false,
-														  "map" : skins[i]} );
-			materials[i].skinning = true;
-			materials[i].morphTargets = true;
-
-			materials[i].wrapAround = true;
-			materials[i].perPixel = true;
+
+			materials[ i ] = new THREE.MeshLambertMaterial( {
+				color: 0xeeeeee,
+				specular: 10.0,
+				map: skins[ i ],
+				skinning: true,
+				morphTargets: true,
+				wrapAround: true
+			} );
+
 		}
 		
 		return materials;
 	}
 
 	this.checkLoadComplete = function () {
+
 		scope.loadCounter -= 1;
+
 		if ( scope.loadCounter === 0 ) {
+
 			scope.onLoadComplete();
+
 		}
+
 	}
 
 }
-

+ 8 - 8
examples/js/WaterShader.js

@@ -203,8 +203,8 @@ THREE.Water.prototype.updateTextureMatrix = function () {
 	this.normal.applyMatrix4( this.rotationMatrix );
 
 	var view = this.mirrorWorldPosition.clone().sub( this.cameraWorldPosition );
-	var reflectView = view.reflect( this.normal );
-	reflectView.add( this.mirrorWorldPosition );
+	view.reflect( this.normal ).negate();
+	view.add( this.mirrorWorldPosition );
 
 	this.rotationMatrix.extractRotation( this.camera.matrixWorld );
 
@@ -213,16 +213,16 @@ THREE.Water.prototype.updateTextureMatrix = function () {
 	this.lookAtPosition.add( this.cameraWorldPosition );
 
 	var target = this.mirrorWorldPosition.clone().sub( this.lookAtPosition );
-	var reflectTarget = target.reflect( this.normal );
-	reflectTarget.add( this.mirrorWorldPosition );
+	target.reflect( this.normal ).negate();
+	target.add( this.mirrorWorldPosition );
 
 	this.up.set(0, -1, 0);
 	this.up.applyMatrix4( this.rotationMatrix );
-	var reflectUp = this.up.reflect( this.normal );
+	this.up.reflect( this.normal ).negate();
 
-	this.mirrorCamera.position.copy(reflectView);
-	this.mirrorCamera.up = reflectUp;
-	this.mirrorCamera.lookAt(reflectTarget);
+	this.mirrorCamera.position.copy( view );
+	this.mirrorCamera.up = this.up;
+	this.mirrorCamera.lookAt( target );
 	this.mirrorCamera.aspect = this.camera.aspect;
 
 	this.mirrorCamera.updateProjectionMatrix();

+ 3 - 2
examples/js/controls/FirstPersonControls.js

@@ -265,8 +265,9 @@ THREE.FirstPersonControls = function ( object, domElement ) {
 	this.domElement.addEventListener( 'mousemove', bind( this, this.onMouseMove ), false );
 	this.domElement.addEventListener( 'mousedown', bind( this, this.onMouseDown ), false );
 	this.domElement.addEventListener( 'mouseup', bind( this, this.onMouseUp ), false );
-	this.domElement.addEventListener( 'keydown', bind( this, this.onKeyDown ), false );
-	this.domElement.addEventListener( 'keyup', bind( this, this.onKeyUp ), false );
+	
+	window.addEventListener( 'keydown', bind( this, this.onKeyDown ), false );
+	window.addEventListener( 'keyup', bind( this, this.onKeyUp ), false );
 
 	function bind( scope, fn ) {
 

+ 2 - 2
examples/js/controls/FlyControls.js

@@ -260,8 +260,8 @@ THREE.FlyControls = function ( object, domElement ) {
 	this.domElement.addEventListener( 'mousedown', bind( this, this.mousedown ), false );
 	this.domElement.addEventListener( 'mouseup',   bind( this, this.mouseup ), false );
 
-	this.domElement.addEventListener( 'keydown', bind( this, this.keydown ), false );
-	this.domElement.addEventListener( 'keyup',   bind( this, this.keyup ), false );
+	window.addEventListener( 'keydown', bind( this, this.keydown ), false );
+	window.addEventListener( 'keyup',   bind( this, this.keyup ), false );
 
 	this.updateMovementVector();
 	this.updateRotationVector();

+ 102 - 76
examples/js/controls/OrbitControls.js

@@ -34,6 +34,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 	// "target" sets the location of focus, where the control orbits around
 	// and where it pans with respect to.
 	this.target = new THREE.Vector3();
+
 	// center is old, deprecated; use "target" instead
 	this.center = this.target;
 
@@ -41,6 +42,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 	// backwards compatibility
 	this.noZoom = false;
 	this.zoomSpeed = 1.0;
+
 	// Limits to how far you can dolly in and out
 	this.minDistance = 0;
 	this.maxDistance = Infinity;
@@ -64,6 +66,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 	// Set to true to disable use of the keys
 	this.noKeys = false;
+
 	// The four arrow keys
 	this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 };
 
@@ -81,6 +84,9 @@ THREE.OrbitControls = function ( object, domElement ) {
 	var panStart = new THREE.Vector2();
 	var panEnd = new THREE.Vector2();
 	var panDelta = new THREE.Vector2();
+	var panOffset = new THREE.Vector3();
+
+	var offset = new THREE.Vector3();
 
 	var dollyStart = new THREE.Vector2();
 	var dollyEnd = new THREE.Vector2();
@@ -94,12 +100,19 @@ THREE.OrbitControls = function ( object, domElement ) {
 	var lastPosition = new THREE.Vector3();
 
 	var STATE = { NONE : -1, ROTATE : 0, DOLLY : 1, PAN : 2, TOUCH_ROTATE : 3, TOUCH_DOLLY : 4, TOUCH_PAN : 5 };
+
 	var state = STATE.NONE;
 
+	// for reset
+
+	this.target0 = this.target.clone();
+	this.position0 = this.object.position.clone();
+
 	// events
 
 	var changeEvent = { type: 'change' };
-
+	var startEvent = { type: 'start'};
+	var endEvent = { type: 'end'};
 
 	this.rotateLeft = function ( angle ) {
 
@@ -128,11 +141,11 @@ THREE.OrbitControls = function ( object, domElement ) {
 	// pass in distance in world space to move left
 	this.panLeft = function ( distance ) {
 
-		var panOffset = new THREE.Vector3();
 		var te = this.object.matrix.elements;
+
 		// get X column of matrix
-		panOffset.set( te[0], te[1], te[2] );
-		panOffset.multiplyScalar(-distance);
+		panOffset.set( te[ 0 ], te[ 1 ], te[ 2 ] );
+		panOffset.multiplyScalar( - distance );
 		
 		pan.add( panOffset );
 
@@ -141,18 +154,19 @@ THREE.OrbitControls = function ( object, domElement ) {
 	// pass in distance in world space to move up
 	this.panUp = function ( distance ) {
 
-		var panOffset = new THREE.Vector3();
 		var te = this.object.matrix.elements;
+
 		// get Y column of matrix
-		panOffset.set( te[4], te[5], te[6] );
-		panOffset.multiplyScalar(distance);
+		panOffset.set( te[ 4 ], te[ 5 ], te[ 6 ] );
+		panOffset.multiplyScalar( distance );
 		
 		pan.add( panOffset );
+
 	};
 	
-	// main entry point; pass in Vector2 of change desired in pixel space,
+	// pass in x,y of change desired in pixel space,
 	// right and down are positive
-	this.pan = function ( delta ) {
+	this.pan = function ( deltaX, deltaY ) {
 
 		var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
 
@@ -164,20 +178,21 @@ THREE.OrbitControls = function ( object, domElement ) {
 			var targetDistance = offset.length();
 
 			// half of the fov is center to top of screen
-			targetDistance *= Math.tan( (scope.object.fov/2) * Math.PI / 180.0 );
+			targetDistance *= Math.tan( ( scope.object.fov / 2 ) * Math.PI / 180.0 );
+
 			// we actually don't use screenWidth, since perspective camera is fixed to screen height
-			scope.panLeft( 2 * delta.x * targetDistance / element.clientHeight );
-			scope.panUp( 2 * delta.y * targetDistance / element.clientHeight );
+			scope.panLeft( 2 * deltaX * targetDistance / element.clientHeight );
+			scope.panUp( 2 * deltaY * targetDistance / element.clientHeight );
 
 		} else if ( scope.object.top !== undefined ) {
 
 			// orthographic
-			scope.panLeft( delta.x * (scope.object.right - scope.object.left) / element.clientWidth );
-			scope.panUp( delta.y * (scope.object.top - scope.object.bottom) / element.clientHeight );
+			scope.panLeft( deltaX * (scope.object.right - scope.object.left) / element.clientWidth );
+			scope.panUp( deltaY * (scope.object.top - scope.object.bottom) / element.clientHeight );
 
 		} else {
 
-			// camera neither orthographic or perspective - warn user
+			// camera neither orthographic or perspective
 			console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.' );
 
 		}
@@ -211,7 +226,8 @@ THREE.OrbitControls = function ( object, domElement ) {
 	this.update = function () {
 
 		var position = this.object.position;
-		var offset = position.clone().sub( this.target );
+
+		offset.copy( position ).sub( this.target );
 
 		// angle from z-axis around y-axis
 
@@ -255,7 +271,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 		thetaDelta = 0;
 		phiDelta = 0;
 		scale = 1;
-		pan.set(0,0,0);
+		pan.set( 0, 0, 0 );
 
 		if ( lastPosition.distanceTo( this.object.position ) > 0 ) {
 
@@ -268,6 +284,17 @@ THREE.OrbitControls = function ( object, domElement ) {
 	};
 
 
+	this.reset = function () {
+
+		state = STATE.NONE;
+
+		this.target.copy( this.target0 );
+		this.object.position.copy( this.position0 );
+
+		this.update();
+
+	};
+
 	function getAutoRotationAngle() {
 
 		return 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed;
@@ -282,25 +309,25 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 	function onMouseDown( event ) {
 
-		if ( scope.enabled === false ) { return; }
+		if ( scope.enabled === false ) return;
 		event.preventDefault();
 
 		if ( event.button === 0 ) {
-			if ( scope.noRotate === true ) { return; }
+			if ( scope.noRotate === true ) return;
 
 			state = STATE.ROTATE;
 
 			rotateStart.set( event.clientX, event.clientY );
 
 		} else if ( event.button === 1 ) {
-			if ( scope.noZoom === true ) { return; }
+			if ( scope.noZoom === true ) return;
 
 			state = STATE.DOLLY;
 
 			dollyStart.set( event.clientX, event.clientY );
 
 		} else if ( event.button === 2 ) {
-			if ( scope.noPan === true ) { return; }
+			if ( scope.noPan === true ) return;
 
 			state = STATE.PAN;
 
@@ -308,9 +335,9 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 		}
 
-		// Greggman fix: https://github.com/greggman/three.js/commit/fde9f9917d6d8381f06bf22cdff766029d1761be
 		scope.domElement.addEventListener( 'mousemove', onMouseMove, false );
 		scope.domElement.addEventListener( 'mouseup', onMouseUp, false );
+		scope.dispatchEvent( startEvent );
 
 	}
 
@@ -331,6 +358,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 			// rotating across whole screen goes 360 degrees around
 			scope.rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientWidth * scope.rotateSpeed );
+
 			// rotating up and down along whole screen attempts to go 360, but limited to 180
 			scope.rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight * scope.rotateSpeed );
 
@@ -362,13 +390,12 @@ THREE.OrbitControls = function ( object, domElement ) {
 			panEnd.set( event.clientX, event.clientY );
 			panDelta.subVectors( panEnd, panStart );
 			
-			scope.pan( panDelta );
+			scope.pan( panDelta.x, panDelta.y );
 
 			panStart.copy( panEnd );
 
 		}
 
-		// Greggman fix: https://github.com/greggman/three.js/commit/fde9f9917d6d8381f06bf22cdff766029d1761be
 		scope.update();
 
 	}
@@ -377,10 +404,9 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 		if ( scope.enabled === false ) return;
 
-		// Greggman fix: https://github.com/greggman/three.js/commit/fde9f9917d6d8381f06bf22cdff766029d1761be
 		scope.domElement.removeEventListener( 'mousemove', onMouseMove, false );
 		scope.domElement.removeEventListener( 'mouseup', onMouseUp, false );
-
+		scope.dispatchEvent( endEvent );
 		state = STATE.NONE;
 
 	}
@@ -389,13 +415,15 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 		if ( scope.enabled === false || scope.noZoom === true ) return;
 
+		event.preventDefault();
+
 		var delta = 0;
 
-		if ( event.wheelDelta ) { // WebKit / Opera / Explorer 9
+		if ( event.wheelDelta !== undefined ) { // WebKit / Opera / Explorer 9
 
 			delta = event.wheelDelta;
 
-		} else if ( event.detail ) { // Firefox
+		} else if ( event.detail !== undefined ) { // Firefox
 
 			delta = - event.detail;
 
@@ -412,56 +440,50 @@ THREE.OrbitControls = function ( object, domElement ) {
 		}
 
 		scope.update();
+		scope.dispatchEvent( startEvent );
+		scope.dispatchEvent( endEvent );
 
 	}
 
 	function onKeyDown( event ) {
 
-		if ( scope.enabled === false ) { return; }
-		if ( scope.noKeys === true ) { return; }
-		if ( scope.noPan === true ) { return; }
-
-		// pan a pixel - I guess for precise positioning?
-		// Greggman fix: https://github.com/greggman/three.js/commit/fde9f9917d6d8381f06bf22cdff766029d1761be
-		var needUpdate = false;
+		if ( scope.enabled === false || scope.noKeys === true || scope.noPan === true ) return;
 		
 		switch ( event.keyCode ) {
 
 			case scope.keys.UP:
-				scope.pan( new THREE.Vector2( 0, scope.keyPanSpeed ) );
-				needUpdate = true;
+				scope.pan( 0, scope.keyPanSpeed );
+				scope.update();
 				break;
+
 			case scope.keys.BOTTOM:
-				scope.pan( new THREE.Vector2( 0, -scope.keyPanSpeed ) );
-				needUpdate = true;
+				scope.pan( 0, - scope.keyPanSpeed );
+				scope.update();
 				break;
+
 			case scope.keys.LEFT:
-				scope.pan( new THREE.Vector2( scope.keyPanSpeed, 0 ) );
-				needUpdate = true;
+				scope.pan( scope.keyPanSpeed, 0 );
+				scope.update();
 				break;
+
 			case scope.keys.RIGHT:
-				scope.pan( new THREE.Vector2( -scope.keyPanSpeed, 0 ) );
-				needUpdate = true;
+				scope.pan( - scope.keyPanSpeed, 0 );
+				scope.update();
 				break;
-		}
-
-		// Greggman fix: https://github.com/greggman/three.js/commit/fde9f9917d6d8381f06bf22cdff766029d1761be
-		if ( needUpdate ) {
-
-			scope.update();
 
 		}
 
 	}
-	
+
 	function touchstart( event ) {
 
-		if ( scope.enabled === false ) { return; }
+		if ( scope.enabled === false ) return;
 
 		switch ( event.touches.length ) {
 
 			case 1:	// one-fingered touch: rotate
-				if ( scope.noRotate === true ) { return; }
+
+				if ( scope.noRotate === true ) return;
 
 				state = STATE.TOUCH_ROTATE;
 
@@ -469,7 +491,8 @@ THREE.OrbitControls = function ( object, domElement ) {
 				break;
 
 			case 2:	// two-fingered touch: dolly
-				if ( scope.noZoom === true ) { return; }
+
+				if ( scope.noZoom === true ) return;
 
 				state = STATE.TOUCH_DOLLY;
 
@@ -480,7 +503,8 @@ THREE.OrbitControls = function ( object, domElement ) {
 				break;
 
 			case 3: // three-fingered touch: pan
-				if ( scope.noPan === true ) { return; }
+
+				if ( scope.noPan === true ) return;
 
 				state = STATE.TOUCH_PAN;
 
@@ -488,27 +512,30 @@ THREE.OrbitControls = function ( object, domElement ) {
 				break;
 
 			default:
+
 				state = STATE.NONE;
 
 		}
+
+		scope.dispatchEvent( startEvent );
+
 	}
 
 	function touchmove( event ) {
 
-		if ( scope.enabled === false ) { return; }
+		if ( scope.enabled === false ) return;
 
 		event.preventDefault();
 		event.stopPropagation();
 
 		var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
 
-		var needUpdate = false;
-
 		switch ( event.touches.length ) {
 
 			case 1: // one-fingered touch: rotate
-				if ( scope.noRotate === true ) { return; }
-				if ( state !== STATE.TOUCH_ROTATE ) { return; }
+
+				if ( scope.noRotate === true ) return;
+				if ( state !== STATE.TOUCH_ROTATE ) return;
 
 				rotateEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
 				rotateDelta.subVectors( rotateEnd, rotateStart );
@@ -520,12 +547,13 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 				rotateStart.copy( rotateEnd );
 
-				needUpdate = true;
+				scope.update();
 				break;
 
 			case 2: // two-fingered touch: dolly
-				if ( scope.noZoom === true ) { return; }
-				if ( state !== STATE.TOUCH_DOLLY ) { return; }
+
+				if ( scope.noZoom === true ) return;
+				if ( state !== STATE.TOUCH_DOLLY ) return;
 
 				var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX;
 				var dy = event.touches[ 0 ].pageY - event.touches[ 1 ].pageY;
@@ -546,31 +574,27 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 				dollyStart.copy( dollyEnd );
 
-				needUpdate = true;
+				scope.update();
 				break;
 
 			case 3: // three-fingered touch: pan
-				if ( scope.noPan === true ) { return; }
-				if ( state !== STATE.TOUCH_PAN ) { return; }
+
+				if ( scope.noPan === true ) return;
+				if ( state !== STATE.TOUCH_PAN ) return;
 
 				panEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
 				panDelta.subVectors( panEnd, panStart );
 				
-				scope.pan( panDelta );
+				scope.pan( panDelta.x, panDelta.y );
 
 				panStart.copy( panEnd );
 
-				needUpdate = true;
+				scope.update();
 				break;
 
 			default:
-				state = STATE.NONE;
-
-		}
-
-		if ( needUpdate ) {
 
-			scope.update();
+				state = STATE.NONE;
 
 		}
 
@@ -578,9 +602,11 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 	function touchend( /* event */ ) {
 
-		if ( scope.enabled === false ) { return; }
+		if ( scope.enabled === false ) return;
 
+		scope.dispatchEvent( endEvent );
 		state = STATE.NONE;
+
 	}
 
 	this.domElement.addEventListener( 'contextmenu', function ( event ) { event.preventDefault(); }, false );
@@ -588,12 +614,12 @@ THREE.OrbitControls = function ( object, domElement ) {
 	this.domElement.addEventListener( 'mousewheel', onMouseWheel, false );
 	this.domElement.addEventListener( 'DOMMouseScroll', onMouseWheel, false ); // firefox
 
-	this.domElement.addEventListener( 'keydown', onKeyDown, false );
-
 	this.domElement.addEventListener( 'touchstart', touchstart, false );
 	this.domElement.addEventListener( 'touchend', touchend, false );
 	this.domElement.addEventListener( 'touchmove', touchmove, false );
 
+	window.addEventListener( 'keydown', onKeyDown, false );
+
 };
 
 THREE.OrbitControls.prototype = Object.create( THREE.EventDispatcher.prototype );

+ 6 - 3
examples/js/controls/PathControls.js

@@ -217,7 +217,10 @@ THREE.PathControls = function ( object, domElement ) {
 
 		THREE.AnimationHandler.add( animationData );
 
-		return new THREE.Animation( parent, name, THREE.AnimationHandler.CATMULLROM_FORWARD, false );
+		var animation = new THREE.Animation( parent, name );
+		animation.interpolationType = THREE.AnimationHandler.CATMULLROM_FORWARD;
+
+		return animation;
 
 	};
 
@@ -285,8 +288,8 @@ THREE.PathControls = function ( object, domElement ) {
 
 			var dummyParentMaterial = new THREE.MeshLambertMaterial( { color: 0x0077ff } ),
 			dummyChildMaterial  = new THREE.MeshLambertMaterial( { color: 0x00ff00 } ),
-			dummyParentGeo = new THREE.CubeGeometry( 10, 10, 20 ),
-			dummyChildGeo  = new THREE.CubeGeometry( 2, 2, 10 );
+			dummyParentGeo = new THREE.BoxGeometry( 10, 10, 20 ),
+			dummyChildGeo  = new THREE.BoxGeometry( 2, 2, 10 );
 
 			this.animationParent = new THREE.Mesh( dummyParentGeo, dummyParentMaterial );
 

+ 11 - 11
examples/js/controls/TransformControls.js

@@ -558,7 +558,7 @@ THREE.TransformGizmoScale = function () {
 	THREE.TransformGizmo.call( this );
 
 	var arrowGeometry = new THREE.Geometry();
-	var mesh = new THREE.Mesh( new THREE.CubeGeometry( 0.125, 0.125, 0.125 ) );
+	var mesh = new THREE.Mesh( new THREE.BoxGeometry( 0.125, 0.125, 0.125 ) );
 	mesh.position.y = 0.5;
 	THREE.GeometryUtils.merge( arrowGeometry, mesh );
 
@@ -588,7 +588,7 @@ THREE.TransformGizmoScale = function () {
 			new THREE.Vector3( Math.PI/2, 0, 0 )
 		],
 		XYZ: [
-			new THREE.Mesh( new THREE.CubeGeometry( 0.125, 0.125, 0.125 ), new THREE.TransformGizmoMaterial( { color: 0xffffff, opacity: 0.25 } ) )
+			new THREE.Mesh( new THREE.BoxGeometry( 0.125, 0.125, 0.125 ), new THREE.TransformGizmoMaterial( { color: 0xffffff, opacity: 0.25 } ) )
 		]
 
 	}
@@ -624,7 +624,7 @@ THREE.TransformGizmoScale = function () {
 			new THREE.Vector3( Math.PI/2, 0, 0 )
 		],
 		XYZ: [
-			new THREE.Mesh( new THREE.CubeGeometry( 0.4, 0.4, 0.4 ), new THREE.TransformGizmoMaterial( { color: 0xffffff, opacity: 0.25 } ) )
+			new THREE.Mesh( new THREE.BoxGeometry( 0.4, 0.4, 0.4 ), new THREE.TransformGizmoMaterial( { color: 0xffffff, opacity: 0.25 } ) )
 		]
 	}
 
@@ -956,14 +956,14 @@ THREE.TransformControls = function ( camera, domElement ) {
 				scope.object.position.copy( oldPosition );
 				scope.object.position.add( point );
 
-				if ( scope.snap != undefined ) {
-
-					if ( scope.axis.search("X") != -1 ) scope.object.position.x = Math.round( scope.object.position.x / scope.snap ) * scope.snap;
-					if ( scope.axis.search("Y") != -1 ) scope.object.position.y = Math.round( scope.object.position.y / scope.snap ) * scope.snap;
-					if ( scope.axis.search("Z") != -1 ) scope.object.position.z = Math.round( scope.object.position.z / scope.snap ) * scope.snap;
-				
-				}
-
+			}
+			
+			if ( scope.snap != undefined ) {
+			
+				if ( scope.axis.search("X") != -1 ) scope.object.position.x = Math.round( scope.object.position.x / scope.snap ) * scope.snap;
+				if ( scope.axis.search("Y") != -1 ) scope.object.position.y = Math.round( scope.object.position.y / scope.snap ) * scope.snap;
+				if ( scope.axis.search("Z") != -1 ) scope.object.position.z = Math.round( scope.object.position.z / scope.snap ) * scope.snap;
+			
 			}
 
 		} else if ( _mode == "scale" ) {

+ 1 - 1
examples/js/crossfade/scenes.js

@@ -40,7 +40,7 @@ function generateGeometry(objectType, numObjects) {
 
 		if ( objectType == "cube" )
 		{
-			geom = new THREE.CubeGeometry( 1, 1, 1 );
+			geom = new THREE.BoxGeometry( 1, 1, 1 );
 			scale.y = Math.random() * 200 + 100;
 			scale.z = Math.random() * 200 + 100;
 			color.setRGB( 0, 0, Math.random()+0.1 );

+ 55 - 0
examples/js/exporters/Geometry2Exporter.js

@@ -0,0 +1,55 @@
+/**
+ * @author mrdoob / http://mrdoob.com/
+ */
+
+THREE.Geometry2Exporter = function () {};
+
+THREE.Geometry2Exporter.prototype = {
+
+	constructor: THREE.Geometry2Exporter,
+
+	parse: function ( geometry ) {
+
+		var output = {
+			metadata: {
+				version: 4.0,
+				type: 'Geometry2',
+				generator: 'Geometry2Exporter'
+			}
+		};
+
+		var attributes = [ 'vertices', 'normals', 'uvs' ];
+
+		for ( var key in attributes ) {
+
+			var attribute = attributes[ key ];
+			
+			var typedArray = geometry[ attribute ];
+			var array = [];
+
+			for ( var i = 0, l = typedArray.length; i < l; i ++ ) {
+
+				array[ i ] = typedArray[ i ];
+
+			}
+
+			output[ attribute ] = array;
+
+		}
+
+		var boundingSphere = geometry.boundingSphere;
+
+		if ( boundingSphere !== null ) {
+
+			output.boundingSphere = {
+				center: boundingSphere.center.toArray(),
+				radius: boundingSphere.radius
+			}
+
+		}
+
+		return output;
+
+	}
+
+};

+ 17 - 65
examples/js/exporters/GeometryExporter.js

@@ -39,7 +39,6 @@ THREE.GeometryExporter.prototype = {
 
 			var face = geometry.faces[ i ];
 
-			var isTriangle = face instanceof THREE.Face3;
 			var hasMaterial = false; // face.materialIndex !== undefined;
 			var hasFaceUv = false; // deprecated
 			var hasFaceVertexUv = geometry.faceVertexUvs[ 0 ].length > 0;
@@ -50,7 +49,7 @@ THREE.GeometryExporter.prototype = {
 
 			var faceType = 0;
 
-			faceType = setBit( faceType, 0, ! isTriangle );
+			faceType = setBit( faceType, 0, 0 );
 			faceType = setBit( faceType, 1, hasMaterial );
 			faceType = setBit( faceType, 2, hasFaceUv );
 			faceType = setBit( faceType, 3, hasFaceVertexUv );
@@ -60,16 +59,8 @@ THREE.GeometryExporter.prototype = {
 			faceType = setBit( faceType, 7, hasFaceVertexColor );
 
 			faces.push( faceType );
+			faces.push( face.a, face.b, face.c );
 
-			if ( isTriangle ) {
-
-				faces.push( face.a, face.b, face.c );
-
-			} else {
-
-				faces.push( face.a, face.b, face.c, face.d );
-
-			}
 
 			/*
 			if ( hasMaterial ) {
@@ -83,24 +74,11 @@ THREE.GeometryExporter.prototype = {
 
 				var faceVertexUvs = geometry.faceVertexUvs[ 0 ][ i ];
 
-				if ( isTriangle ) {
-
-					faces.push(
-						getUvIndex( faceVertexUvs[ 0 ] ),
-						getUvIndex( faceVertexUvs[ 1 ] ),
-						getUvIndex( faceVertexUvs[ 2 ] )
-					);
-
-				} else {
-
-					faces.push(
-						getUvIndex( faceVertexUvs[ 0 ] ),
-						getUvIndex( faceVertexUvs[ 1 ] ),
-						getUvIndex( faceVertexUvs[ 2 ] ),
-						getUvIndex( faceVertexUvs[ 3 ] )
-					);
-
-				}
+				faces.push(
+					getUvIndex( faceVertexUvs[ 0 ] ),
+					getUvIndex( faceVertexUvs[ 1 ] ),
+					getUvIndex( faceVertexUvs[ 2 ] )
+				);
 
 			}
 
@@ -114,24 +92,11 @@ THREE.GeometryExporter.prototype = {
 
 				var vertexNormals = face.vertexNormals;
 
-				if ( isTriangle ) {
-
-					faces.push(
-						getNormalIndex( vertexNormals[ 0 ] ),
-						getNormalIndex( vertexNormals[ 1 ] ),
-						getNormalIndex( vertexNormals[ 2 ] )
-					);
-
-				} else {
-
-					faces.push(
-						getNormalIndex( vertexNormals[ 0 ] ),
-						getNormalIndex( vertexNormals[ 1 ] ),
-						getNormalIndex( vertexNormals[ 2 ] ),
-						getNormalIndex( vertexNormals[ 3 ] )
-					);
-
-				}
+				faces.push(
+					getNormalIndex( vertexNormals[ 0 ] ),
+					getNormalIndex( vertexNormals[ 1 ] ),
+					getNormalIndex( vertexNormals[ 2 ] )
+				);
 
 			}
 
@@ -145,24 +110,11 @@ THREE.GeometryExporter.prototype = {
 
 				var vertexColors = face.vertexColors;
 
-				if ( isTriangle ) {
-
-					faces.push(
-						getColorIndex( vertexColors[ 0 ] ),
-						getColorIndex( vertexColors[ 1 ] ),
-						getColorIndex( vertexColors[ 2 ] )
-					);
-
-				} else {
-
-					faces.push(
-						getColorIndex( vertexColors[ 0 ] ),
-						getColorIndex( vertexColors[ 1 ] ),
-						getColorIndex( vertexColors[ 2 ] ),
-						getColorIndex( vertexColors[ 3 ] )
-					);
-
-				}
+				faces.push(
+					getColorIndex( vertexColors[ 0 ] ),
+					getColorIndex( vertexColors[ 1 ] ),
+					getColorIndex( vertexColors[ 2 ] )
+				);
 
 			}
 

+ 10 - 2
examples/js/exporters/ObjectExporter.js

@@ -24,6 +24,7 @@ THREE.ObjectExporter.prototype = {
 
 		var geometries = {};
 		var geometryExporter = new THREE.GeometryExporter();
+		var geometry2Exporter = new THREE.Geometry2Exporter();
 		var bufferGeometryExporter = new THREE.BufferGeometryExporter();
 
 		var parseGeometry = function ( geometry ) {
@@ -50,9 +51,9 @@ THREE.ObjectExporter.prototype = {
 					data.widthSegments = geometry.widthSegments;
 					data.heightSegments = geometry.heightSegments;
 
-				} else if ( geometry instanceof THREE.CubeGeometry ) {
+				} else if ( geometry instanceof THREE.BoxGeometry ) {
 
-					data.type = 'CubeGeometry';
+					data.type = 'BoxGeometry';
 					data.width = geometry.width;
 					data.height = geometry.height;
 					data.depth = geometry.depth;
@@ -120,6 +121,13 @@ THREE.ObjectExporter.prototype = {
 
 					delete data.data.metadata;
 
+				} else if ( geometry instanceof THREE.Geometry2 ) {
+
+					data.type = 'Geometry2';
+					data.data = geometry2Exporter.parse( geometry );
+
+					delete data.data.metadata;
+
 				} else if ( geometry instanceof THREE.Geometry ) {
 
 					data.type = 'Geometry';

+ 1 - 1
examples/js/exporters/SceneExporter.js

@@ -378,7 +378,7 @@ THREE.SceneExporter.prototype = {
 
 				];
 
-			} else if ( g instanceof THREE.CubeGeometry ) {
+			} else if ( g instanceof THREE.BoxGeometry ) {
 
 				var output = [
 

+ 1 - 1
examples/js/loaders/BinaryLoader.js

@@ -69,7 +69,7 @@ THREE.BinaryLoader.prototype.loadAjaxJSON = function ( context, url, callback, t
 THREE.BinaryLoader.prototype.loadAjaxBuffers = function ( json, callback, binaryPath, texturePath, callbackProgress ) {
 
 	var xhr = new XMLHttpRequest(),
-		url = binaryPath + "/" + json.buffers;
+		url = binaryPath + json.buffers;
 
 	xhr.addEventListener( 'load', function ( event ) {
 

部分文件因为文件数量过多而无法显示