Mr.doob 10 years ago
parent
commit
0b35549490
100 changed files with 4080 additions and 1380 deletions
  1. 364 264
      build/three.js
  2. 158 153
      build/three.min.js
  3. 83 0
      docs/api/cameras/CubeCamera.html
  4. 1 1
      docs/api/constants/ShadowingTypes.html
  5. 1 2
      docs/api/constants/Textures.html
  6. 45 22
      docs/api/core/Object3D.html
  7. 1 1
      docs/api/examples/Lut.html
  8. 19 19
      docs/api/examples/cameras/CombinedCamera.html
  9. 2 2
      docs/api/extras/ImageUtils.html
  10. 3 3
      docs/api/extras/SceneUtils.html
  11. 4 19
      docs/api/extras/animation/Animation.html
  12. 0 57
      docs/api/extras/cameras/CubeCamera.html
  13. 14 11
      docs/api/extras/core/Curve.html
  14. 13 10
      docs/api/extras/curves/ClosedSplineCurve3.html
  15. 34 15
      docs/api/extras/curves/CubicBezierCurve.html
  16. 35 16
      docs/api/extras/curves/CubicBezierCurve3.html
  17. 4 4
      docs/api/extras/curves/EllipseCurve.html
  18. 1 1
      docs/api/extras/curves/LineCurve.html
  19. 1 1
      docs/api/extras/curves/LineCurve3.html
  20. 32 14
      docs/api/extras/curves/QuadraticBezierCurve.html
  21. 32 14
      docs/api/extras/curves/QuadraticBezierCurve3.html
  22. 13 12
      docs/api/extras/curves/SplineCurve.html
  23. 16 10
      docs/api/extras/curves/SplineCurve3.html
  24. 2 2
      docs/api/extras/geometries/ExtrudeGeometry.html
  25. 1 1
      docs/api/extras/geometries/ShapeGeometry.html
  26. 3 3
      docs/api/extras/helpers/ArrowHelper.html
  27. 1 1
      docs/api/extras/helpers/AxisHelper.html
  28. 1 1
      docs/api/extras/helpers/BoundingBoxHelper.html
  29. 1 1
      docs/api/extras/helpers/GridHelper.html
  30. 1 1
      docs/api/extras/objects/ImmediateRenderObject.html
  31. 2 2
      docs/api/lights/SpotLight.html
  32. 84 0
      docs/api/loaders/BabylonLoader.html
  33. 53 17
      docs/api/loaders/BufferGeometryLoader.html
  34. 37 15
      docs/api/loaders/Cache.html
  35. 114 0
      docs/api/loaders/ColladaLoader.html
  36. 53 20
      docs/api/loaders/ImageLoader.html
  37. 117 23
      docs/api/loaders/JSONLoader.html
  38. 21 21
      docs/api/loaders/Loader.html
  39. 34 27
      docs/api/loaders/LoadingManager.html
  40. 56 0
      docs/api/loaders/MTLLoader.html
  41. 50 22
      docs/api/loaders/MaterialLoader.html
  42. 75 0
      docs/api/loaders/OBJLoader.html
  43. 87 0
      docs/api/loaders/OBJMTLLoader.html
  44. 46 16
      docs/api/loaders/ObjectLoader.html
  45. 95 0
      docs/api/loaders/PDBLoader.html
  46. 47 0
      docs/api/loaders/SVGLoader.html
  47. 114 0
      docs/api/loaders/SceneLoader.html
  48. 77 0
      docs/api/loaders/TGALoader.html
  49. 45 58
      docs/api/loaders/TextureLoader.html
  50. 47 15
      docs/api/loaders/XHRLoader.html
  51. 73 0
      docs/api/loaders/glTFLoader.html
  52. 15 15
      docs/api/materials/LineDashedMaterial.html
  53. 7 6
      docs/api/materials/Material.html
  54. 28 26
      docs/api/materials/MeshBasicMaterial.html
  55. 6 0
      docs/api/materials/MeshDepthMaterial.html
  56. 1 1
      docs/api/materials/MeshFaceMaterial.html
  57. 67 47
      docs/api/materials/MeshLambertMaterial.html
  58. 8 8
      docs/api/materials/MeshNormalMaterial.html
  59. 97 70
      docs/api/materials/MeshPhongMaterial.html
  60. 3 1
      docs/api/materials/PointCloudMaterial.html
  61. 56 49
      docs/api/materials/ShaderMaterial.html
  62. 11 10
      docs/api/materials/SpriteCanvasMaterial.html
  63. 13 45
      docs/api/materials/SpriteMaterial.html
  64. 4 4
      docs/api/math/Box2.html
  65. 5 5
      docs/api/math/Box3.html
  66. 14 0
      docs/api/math/Euler.html
  67. 1 1
      docs/api/math/Frustum.html
  68. 10 0
      docs/api/math/Matrix4.html
  69. 1 1
      docs/api/math/Ray.html
  70. 10 6
      docs/api/math/Spline.html
  71. 2 2
      docs/api/math/Triangle.html
  72. 1 1
      docs/api/math/Vector4.html
  73. 2 2
      docs/api/objects/Mesh.html
  74. 4 6
      docs/api/objects/PointCloud.html
  75. 1 1
      docs/api/objects/SkinnedMesh.html
  76. 1 1
      docs/api/objects/Sprite.html
  77. 81 69
      docs/api/renderers/CanvasRenderer.html
  78. 84 1
      docs/api/renderers/WebGLRenderTarget.html
  79. 19 11
      docs/api/renderers/WebGLRenderTargetCube.html
  80. 27 52
      docs/api/renderers/WebGLRenderer.html
  81. 1 1
      docs/api/renderers/webgl/WebGLProgram.html
  82. 1 1
      docs/api/renderers/webgl/plugins/LensFlarePlugin.html
  83. 1 1
      docs/api/renderers/webgl/plugins/ShadowMapPlugin.html
  84. 1 1
      docs/api/renderers/webgl/plugins/SpritePlugin.html
  85. 12 1
      docs/api/textures/CompressedTexture.html
  86. 1 1
      docs/api/textures/DataTexture.html
  87. 6 2
      docs/api/textures/Texture.html
  88. 12 6
      docs/list.js
  89. 4 4
      docs/manual/introduction/Creating-a-scene.html
  90. 5 1
      docs/page.css
  91. 535 0
      docs/scenes/js/material.js
  92. 124 0
      docs/scenes/material-browser.html
  93. 12 1
      editor/css/dark.css
  94. 12 1
      editor/css/light.css
  95. 10 1
      editor/css/main.css
  96. 172 0
      editor/examples/camera.app.json
  97. 99 0
      editor/examples/particles.app.json
  98. 137 0
      editor/examples/pong.app.json
  99. 17 16
      editor/index.html
  100. 126 4
      editor/js/Editor.js

File diff suppressed because it is too large
+ 364 - 264
build/three.js


File diff suppressed because it is too large
+ 158 - 153
build/three.min.js


+ 83 - 0
docs/api/cameras/CubeCamera.html

@@ -0,0 +1,83 @@
+<!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;
+
+		<h1>[name]</h1>
+
+		<div class="desc">Creates 6 cameras that render to a [page:WebGLRenderTargetCube].</div>
+
+		<h2>Examples</h2>
+		
+		<div>[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]</div>
+		<div>[example:webgl_materials_cubemap_dynamic2 materials / cubemap / dynamic2 ]</div>
+		<div>[example:webgl_materials_cubemap_dynamic2 shading / physical ]</div>
+		
+		<code>//Create cube camera
+		var cubeCamera = new THREE.CubeCamera( 1, 100000, 128 );
+		scene.add( cubeCamera );
+		
+		//Create car
+		var chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, ambient: 0xffffff, envMap: cubeCamera.renderTarget } );
+		var car = new Mesh( carGeometry, chromeMaterial );
+		scene.add( car );
+		
+		//Update the render target cube
+		car.setVisible( false );
+		cubeCamera.position.copy( car.position );
+		cubeCamera.updateCubeMap( renderer, scene );
+
+		//Render the scene
+		car.setVisible( true );
+		renderer.render( scene, camera );
+		</code>
+		
+
+		<h2>Constructor</h2>
+
+
+		<h3>[name]([page:number near], [page:number far], [page:number cubeResolution])</h3>
+		<div>
+		near -- The near clipping distance. <br />
+		far -- The far clipping distance <br />
+		cubeResolution -- Sets the width of the cube.
+		</div>
+		<div>
+		Constructs a CubeCamera that contains 6 [page:PerspectiveCamera PerspectiveCameras] that then
+		render to a [page:WebGLRenderTargetCube]
+		</div>
+
+
+		<h2>Properties</h2>
+
+
+
+		<h3>[property:WebGLRenderTargetCube renderTarget]</h3>
+		<div>
+		The cube texture that gets generated.
+		</div> 
+
+		<h2>Methods</h2>
+
+
+
+		<h3>[method:todo updateCubeMap]([page:todo renderer], [page:todo scene])</h3>
+		<div>
+		renderer -- The current WebGL renderer <br />
+		scene -- The current scene
+		</div>
+		<div>
+		Call this to update the renderTarget.
+		</div>
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 1 - 1
docs/api/constants/ShadowingTypes.html

@@ -7,7 +7,7 @@
 		<link type="text/css" rel="stylesheet" href="../../page.css" />
 	</head>
 	<body>
-		<h1>Shadowing Type Contants</h1>
+		<h1>Shadowing Type Constants</h1>
 
 		<h2>Shadow Map</h2>
 		<div>

+ 1 - 2
docs/api/constants/Textures.html

@@ -21,8 +21,7 @@
 		THREE.UVMapping<br />
 		THREE.CubeReflectionMapping<br />
 		THREE.CubeRefractionMapping<br />
-		THREE.SphericalReflectionMapping<br />
-		THREE.SphericalRefractionMapping
+		THREE.SphericalReflectionMapping
 		</div>
 
 		<h2>Wrapping Modes</h2>

+ 45 - 22
docs/api/core/Object3D.html

@@ -25,7 +25,7 @@
 
 		<h3>[property:Integer id]</h3>
 		<div>
-		Unique number for this object instance.
+		readonly – Unique number for this object instance.
 		</div>
 
 		<h3>[property:String uuid]</h3>
@@ -59,11 +59,6 @@
 		Object's local rotation (<a href="https://en.wikipedia.org/wiki/Euler_angles" target="_blank">Euler angles</a>), in radians.
 		</div>
 
-		<h3>[property:String eulerOrder]</h3>
-		<div>
-		Order of axis for Euler angles.
-		</div>
-
 		<h3>[property:Vector3 scale]</h3>
 		<div>
 		Object's local scale.
@@ -81,53 +76,64 @@
 
 		<h3>[property:Quaternion quaternion]</h3>
 		<div>
-		Object's local rotation as [page:Quaternion Quaternion]. Only used when useQuaternion is set to true.
-		</div>
-
-		<h3>[property:Boolean useQuaternion]</h3>
-		<div>
-		Use quaternion instead of Euler angles for specifying local rotation.
-		</div>
-
-		<h3>[property:Float renderDepth]</h3>
-		<div>
-		Override depth-sorting order if non *null*.
+		Object's local rotation as [page:Quaternion Quaternion].
 		</div>
 
 		<h3>[property:Boolean visible]</h3>
 		<div>
 		Object gets rendered if *true*.
 		</div>
+		<div>
+		default – true
+		</div>
 
 		<h3>[property:Boolean castShadow]</h3>
 		<div>
 		Gets rendered into shadow map.
 		</div>
+		<div>
+		default – false
+		</div>
 
 		<h3>[property:Boolean receiveShadow]</h3>
 		<div>
 		Material gets baked in shadow receiving.
 		</div>
+		<div>
+		default – false
+		</div>
 
 		<h3>[property:Boolean frustumCulled]</h3>
 		<div>
 		When this is set, it checks every frame if the object is in the frustum of the camera. Otherwise the object gets drawn every frame even if it isn't visible.
 		</div>
+		<div>
+		default – true
+		</div>
 
 		<h3>[property:Boolean matrixAutoUpdate]</h3>
 		<div>
 		When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property.
 		</div>
+		<div>
+		default – true
+		</div>
 
 		<h3>[property:Boolean matrixWorldNeedsUpdate]</h3>
 		<div>
 		When this is set, it calculates the matrixWorld in that frame and resets this property to false.
 		</div>
+		<div>
+		default – false
+		</div>
 
 		<h3>[property:Boolean rotationAutoUpdate]</h3>
 		<div>
 		When this is set, then the rotationMatrix gets calculated every frame.
 		</div>
+		<div>
+		default – true
+		</div>
 
 		<h3>[property:object userData]</h3>
 		<div>
@@ -200,29 +206,46 @@
 		Rotates object to face point in space.
 		</div>
 
-		<h3>[method:null add]( [page:Object3D object] )</h3>
+		<h3>[method:null add]( [page:Object3D object], ... )</h3>
 		<div>
 		object - An object.<br />
 		</div>
 		<div>
-		Adds *object* as child of this object.
+		Adds *object* as child of this object. An arbitrary number of objects may be added.
 		</div>
 
-		<h3>[method:null remove]( [page:Object3D object] )</h3>
+		<h3>[method:null remove]( [page:Object3D object], ... )</h3>
 		<div>
 		object - An object.<br />
 		</div>
 		<div>
-		Removes *object* as child of this object.
+		Removes *object* as child of this object. An arbitrary number of objects may be removed.
 		</div>
 
 		<h3>[method:null traverse]( [page:Function callback] )</h3>
 		<div>
-		callback - An Function with as first argument an object3D object.<br />
+		callback - A function with as first argument an object3D object.<br />
 		</div>
 		<div>
 		Executes the callback on this object and all descendants.
 		</div>
+		
+		<h3>[method:null traverseVisible]( [page:Function callback] )</h3>
+		<div>
+		callback - A function with as first argument an object3D object.<br />
+		</div>
+		<div>
+		Like traverse, but the callback will only be executed for visible objects.
+		Descendants of invisible objects are not traversed.
+		</div>
+		
+		<h3>[method:null traverseAncestors]( [page:Function callback] )</h3>
+		<div>
+		callback - A function with as first argument an object3D object.<br />
+		</div>
+		<div>
+		Executes the callback on this object and all ancestors.
+		</div>
 
 		<h3>[method:null updateMatrix]()</h3>
 		<div>

+ 1 - 1
docs/api/examples/Lut.html

@@ -25,7 +25,7 @@
 
 		<h3>[name]( colormap, numberOfColors )</h3>
                 <div>
-                colormap - optional argument that sets a colormap from prefefined colormaps. Available colormaps are : "rainbow", "cooltowarm", "blackbody".
+                colormap - optional argument that sets a colormap from predefined colormaps. Available colormaps are : "rainbow", "cooltowarm", "blackbody".
                 numberOfColors - optional argument that sets the number of colors used to represent the data array.
 		</div>
 

+ 19 - 19
docs/api/extras/cameras/CombinedCamera.html → docs/api/examples/cameras/CombinedCamera.html

@@ -11,10 +11,10 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">A general perpose camera, for setting FOV, Lens Focal Length,
+		<div class="desc">A general purpose camera, for setting FOV, Lens Focal Length,
  		and switching between perspective and orthographic views easily.
  		Use this only if you do not wish to manage
- 		both a Orthographic and Perspective Camera</div>
+ 		both an Orthographic and Perspective Camera</div>
 
 
 		<h2>Constructor</h2>
@@ -69,14 +69,14 @@
 		Gets or sets the zoom factor of the camera.
 		</div> 
 
-		<h3>[property:number far]</h3>
+		<h3>[property:number near]</h3>
 		<div>
-		Gets camera frustum far plane.
+		Gets camera frustum near plane.
 		</div> 
 
-		<h3>[property:number near]</h3>
+		<h3>[property:number far]</h3>
 		<div>
-		Gets camera frustum near plane.
+		Gets camera frustum far plane.
 		</div> 
 
 		<h3>[property:OrthographicCamera cameraO]</h3>
@@ -101,7 +101,7 @@
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo setFov]([page:Number fov])</h3>
+		<h3>[method:null setFov]([page:Number fov])</h3>
 		<div>
 		fov --  Camera frustum vertical field of view in perspective view.
 		</div>
@@ -109,7 +109,7 @@
 		sets the camera frustum vertical field of view in perspective view.
 		</div>
 
-		<h3>[method:todo setZoom]([page:Number zoom])</h3>
+		<h3>[method:null setZoom]([page:Number zoom])</h3>
 		<div>
 		zoom -- The zoom factor.
 		</div>
@@ -117,7 +117,7 @@
 		Sets the zoomfactor.
 		</div>
 
-		<h3>[method:todo setLens]([page:number focalLength], [page:Number frameHeight])</h3>
+		<h3>[method:null setLens]([page:number focalLength], [page:Number frameHeight])</h3>
 		<div>
 		focalLength -- The focal length of a lens is defined as the distance from the optical center of a lens (or, the secondary principal point for a complex lens like a camera lens) to the focal point (sensor) when the lens is focused on an object at infinity. <br />
 		frameHeight -- the size of the frame in mm. (default is *35*)
@@ -126,37 +126,37 @@
 		Sets the fov based on lens data.
 		</div>
 
-		<h3>[method:todo toFrontView]()</h3>
+		<h3>[method:null toFrontView]()</h3>
 		<div>
 		Sets the camera to view the front of the target.
 		</div>
 
-		<h3>[method:todo toBackView]()</h3>
+		<h3>[method:null toBackView]()</h3>
 		<div>
 		Sets the camera to view the back of the target.
 		</div>
 
-		<h3>[method:todo toLeftView]()</h3>
+		<h3>[method:null toLeftView]()</h3>
 		<div>
 		Sets the camera to view the left of the target.
 		</div>
 
-		<h3>[method:todo toRightView]()</h3>
+		<h3>[method:null toRightView]()</h3>
 		<div>
 		Sets the camera to view the right of the target.
 		</div>
 
-		<h3>[method:todo toTopView]()</h3>
+		<h3>[method:null toTopView]()</h3>
 		<div>
 		Sets the camera to view the top.
 		</div>
 
-		<h3>[method:todo toBottomView]()</h3>
+		<h3>[method:null toBottomView]()</h3>
 		<div>
 		Sets the camera to view the bottom.
 		</div>
 
-		<h3>[method:todo setSize]([page:Number width], [page:Number height])</h3>
+		<h3>[method:null setSize]([page:Number width], [page:Number height])</h3>
 		<div>
 		width -- The width of the orthographic view.<br />
 		height -- The height of the orthographic view.
@@ -165,17 +165,17 @@
 		Sets the size of the orthographic view.
 		</div>
 
-		<h3>[method:todo toOrthographic]()</h3>
+		<h3>[method:null toOrthographic]()</h3>
 		<div>
 		Change the camera to orthographic view.
 		</div>
 
-		<h3>[method:todo toPerspective]()</h3>
+		<h3>[method:null toPerspective]()</h3>
 		<div>
 		Change the camera to Perspective view.
 		</div>
 
-		<h3>[method:todo updateProjectionMatrix]()</h3>
+		<h3>[method:null updateProjectionMatrix]()</h3>
 		<div>
 		Updates the ProjectionMatrix.
 		</div>

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

@@ -28,7 +28,7 @@
 		<h3>[method:DataTexture generateDataTexture]([page:Number width], [page:Number height], [page:Number color])</h3>
 		<div>
 		width -- The width of the texture. <br />
-		height -- The width of the texture. <br />
+		height -- The height of the texture. <br />
 		color -- The hexadecimal value of the color.
 		</div>
 		<div>
@@ -58,7 +58,7 @@
 		<h3>[method:todo loadTexture]([page:String url], [page:UVMapping mapping], [page:Function onLoad], [page:Function onError])</h3>
 		<div>
 		url -- the url of the texture<br />
-		mapping -- Can be an instance of [page:UVMapping THREE.UVMapping], [page:CubeReflectionMapping THREE.CubeReflectionMapping], [page:SphericalReflectionMapping THREE.SphericalReflectionMapping] or [page:SphericalRefractionMapping THREE.SphericalRefractionMapping]. Describes how the image is applied to the object.<br />Use undefined instead of null as a default value. See mapping property of [page:Texture texture] for more details.
+		mapping -- Can be an instance of [page:UVMapping THREE.UVMapping], [page:CubeReflectionMapping THREE.CubeReflectionMapping] or [page:SphericalReflectionMapping THREE.SphericalReflectionMapping]. Describes how the image is applied to the object.<br />Use undefined instead of null as a default value. See mapping property of [page:Texture texture] for more details. <br/>
 		onLoad -- callback function<br />
 		onError -- callback function
 		</div>

+ 3 - 3
docs/api/extras/SceneUtils.html

@@ -9,7 +9,7 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">A class containing usefull utility functions for scene manipulation.</div>
+		<div class="desc">A class containing useful utility functions for scene manipulation.</div>
 
 
 		<h2>Methods</h2>
@@ -25,7 +25,7 @@
 		This is mostly useful for object that need a material and a wireframe implementation.
 		</div>
 
-		<h3>[method:todo attach]([page:Object3D child], [page:Object3D scene], [page:Object3D parent])</h3>
+		<h3>[method:null attach]([page:Object3D child], [page:Object3D scene], [page:Object3D parent])</h3>
 		<div>
 		child -- The object to add to the parent  <br />
 		scene -- The scene to detach the object on. <br />
@@ -35,7 +35,7 @@
 		Attaches the object to the parent without the moving the object in the worldspace.
 		</div>
 
-		<h3>[method:todo detach]([page:Object3D child], [page:Object3D parent], [page:Object3D scene])</h3>
+		<h3>[method:null detach]([page:Object3D child], [page:Object3D parent], [page:Object3D scene])</h3>
 		<div>
 		child -- The object to remove from the parent  <br />
 		scene -- The scene to attach the object on. <br />

+ 4 - 19
docs/api/extras/animation/Animation.html

@@ -9,7 +9,7 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">This class animates an object based on an hierarchy.This hierarchy can be Object3Ds or bones.</div>
+		<div class="desc">This class animates an object based on an hierarchy. This hierarchy can be Object3ds or bones.</div>
 
 
 		<h2>Constructor</h2>
@@ -71,34 +71,19 @@
 		The type to indicate how to interpolate between 2 data points.
 		</div> 
 
-		<h3>[property:array points]</h3>
-		<div>
-		This should be removed from the code.(TODO).
-		</div>
-		
-		<h3>[property:Vector3 target]</h3>
-		<div>
-		This should be removed from the code.(TODO).
-		</div>
-
 		<h2>Methods</h2>
 		
-		<h3>[method:todo play]([page:Number startTime])</h3>
+		<h3>[method:null play]([page:Number startTime])</h3>
 		<div>
 		Starts the animation from a moment startTime in the animation.
 		</div>
 
-		<h3>[method:todo pause]()</h3>
-		<div>
-		Pauses the animation or restarts the animation after pausing it.
-		</div>
-
-		<h3>[method:todo stop]()</h3>
+		<h3>[method:null stop]()</h3>
 		<div>
 		Stops the animation.
 		</div>
 
-		<h3>[method:todo update]([page:Number deltaTimeMS])</h3>
+		<h3>[method:Boolean update]([page:Number deltaTimeMS])</h3>
 		<div>
 		deltaTimeMS -- The time of the between the previous frame and this frame in miliseconds. 
 		</div>

+ 0 - 57
docs/api/extras/cameras/CubeCamera.html

@@ -1,57 +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>
-		[page:Object3D] &rarr;
-
-		<h1>[name]</h1>
-
-		<div class="desc">todo</div>
-
-
-		<h2>Constructor</h2>
-
-
-		<h3>[name]([page:todo near], [page:todo far], [page:todo cubeResolution])</h3>
-		<div>
-		near -- todo <br />
-		far -- todo <br />
-		cubeResolution -- todo
-		</div>
-		<div>
-		todo
-		</div>
-
-
-		<h2>Properties</h2>
-
-
-
-		<h3>[property:WebGLRenderTargetCube renderTarget]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h2>Methods</h2>
-
-
-
-		<h3>[method:todo updateCubeMap]([page:todo renderer], [page:todo scene])</h3>
-		<div>
-		renderer -- todo <br />
-		scene -- todo
-		</div>
-		<div>
-		todo
-		</div>
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-	</body>
-</html>

+ 14 - 11
docs/api/extras/core/Curve.html

@@ -10,7 +10,10 @@
 		<h1>[name]</h1>
 
 		<div class="desc">An extensible curve object which contains methods for interpolation.</div>
-
+		
+		<h2>Examples</h2>
+		
+		<h3>[example:webgl_geometry_extrude_splines geometry / extrude / splines ]
 
 		<h2>Constructor</h2>
 
@@ -23,34 +26,34 @@
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo getPoint]( t )</h3>
+		<h3>[method:Vector getPoint]( t )</h3>
 		<div>Returns a vector for point t of the curve where t is between 0 and 1</div>
 
-		<h3>[method:todo getPointAt]( u )</h3>
+		<h3>[method:Vector getPointAt]( u )</h3>
 		<div>Returns a vector for point at relative position in curve according to arc length</div>
 
-		<h3>[method:todo getPoints]( divisions )</h3>
+		<h3>[method:Array getPoints]( divisions )</h3>
 		<div>Get sequence of points using getPoint( t ) </div>
 
-		<h3>[method:todo getSpacedPoints]( divisions )</h3>
+		<h3>[method:Array getSpacedPoints]( divisions )</h3>
 		<div>Get sequence of equi-spaced points using getPointAt( u )</div>
 
-		<h3>[method:todo getLength]()</h3>
+		<h3>[method:Float getLength]()</h3>
 		<div>Get total curve arc length</div>
 
-		<h3>[method:todo getLengths]( divisions )</h3>
+		<h3>[method:Array getLengths]( divisions )</h3>
 		<div>Get list of cumulative segment lengths</div>
 
-		<h3>[method:todo updateArcLengths]()</h3>
+		<h3>[method:null updateArcLengths]()</h3>
 		<div>Update the cumlative segment distance cache</div>
 
-		<h3>[method:todo getUtoTmapping]( u, distance )</h3>
+		<h3>[method:Float getUtoTmapping]( u, distance )</h3>
 		<div>Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant</div>
 
-		<h3>[method:todo getTangent]( t )</h3>
+		<h3>[method:Vector getTangent]( t )</h3>
 		<div>Returns a unit vector tangent at t. If the subclassed curve do not implement its tangent derivation, 2 points a small delta apart will be used to find its gradient which seems to give a reasonable approximation</div>
 
-		<h3>[method:todo getTangentAt]( u )</h3>
+		<h3>[method:Vector getTangentAt]( u )</h3>
 		<div>Returns tangent at equidistant point u on the curve</div>
 
 

+ 13 - 10
docs/api/extras/curves/ClosedSplineCurve3.html

@@ -17,24 +17,27 @@
 
 <code>
 //Create a closed wavey loop
-var curve = new THREE.ClosedSplineCurve3([
-	new THREE.Vector3(-10, 0, 10),
-	new THREE.Vector3(-5,  5, 5),
-	new THREE.Vector3( 0,  0, 0),
-	new THREE.Vector3( 5, -5, 5),
-	new THREE.Vector3(10,  0, 10)
-]);
+var curve = new THREE.ClosedSplineCurve3( [
+	new THREE.Vector3( -10, 0, 10 ),
+	new THREE.Vector3( -5, 5, 5 ),
+	new THREE.Vector3( 0, 0, 0 ),
+	new THREE.Vector3( 5, -5, 5 ),
+	new THREE.Vector3( 10, 0, 10 )
+] );
 
 var geometry = new THREE.Geometry();
-geometry.vertices = curve.getPoints(50);
+geometry.vertices = curve.getPoints( 50 );
 
-var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
+var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
 </code>
 
+		<h3>[example:webgl_geometry_extrude_splines geometry / extrude / splines] (choose SampleClosedSpline)</h3>
+			
+
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:Array points])</h3>
+		<h3>[name]( [page:Array points] )</h3>
 		<div>points – An array of [page:Vector3] points</div>
 
 

+ 34 - 15
docs/api/extras/curves/CubicBezierCurve.html

@@ -11,35 +11,54 @@
 		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">
+			Create a smooth 2d <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#mediaviewer/File:Bezier_curve.svg" target="_blank">cubic bezier curve</a>.
+		</div>
 
 		<h2>Example</h2>
 
-		<code>todo</code>
+<code>
+var curve = new THREE.CubicBezierCurve(
+	new THREE.Vector3( -10, 0, 0 ),
+	new THREE.Vector3( -5, 15, 0 ),
+	new THREE.Vector3( 20, 15, 0 ),
+	new THREE.Vector3( 10, 0, 0 )
+);
 
-		<h2>Constructor</h2>
+var path = new THREE.Path( curve.getPoints( 50 ) );
 
+var geometry = path.createPointsGeometry( 50 );
+var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
 
-		<h3>todo</h3>
-		<div></div>
+// Create the final Object3d to add to the scene
+var curveObject = new THREE.Line( geometry, material );
+</code>
 
+		<h2>Constructor</h2>
 
-		<h2>Properties</h2>
 
-		<h3>todo</h3>
+		<h3>[name] ( [page:Vector2 v0], [page:Vector2 v1], [page:Vector2 v2], [page:Vector2 v3] )</h3>
 		<div>
-		todo
-		</div> 
+			[page:Vector2 v0] – The starting point<br/>
+			[page:Vector2 v1] – The first control point<br/>
+			[page:Vector2 v2] – The second control point<br/>
+			[page:Vector2 v3] – The ending point<br/>
+		</div>
+
+		<h2>Properties</h2>
+		
+		<h3>[property:Vector2 v0]</h3>
+		
+		<h3>[property:Vector2 v1]</h3>
+		
+		<h3>[property:Vector2 v2]</h3>
+		
+		<h3>[property:Vector2 v3]</h3>
 
 
 		<h2>Methods</h2>
 		
-
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
+		<h3>See [page:Curve] for inherited methods</h3>
 		
 		<h2>Source</h2>
 

+ 35 - 16
docs/api/extras/curves/CubicBezierCurve3.html

@@ -11,36 +11,55 @@
 		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">
+			Create a smooth 3d <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#mediaviewer/File:Bezier_curve.svg" target="_blank">cubic bezier curve</a>.
+		</div>
 
 		<h2>Example</h2>
 
-		<code>todo</code>
+<code>
+var curve = new THREE.CubicBezierCurve3(
+	new THREE.Vector3( -10, 0, 0 ),
+	new THREE.Vector3( -5, 15, 0 ),
+	new THREE.Vector3( 20, 15, 0 ),
+	new THREE.Vector3( 10, 0, 0 )
+);
 
-		<h2>Constructor</h2>
+var geometry = new THREE.Geometry();
+geometry.vertices = curve.getPoints( 50 );
 
+var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
 
-		<h3>todo</h3>
-		<div></div>
+// Create the final Object3d to add to the scene
+var curveObject = new THREE.Line( geometry, material );
 
+</code>
 
-		<h2>Properties</h2>
+		<h2>Constructor</h2>
 
-		<h3>todo</h3>
-		<div>
-		todo
-		</div> 
 
+		<h3>[name]( [page:Vector3 v0], [page:Vector3 v1], [page:Vector3 v2], [page:Vector3 v3] )</h3>
+		<div>
+			[page:Vector3 v0] – The starting point<br/>
+			[page:Vector3 v1] – The first control point<br/>
+			[page:Vector3 v2] – The second control point<br/>
+			[page:Vector3 v3] – The ending point<br/>
+		</div>
 
-		<h2>Methods</h2>
+		<h2>Properties</h2>
+		
+		<h3>[property:Vector3 v0]</h3>
+		
+		<h3>[property:Vector3 v1]</h3>
+		
+		<h3>[property:Vector3 v2]</h3>
+		
+		<h3>[property:Vector3 v3]</h3>
 		
 
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
+		<h2>Methods</h2>
 		
+		<h3>See [page:Curve] for inherited methods</h3>		
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 4 - 4
docs/api/extras/curves/EllipseCurve.html

@@ -23,18 +23,18 @@ var curve = new THREE.EllipseCurve(
 	false             // aClockwise
 );
 
-var path = new THREE.Path( curve.getPoints(50) );
+var path = new THREE.Path( curve.getPoints( 50 ) );
 var geometry = path.createPointsGeometry( 50 );
-var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
+var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
 
-//Create the final Object3d to add to the scene
+// Create the final Object3d to add to the scene
 var ellipse = new THREE.Line( geometry, material );
 </code>
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:Float aX], [page:Float aY], [page:Float xRadius], [page:Float yRadius], [page:Radians aStartAngle], [page:Radians aEndAngle], [page:Boolean aClockwise])</h3>
+		<h3>[name]( [page:Float aX], [page:Float aY], [page:Float xRadius], [page:Float yRadius], [page:Radians aStartAngle], [page:Radians aEndAngle], [page:Boolean aClockwise] )</h3>
 		<div>
 			aX – The X center of the ellipse<br/>
 			aY – The Y center of the ellipse<br/>

+ 1 - 1
docs/api/extras/curves/LineCurve.html

@@ -16,7 +16,7 @@
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:Vector2 v1], [page:Vector2 v2])</h3>
+		<h3>[name]( [page:Vector2 v1], [page:Vector2 v2] )</h3>
 		<div>
 			v1 – The start point<br/>
 			v2 - The end point

+ 1 - 1
docs/api/extras/curves/LineCurve3.html

@@ -16,7 +16,7 @@
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:Vector3 v1], [page:Vector3 v2])</h3>
+		<h3>[name]( [page:Vector3 v1], [page:Vector3 v2] )</h3>
 		<div>
 			v1 – The start point<br/>
 			v2 - The end point

+ 32 - 14
docs/api/extras/curves/QuadraticBezierCurve.html

@@ -11,36 +11,54 @@
 		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">
+			Create a smooth 2d <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#mediaviewer/File:B%C3%A9zier_2_big.gif" target="_blank">quadratic bezier curve</a>.
+		</div>
 
 		<h2>Example</h2>
 
-		<code>todo</code>
+<code>
+var curve = new THREE.QuadraticBezierCurve(
+	new THREE.Vector3( -10, 0, 0 ),
+	new THREE.Vector3( 20, 15, 0 ),
+	new THREE.Vector3( 10, 0, 0 )
+);
+
+var path = new THREE.Path( curve.getPoints( 50 ) );
+
+var geometry = path.createPointsGeometry( 50 );
+var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
+
+//Create the final Object3d to add to the scene
+var curveObject = new THREE.Line( geometry, material );
+</code>
 
 		<h2>Constructor</h2>
 
 
-		<h3>todo</h3>
-		<div></div>
+		<h3>[name]( [page:Vector2 v0], [page:Vector2 v1], [page:Vector2 v2] )</h3>
+		<div>
+			[page:Vector2 v0] – The starting point<br/>
+			[page:Vector2 v1] – The middle control point<br/>
+			[page:Vector2 v2] – The ending point<br/>
+		</div>
 
 
 		<h2>Properties</h2>
 
-		<h3>todo</h3>
-		<div>
-		todo
-		</div> 
+		
+		<h3>[property:Vector2 v0]</h3>
+		
+		<h3>[property:Vector2 v1]</h3>
+		
+		<h3>[property:Vector2 v2]</h3>
 
 
 		<h2>Methods</h2>
 		
 
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
-		
+		<h3>See [page:Curve] for inherited methods</h3>		
+
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 32 - 14
docs/api/extras/curves/QuadraticBezierCurve3.html

@@ -11,35 +11,53 @@
 		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">
+			Create a smooth 3d <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#mediaviewer/File:B%C3%A9zier_2_big.gif" target="_blank">quadratic bezier curve</a>.
+		</div>
 
 		<h2>Example</h2>
 
-		<code>todo</code>
+<code>
+var curve = new THREE.QuadraticBezierCurve3(
+	new THREE.Vector3( -10, 0, 0 ),
+	new THREE.Vector3( 20, 15, 0 ),
+	new THREE.Vector3( 10, 0, 0 )
+);
 
-		<h2>Constructor</h2>
+var geometry = new THREE.Geometry();
+geometry.vertices = curve.getPoints( 50 );
 
+var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
 
-		<h3>todo</h3>
-		<div></div>
+// Create the final Object3d to add to the scene
+var curveObject = new THREE.Line( geometry, material );
+</code>
 
+		<h2>Constructor</h2>
 
-		<h2>Properties</h2>
 
-		<h3>todo</h3>
+		<h3>[name]( [page:Vector3 v0], [page:Vector3 v1], [page:Vector3 v2] )</h3>
 		<div>
-		todo
-		</div> 
+			[page:Vector3 v0] – The starting point<br/>
+			[page:Vector3 v1] – The middle control point<br/>
+			[page:Vector3 v2] – The ending point<br/>
+		</div>
+
+
+
+		<h2>Properties</h2>
+		
+		<h3>[property:Vector3 v0]</h3>
+		
+		<h3>[property:Vector3 v1]</h3>
+		
+		<h3>[property:Vector3 v2]</h3>
 
 
 		<h2>Methods</h2>
 		
 
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
+		<h3>See [page:Curve] for inherited methods</h3>		
 		
 		<h2>Source</h2>
 

+ 13 - 12
docs/api/extras/curves/SplineCurve.html

@@ -16,27 +16,28 @@
 		<h2>Example</h2>
 
 <code>
-//Create a sine-like wave
-var curve = new THREE.SplineCurve([
-	new THREE.Vector2(-10, 0),
-	new THREE.Vector2(-5, 5),
-	new THREE.Vector2( 0, 0),
-	new THREE.Vector2( 5, -5),
-	new THREE.Vector2(10, 0)
-]);
+// Create a sine-like wave
+var curve = new THREE.SplineCurve( [
+	new THREE.Vector2( -10, 0 ),
+	new THREE.Vector2( -5, 5 ),
+	new THREE.Vector2( 0, 0 ),
+	new THREE.Vector2( 5, -5 ),
+	new THREE.Vector2( 10, 0 )
+] );
 
-var path = new THREE.Path( curve.getPoints(50) );
+var path = new THREE.Path( curve.getPoints( 50 ) );
 
 var geometry = path.createPointsGeometry( 50 );
-var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
+var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
 
-var object3d = new THREE.Line( geometry, material );
+// Create the final Object3d to add to the scene
+var splineObject = new THREE.Line( geometry, material );
 </code>
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:Array points])</h3>
+		<h3>[name]( [page:Array points] )</h3>
 		<div>points – An array of [page:Vector2] points</div>
 
 

+ 16 - 10
docs/api/extras/curves/SplineCurve3.html

@@ -17,24 +17,30 @@
 
 <code>
 //Create a closed bent a sine-like wave
-var curve = new THREE.SplineCurve3([
-	new THREE.Vector3(-10, 0, 10),
-	new THREE.Vector3(-5,  5, 5),
-	new THREE.Vector3( 0,  0, 0),
-	new THREE.Vector3( 5, -5, 5),
-	new THREE.Vector3(10,  0, 10)
-]);
+var curve = new THREE.SplineCurve3( [
+	new THREE.Vector3( -10, 0, 10 ),
+	new THREE.Vector3( -5, 5, 5 ),
+	new THREE.Vector3( 0, 0, 0 ),
+	new THREE.Vector3( 5, -5, 5 ),
+	new THREE.Vector3( 10, 0, 10 )
+] );
 
 var geometry = new THREE.Geometry();
-geometry.vertices = curve.getPoints(50);
+geometry.vertices = curve.getPoints( 50 );
 
-var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
+var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
+
+//Create the final Object3d to add to the scene
+var splineObject = new THREE.Line( geometry, material );
 </code>
 
+		<h3>[example:webgl_geometry_extrude_splines geometry / extrude / splines ] (choose PipeSpline)</h3>
+
+
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:Array points])</h3>
+		<h3>[name]( [page:Array points] )</h3>
 		<div>points – An array of [page:Vector3] points</div>
 
 

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

@@ -48,7 +48,7 @@
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo addShapeList]([page:Array shapes], [page:Object options])</h3>
+		<h3>[method:null addShapeList]([page:Array shapes], [page:Object options])</h3>
 		<div>
 			shapes — An Array of shapes to add. <br />
 			options — Object that can contain the following parameters.
@@ -69,7 +69,7 @@
 	</div>
 		<div>Adds the shapes to the list to extrude.</div>
 
-		<h3>[method:todo addShape]([page:Shape shape], [page:Object options])</h3>
+		<h3>[method:null addShape]([page:Shape shape], [page:Object options])</h3>
 		<div>
 			shape — A shape to add. <br />
 			options — Object that can contain the following parameters.

+ 1 - 1
docs/api/extras/geometries/ShapeGeometry.html

@@ -59,7 +59,7 @@
 		Adds a list of shapes to the geometry.
 		</div>
 
-		<h3>[method:todo addShape]([page:Shape shape], [page:Object options])</h3>
+		<h3>[method:null addShape]([page:Shape shape], [page:Object options])</h3>
 		<div>
 		shape — [page:Shape] <br />
 		options — See options in constructor

+ 3 - 3
docs/api/extras/helpers/ArrowHelper.html

@@ -62,7 +62,7 @@
 
 
 
-		<h3>[method:todo setColor]([page:Number hex])</h3>
+		<h3>[method:null setColor]([page:Number hex])</h3>
 		<div>
 		hex -- The hexadicmal value of the color
 		</div>
@@ -70,7 +70,7 @@
 		Sets the color of the arrowHelper.
 		</div>
 
-		<h3>[method:todo setLength]([page:Number length], [page:Number headLength], [page:Number headWidth])</h3>
+		<h3>[method:null setLength]([page:Number length], [page:Number headLength], [page:Number headWidth])</h3>
 		<div>
 		length -- The desired length<br />
 		headLength -- The length of the head of the arrow<br />
@@ -80,7 +80,7 @@
 		Sets the length of the arrowhelper.
 		</div>
 
-		<h3>[method:todo setDirection]([page:vector3 dir])</h3>
+		<h3>[method:null setDirection]([page:vector3 dir])</h3>
 		<div>
 		dir -- The desired direction in euler format.
 		</div>

+ 1 - 1
docs/api/extras/helpers/AxisHelper.html

@@ -26,7 +26,7 @@
 
 		<h3>[name]([page:Number size])</h3>
 		<div>
-		size -- Define the size of the of the line representing the axes.
+		size -- Define the size of the line representing the axes.
 		</div>
 		<div>
 		Creates an axisHelper with lines of length size.

+ 1 - 1
docs/api/extras/helpers/BoundingBoxHelper.html

@@ -58,7 +58,7 @@
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo update]()</h3>
+		<h3>[method:null update]()</h3>
 		<div>
 		Updates the BoundingBoxHelper based on the object property.
 		</div>

+ 1 - 1
docs/api/extras/helpers/GridHelper.html

@@ -37,7 +37,7 @@
 		
 		<h2>Methods</h2>
 
-		<h3>[method:todo setColors]([page:number colorCenterLine], [page:Number colorGrid])</h3>
+		<h3>[method:null 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.

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

@@ -26,7 +26,7 @@
 		<h2>Methods</h2>
 
 
-		<h3>[method:todo render]([page:Function renderCallback])</h3>
+		<h3>[method:null render]([page:Function renderCallback])</h3>
 		<div>
 		renderCallback -- A function to render the generated object.
 		</div>

+ 2 - 2
docs/api/lights/SpotLight.html

@@ -42,8 +42,8 @@ scene.add( spotLight );</code>
 		<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 <br />
-		angle -- todo <br />
+		distance -- Maximum distance from origin where light will shine whose intensity is attenuated linearly based on distance from origin. <br />
+		angle -- Maximum angle of light dispersion from its direction whose upper bound is Math.PI/2.  <br />
 		exponent -- todo
 		</div>
 		<div>

+ 84 - 0
docs/api/loaders/BabylonLoader.html

@@ -0,0 +1,84 @@
+<!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 loader for loading a <em>.babylon</em> resource.</div>
+
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( [page:LoadingManager manager] )</h3>
+		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		</div>
+		<div>
+		Creates a new [name].
+		</div>
+
+		<h2>Properties</h2>
+
+
+		<h2>Methods</h2>
+
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
+		<div>
+		[page:String url] — required<br />
+		[page:function onLoad] — Will be called when load completes. The argument will be the loaded [page:Object3D].<br />
+		[page:function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		[page:function onError] — Will be called when load errors.<br />
+		</div>
+		<div>
+		Begin loading from url and call onLoad with the parsed response content.
+		</div>
+
+		<h3>[method:Object3D parse]( [page:Object json] )</h3>
+		<div>
+		[page:Object json] — The <em>JSON</em> structure to parse.
+		</div>
+		<div>
+		Parse a <em>JSON</em> structure and return an [page:Object3D object] or a [page:Scene scene].<br />
+		Found objects are converted to [page:Mesh] with a [page:BufferGeometry] and a default [page:MeshPhongMaterial].<br />
+		Lights are parsed accordingly.
+		</div>
+
+		<h2>Example</h2>
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.BabylonLoader();
+
+		// load a Babylon resource
+		loader.load(
+			// resource URL
+			'models/babylon/skull.babylon',
+			// Function when resource is loaded
+			function ( object ) {
+				scene.add( object );
+			},
+			// Function called when download progresses
+			function ( xhr ) {
+				console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
+			},
+			// Function called when download errors
+			function ( xhr ) {
+				console.log( 'An error happened' );
+			}
+		);
+		</code>
+
+		[example:webgl_loader_babylon]
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/BabylonLoader.js examples/js/loaders/BabylonLoader.js]
+	</body>
+</html>

+ 53 - 17
docs/api/loaders/BufferGeometryLoader.html

@@ -9,36 +9,72 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">A loader for loading a [page:BufferGeometry].</div>
 
-		<h2>Example</h2>
-
-		<code>todo</code>
 
 		<h2>Constructor</h2>
 
-
-		<h3>todo</h3>
-		<div></div>
+		<h3>[name]( [page:LoadingManager manager] )</h3>
+		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		</div>
+		<div>
+		Creates a new [name].
+		</div>
 
 
 		<h2>Properties</h2>
 
-		<h3>todo</h3>
-		<div>
-		todo
-		</div> 
-
 
 		<h2>Methods</h2>
-		
 
-		<h3>todo</h3>
-		<div>todo</div>
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
+		<div>
+		[page:String url] — required<br />
+		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:BufferGeometry].<br />
+		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		[page:Function onError] — Will be called when load errors.<br />
+		</div>
+		<div>
+		Begin loading from url and call onLoad with the parsed response content.
+		</div>
+
+		<h3>[method:BufferGeometry parse]( [page:Object json] )</h3>
 		<div>
-		todo
+		[page:Object json] — The <em>JSON</em> structure to parse.
 		</div>
-		
+		<div>
+		Parse a <em>JSON</em> structure and return a [page:BufferGeometry].
+		</div>
+
+
+		<h2>Example</h2>
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.BufferGeometryLoader();
+
+		// load a resource
+		loader.load(
+			// resource URL
+			'models/json/pressure.json',
+			// Function when resource is loaded
+			function ( geometry ) {
+				var material = new THREE.MeshLambertMaterial( { color: 0xF5F5F5 } );
+				var object = new THREE.Mesh( geometry, material );
+				scene.add( object );
+			},
+			// Function called when download progresses
+			function ( xhr ) {
+				console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
+			},
+			// Function called when download errors
+			function ( xhr ) {
+				console.log( 'An error happened' );
+			}
+		);
+		</code>
+
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 37 - 15
docs/api/loaders/Cache.html

@@ -9,36 +9,58 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">A simple caching classe, used internaly by [page:XHRLoader].</div>
 
-		<h2>Example</h2>
-
-		<code>todo</code>
 
 		<h2>Constructor</h2>
 
-
-		<h3>todo</h3>
-		<div></div>
+		<h3>[name]()</h3>
+		<div>
+		Creates a new [name].
+		</div>
 
 
 		<h2>Properties</h2>
 
-		<h3>todo</h3>
+		<h3>[property:Object files]</h3>
 		<div>
-		todo
-		</div> 
+		An [page:Object object] that hold cached values.
+		</div>
 
 
 		<h2>Methods</h2>
-		
 
-		<h3>todo</h3>
-		<div>todo</div>
+		<h3>[method:null add]( [page:String key], value )</h3>
+		<div>
+		[page:String key] — required. A string key <br />
+		[page:Object] value — <br />
+		</div>
+		<div>
+		Adds a cache entry with that key to hold the value. If this key already holds a value, it is overwritten.
+		</div>
+
+		<h3>[method:null get]( [page:String key] )</h3>
+		<div>
+		[page:String key] — required. A string key <br />
+		</div>
+		<div>
+		Get the value of key. If the key does not exist the null value is returned.
+		</div>
+
+		<h3>[method:null remove]( [page:String key] )</h3>
+		<div>
+		[page:String key] — required. A string key <br />
+		</div>
 		<div>
-		todo
+		Remove the cached value associated with the key.
 		</div>
-		
+
+		<h3>[method:null clear]()</h3>
+		<div>
+		Remove all values from the cache.
+		</div>
+
+
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 114 - 0
docs/api/loaders/ColladaLoader.html

@@ -0,0 +1,114 @@
+<!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 loader for loading an <em>.babylon</em> resource.</div>
+
+
+		<h2>Constructor</h2>
+
+		<h3>[name]()</h3>
+		<div>
+		Creates a new [name].
+		</div>
+
+
+		<h2>Properties</h2>
+
+		<h3>[property:Array options]</h3>
+		<div>
+		&nbsp;.[page:Boolean centerGeometry] — Force [page:Geometry] to always be centered at the local origin of the containing [page: Mesh].<br />
+		&nbsp;.[page:Boolean convertUpAxis] — Axis conversion is done for geometries, animations, and controllers.<br />
+		&nbsp;.[page:Boolean subdivideFaces] — Force subdivision into multiple [page: Face3].<br />
+		&nbsp;.[page:String upAxis] — X, Y or Z<br />
+		&nbsp;.[page:Boolean defaultEnvMap] — Cubemap to use for reflective or refractive materials.<br />
+		</div>
+
+		<h3>[property:Object geometries]</h3>
+		<div>
+		Parsed <em>.dae</em> geometries.
+		</div>
+
+
+		<h2>Methods</h2>
+
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress] )</h3>
+		<div>
+		[page:String url] — required<br />
+		[page:function onLoad] — Will be called when load completes. The argument will be an [page:Object object] containing loaded resources.<br />
+		[page:function onProgress] — Will be called while load progresses. The argument will be an object containing .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		</div>
+		<div>
+		Begin loading from url and call onLoad with the parsed response content.
+		</div>
+
+		<h3>[method:Object parse]( [page:Document doc], [page:Function callBack], [page:String url] )</h3>
+		<div>
+		[page:Document doc] — The <em>XML</em> document to parse.<br />
+		[page:Function callBack] — Will be called when parse completes.<br />
+		[page:String url] — The base url from which to find subsequent resources.<br />
+		</div>
+		<div>
+		Parse an <em>XML Document</em> and return an [page:Object object] that contain loaded parts: .[page:Scene scene], .[page:Array morphs], .[page:Array skins], .[page:Array animations], .[page:Object dae]
+		</div>
+
+		<h3>[method:null setPreferredShading]( [page:Integer shading] )</h3>
+		<div>
+		[page:Integer shading] — required
+		</div>
+		<div>
+		Set the .[page:Integer shading] property on the resource's materials.<br />
+		Options are [page:Materials THREE.SmoothShading], [page:Materials THREE.FlatShading], [page:Materials THREE.NoShading].
+		</div>
+
+		<h3>[method:null applySkin]( [page:Geometry geometry], [page:Object instanceCtrl], [page:Integer frame] )</h3>
+		<div>
+		[page:Geometry geometry] — required<br />
+		[page:Object instanceCtrl] — required. A collada <em>skinController</em><br />
+		[page:Integer frame] — optionnal. Default is 40<br />
+		</div>
+		<div>
+		Apply a skin (vertices, animation, bones) from a <em>collada skin controller</em>, on the given [page:Geometry].
+		</div>
+
+
+		<h2>Example</h2>
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.ColladaLoader();
+
+		// load a Babylon resource
+		loader.load(
+			// resource URL
+			'models/collada/monster/monster.dae',
+			// Function when resource is loaded
+			function ( collada ) {
+				scene.add( collada.scene );
+			},
+			// Function called when download progresses
+			function ( xhr ) {
+				console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
+			}
+		);
+		</code>
+
+		[example:webgl_loader_collada]<br />
+		[example:webgl_loader_collada_keyframe]<br />
+		[example:webgl_loader_collada_skinning]<br />
+		[example:webgl_loader_collada_kinematics]
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/OBJLoader.js examples/js/loaders/BabylonLoader.js]
+	</body>
+</html>

+ 53 - 20
docs/api/loaders/ImageLoader.html

@@ -9,46 +9,79 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">A loader for loading an [page:Image image].</div>
+		<div class="desc">A loader for loading an [page:Image].</div>
 
-		<h2>Constructor</h2>
 
+		<h2>Constructor</h2>
 
-		<h3>[name]([page:LoadingManager manager])</h3>
-        <div>
-        manager -- The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
-        </div>
+		<h3>[name]( [page:LoadingManager manager] )</h3>
+		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		</div>
 		<div>
 		Creates a new [name].
 		</div>
-		
+
 		<h2>Properties</h2>
 
-		<h3>[property:string crossOrigin]</h3>
+		<h3>[property:String crossOrigin]</h3>
 		<div>
 		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
-		</div> 
+		</div>
 
 		<h2>Methods</h2>
 
-		<h3>[method:Image load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</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
+		[page:String url] — required<br />
+		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded Imageloader.<br />
+		[page:Function onProgress] — Will be called while load progresses. The argument will be the progress event.<br />
+		[page:Function onError] — Will be called when load errors.<br />
 		</div>
 		<div>
-        Begin loading from url and return the [page:Image image] object that will contain the data.
-        </div>
+		Begin loading from url and return the [page:Image image] object that will contain the data.
+		</div>
 
-        <h3>[method:todo setCrossOrigin]([page:String value])</h3>
+		<h3>[method:null setCrossOrigin]( [page:String value] )</h3>
 		<div>
-        value -- The crossOrigin string.
+		[page:String value] — The crossOrigin string.
 		</div>
 		<div>
-        The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
-        </div>
+		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
+		</div>
+
+		<h2>Example</h2>
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.ImageLoader();
+
+		// load a image resource
+		loader.load(
+			// resource URL
+			'textures/skyboxsun25degtest.png',
+			// Function when resource is loaded
+			function ( image ) {
+				// do something with it
+
+				// like drawing a part of it on a canvas
+				var canvas = document.createElement( 'canvas' );
+				var context = canvas.getContext( '2d' );
+				context.drawImage( image, 100, 100 );
+			},
+			// Function called when download progresses
+			function ( xhr ) {
+				console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
+			},
+			// Function called when download errors
+			function ( xhr ) {
+				console.log( 'An error happened' );
+			}
+		);
+		</code>
+
+		[example:webgl_shaders_ocean]
+
 
 		<h2>Source</h2>
 

+ 117 - 23
docs/api/loaders/JSONLoader.html

@@ -15,54 +15,148 @@
 
 		<h2>Constructor</h2>
 
-
-		<h3>[name]([page:Boolean showStatus])</h3>
+		<h3>[name]( [page:Boolean showStatus] )</h3>
 		<div>
-		showStatus -- todo
+		[page:Boolean showStatus] — Show the status of loading div.
 		</div>
 		<div>
-		todo
+		Creates a new [name].
 		</div>
-		
-		<h2>Properties</h2>
 
 
+		<h2>Properties</h2>
+
 		<h3>[property:boolean withCredentials]</h3>
 		<div>
-		todo
-		</div> 
+		If true, the ajax request will use cookies.
+		</div>
+
+
+		<h2>Properties inherited from [page:Loader]</h2>
+
+		<h3>[property:Boolean showStatus]</h3>
+		<div>If true, show loading status in the statusDomElement.</div>
+
+		<h3>[property:DOMElement statusDomElement]</h3>
+		<div>This is the recipient of status messages.</div>
+
+		<h3>[property:Function onLoadStart]</h3>
+		<div>Will be called when load starts.</div>
+		<div>The default is a function with empty body.</div>
+
+		<!--
+		<h3>[property:Function onLoadProgress]</h3>
+		<div>Will be called while load progresses.</div>
+		<div>The default is a function with empty body.</div>
+		-->
+
+		<h3>[property:Function onLoadComplete]</h3>
+		<div>Will be called when load completes.</div>
+		<div>The default is a function with empty body.</div>
+
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo load]( [page:String url], [page:Function callback], [page:String texturePath] )</h3>
+		<h3>[method:null load]( [page:String url], [page:Function callback], [page:String texturePath] )</h3>
+		<div>
+		[page:String url] — required<br />
+		[page:Function callback] — required. Will be called when load completes. The arguments will be the loaded [page:Object3D] and the loaded [page:Array materials].<br />
+		[page:String texturePath] — optional. If not specified, textures will be assumed to be in the same folder as the Javascript model file.
+		</div>
+
+		<h3>[method:null loadAjaxJSON]([page:JSONLoader context], [page:String url], [page:Function callback], [page:String texturePath], [page:Function callbackProgress])</h3>
+		<div>
+		[page:JSONLoader context] — The [page:JSONLoader] instance<br />
+		[page:String url] — required<br />
+		[page:Function callback] — required. This function will be called with the loaded model as an instance of [page:Geometry geometry] when the load is completed.<br />
+		[page:String texturePath] — Base path for textures.<br />
+		[page:Function callbackProgress] — Will be called while load progresses. The argument will be an [page:Object] containing two attributes: .[page:Integer total] and .[page:Integer loaded] bytes.
+		</div>
+		<div>
+		Begin loading from url and call <em>callback</em> with the parsed response content.
+		</div>
+
+		<h3>[method:Object3D parse]( [page:Object json], [page:String texturePath] )</h3>
 		<div>
-		url — required<br />
-		callback — required. This function will be called with the loaded model as an instance of [page:Geometry geometry] when the load is completed.<br />
-		texturePath — optional. If not specified, textures will be assumed to be in the same folder as the Javascript model file.
+		[page:String json] — JSON object to parse.<br />
+		[page:String texturePath] — Base path for textures.
+		</div>
+		<div>
+		Parse a <em>JSON</em> structure and return an [page:Object] containing the parsed .[page:Geometry] and .[page:Array materials].
 		</div>
 
+		<h2>Methods inherited from [page:Loader]</h2>
 
-		<h3>[method:todo parse]([page:todo json], [page:todo texturePath])</h3>
+		<h3>[method:Boolean needsTangents]( [page:Array materials] )</h3>
 		<div>
-		json -- todo <br />
-		texturePath -- todo
+		[page:Array materials] — an array of [page:Material]
 		</div>
 		<div>
-		todo
+		Checks if the loaded object needs tangents based on its materials.
 		</div>
 
-		<h3>[method:todo loadAjaxJSON]([page:todo context], [page:todo url], [page:todo callback], [page:todo texturePath], [page:todo callbackProgress])</h3>
+		<h3>[method:null updateProgress]( [page:object progress] )</h3>
 		<div>
-		context -- todo <br />
-		url -- todo <br />
-		callback -- todo <br />
-		texturePath -- todo <br />
-		callbackProgress -- todo
+		[page:Object 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>[method:Material createMaterial]( [page:object m], [page:string texturePath] )</h3>
+		<div>
+		[page:Object m] — The parameters to create the material. <br />
+		[page:String texturePath] — The base path of the textures.
+		</div>
+		<div>
+		Creates the Material based on the parameters m.
+		</div>
+
+		<h3>[method:Array initMaterials]( [page:Array materials], [page:string texturePath] )</h3>
+		<div>
+		[page:Array materials] — an array of parameters to create materials. <br />
+		[page:String texturePath] —  The base path of the textures.
+		</div>
+		<div>
+		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>[method:String extractUrlBase]( [page:string url] )</h3>
+		<div>
+		[page:String url] —  The url to extract the base url from.
+		</div>
+		<div>
+		Extract the base from the URL.
+		</div>
+
+		<h3>[method:DOMElement addStatusElement]()</h3>
+		<div>
+		Add a DOM element to indicate the progress and return the DOMElement
+		</div>
+
+
+		<h2>Example</h2>
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.JSONLoader();
+
+		// load a resource
+		loader.load(
+			// resource URL
+			'models/animated/monster/monster.js',
+			// Function when resource is loaded
+			function ( geometry, materials ) {
+				var material = new THREE.MeshFaceMaterial( materials );
+				var object = new THREE.Mesh( geometry, material );
+				scene.add( object );
+			}
+		);
+		</code>
+
+		[example:webgl_loader_json_blender]
+
+
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

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

@@ -15,9 +15,9 @@
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:Boolean showStatus])</h3>
+		<h3>[name]( [page:Boolean showStatus] )</h3>
 		<div>
-		showStatus -- Show the status of loading div.
+		[page:Boolean showStatus] — Show the status of loading div.
 		</div>
 		<div>
 		Creates a new [name]. This should be called as base class.
@@ -28,10 +28,10 @@
 
 		<h3>[property:Boolean showStatus]</h3>
 		<div>If true, show loading status in the statusDomElement.</div>
-		
+
 		<h3>[property:DOMElement statusDomElement]</h3>
 		<div>This is the recipient of status messages.</div>
-		
+
 		<h3>[property:Function onLoadStart]</h3>
 		<div>Will be called when load starts.</div>
 		<div>The default is a function with empty body.</div>
@@ -39,63 +39,63 @@
 		<h3>[property:Function onLoadProgress]</h3>
 		<div>Will be called while load progresses.</div>
 		<div>The default is a function with empty body.</div>
-		
+
 		<h3>[property:Function onLoadComplete]</h3>
 		<div>Will be called when load completes.</div>
 		<div>The default is a function with empty body.</div>
-		
+
 		<h3>[property:string crossOrigin]</h3>
 		<div>
 		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
-		</div> 
+		</div>
 
 		<h2>Methods</h2>
 
-		<h3>[method:Boolean needsTangents]([page:Array materials])</h3>
+		<h3>[method:Boolean needsTangents]( [page:Array materials] )</h3>
 		<div>
-		materials -- an array of [page:Material]
+		[page:Array materials] — an array of [page:Material]
 		</div>
 		<div>
 		Checks if the loaded object needs tangents based on its materials.
 		</div>
 
-		<h3>[method:todo updateProgress]([page:object progress])</h3>
+		<h3>[method:null updateProgress]( [page:object progress] )</h3>
 		<div>
-		progress -- an object containing loaded(contains the amount of bytes loaded) and optionally total (containing the total amount of bytes).
+		[page:Object progress] — an object containing loaded(contains the amount of bytes loaded) and optionally total (containing the total amount of bytes).
 		</div>
 		<div>
 		Updates the DOM object with the progress made.
 		</div>
 
-		<h3>[method:Material createMaterial]([page:object m], [page:string texturePath])</h3>
+		<h3>[method:Material createMaterial]( [page:object m], [page:string texturePath] )</h3>
 		<div>
-		m -- The parameters to create the material. <br />
-		texturePath -- The base path of the textures.
+		[page:Object m] — The parameters to create the material. <br />
+		[page:String texturePath] — The base path of the textures.
 		</div>
 		<div>
 		Creates the Material based on the parameters m.
 		</div>
 
-		<h3>[method:Array initMaterials]([page:Array materials], [page:string texturePath])</h3>
+		<h3>[method:Array initMaterials]( [page:Array materials], [page:string texturePath] )</h3>
 		<div>
-		materials -- an array of parameters to create materials. <br />
-		texturePath --  The base path of the textures.
+		[page:Array materials] — an array of parameters to create materials. <br />
+		[page:String texturePath] —  The base path of the textures.
 		</div>
 		<div>
 		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>[method:todo extractUrlBase]([page:string url])</h3>
+		<h3>[method:String extractUrlBase]( [page:string url] )</h3>
 		<div>
-		url --  The url to extract the base url from.
+		[page:String url] —  The url to extract the base url from.
 		</div>
 		<div>
-		Extract the base from the URL. 
+		Extract the base from the URL.
 		</div>
 
 		<h3>[method:DOMElement addStatusElement]()</h3>
 		<div>
-		Add a DOM element to indicate the progress and returns the DOMElement
+		Add a DOM element to indicate the progress and return the DOMElement
 		</div>
 
 

+ 34 - 27
docs/api/loaders/LoadingManager.html

@@ -11,71 +11,78 @@
 
 		<div class="desc">Handles and keeps track of loaded and pending data.</div>
 		<code>
-var manager = new THREE.LoadingManager();
-manager.onProgress = function ( item, loaded, total ) {
+		var manager = new THREE.LoadingManager();
+		manager.onProgress = function ( item, loaded, total ) {
 
-	console.log( item, loaded, total );
+			console.log( item, loaded, total );
 
-};
+		};
 
-var loader = new THREE.OBJLoader( manager );
-loader.load( 'file.obj', function ( object ) {
+		var loader = new THREE.OBJLoader( manager );
+		loader.load( 'file.obj', function ( object ) {
 
-	//
+			//
 
-} );
+		} );
 		</code>
 
+
 		<h2>Constructor</h2>
 
-		<h3>[name]([page:function onLoad], [page:function onProgress], [page:function onError])</h3>
+		<h3>[name]( [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[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.
+		[page:Function onLoad] — The function that needs to be called when all loaders are done.<br />
+		[page:Function onProgress] — The function that needs to be called when an item is complete.<br />
+		[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>[property:function onLoad]</h3>
+		<h3>[property:Function onLoad]</h3>
 		<div>
-		The function that needs to be called when all loaders are done. 
-		</div> 
+		The function that needs to be called when all loaders are done.
+		</div>
 
-		<h3>[property:function onProgress]</h3>
+		<h3>[property: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> 
+		</div>
 
-		<h3>[property:function onError]</h3>
+		<h3>[property:Function onError]</h3>
 		<div>
 		The function that needs to be called when an item errors.
-		</div> 
-		
-		
+		</div>
+
+
 		<h2>Methods</h2>
 
-		<h3>[method:todo itemStart]( [page:String url] )</h3>
+		<h3>[method:null itemStart]( [page:String url] )</h3>
 		<div>
-		url — the url to load
+		[page:String 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>[method:todo itemEnd]( [page:String url] )</h3>
+		<h3>[method:null itemEnd]( [page:String url] )</h3>
 		<div>
-		url — the url to load
+		[page:String url] — the loaded url
 		</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>Example</h2>
+
+		[example:webgl_loader_obj]
+
+
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 56 - 0
docs/api/loaders/MTLLoader.html

@@ -0,0 +1,56 @@
+<!D]OCTYPE 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 loader for loading an <em>.mtl</em> resource, used internaly by [page:OBJMTLLoader] and [page:UTF8Loader].</div>
+
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( [page:String baseUrl], [page:Object options], [page:String crossOrigin] )</h3>
+		<div>
+		[page:String baseUrl] — The base url from which to find subsequent resources.<br />
+		[page:Object options] — Options passed to the created material (side, wrap, normalizeRGB, ignoreZeroRGBs, invertTransparency).<br />
+		[page:String crossOrigin] — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.<br />
+		</div>
+		<div>
+		Creates a new [name].
+		</div>
+
+		<h2>Properties</h2>
+
+
+		<h2>Methods</h2>
+
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
+		<div>
+		[page:String url] — required<br />
+		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:MTLLoaderMaterialCreator MTLLoader.MaterialCreator] instance.<br />
+		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		[page:Function onError] — Will be called when load errors.<br />
+		</div>
+		<div>
+		Begin loading from url and return the loaded material.
+		</div>
+
+		<h3>[method:MTLLoaderMaterialCreator parse]( [page:String text] )</h3>
+		<div>
+		[page:String text] — The textual <em>mtl</em> structure to parse.
+		</div>
+		<div>
+		Parse a <em>mtl</em> text structure and return a [page:MTLLoaderMaterialCreator] instance.<br />
+		</div>
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/[name].js examples/js/loaders/[name].js]
+	</body>
+</html>

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

@@ -9,15 +9,15 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">A loader for loading an [page:Material material].</div>
+		<div class="desc">A loader for loading a [page:Material] in JSON format.</div>
 
-		<h2>Constructor</h2>
 
+		<h2>Constructor</h2>
 
-		<h3>[name]([page:LoadingManager manager])</h3>
-        <div>
-        manager -- The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
-        </div>
+		<h3>[name]( [page:LoadingManager manager] )</h3>
+		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		</div>
 		<div>
 		Creates a new [name].
 		</div>
@@ -25,32 +25,60 @@
 
 		<h2>Methods</h2>
 
-		<h3>[method:Image load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</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
+		[page:String url] — required<br />
+		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Material].<br />
+		[page:Function onProgress] — Will be called while load progresses. The argument will be the progress event.<br />
+		[page:Function onError] — Will be called when load errors.<br />
 		</div>
 		<div>
-        Begin loading from url and return the [page:Material material] object that will contain the data.
-        </div>
+		Begin loading from url and return the [page:Material] object that will contain the data.
+		</div>
 
-        <h3>[method:todo setCrossOrigin]([page:String value])</h3>
+		<h3>[method:null setCrossOrigin]( [page:String value] )</h3>
 		<div>
-        value -- The crossOrigin string.
+		[page:String value] — The crossOrigin string.
 		</div>
 		<div>
-        The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
-        </div>
+		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
+		</div>
 
-        <h3>[method:todo parse]([page:Object json])</h3>
-        <div>
-        json -- The json object containing the parameters of the Material.
+		<h3>[method:Material parse]( [page:Object json] )</h3>
+		<div>
+		[page:Object json] — The json object containing the parameters of the Material.
 		</div>
 		<div>
-        Creates a new [page:Material material] of the type 'json.type' and with parameters defined in the json object.
-        </div>
+		Parse a <em>JSON</em> structure and create a new [page:Material] of the type [page:String json.type] with parameters defined in the json object.
+		</div>
+
+
+		<h2>Example</h2>
+
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.MaterialLoader();
+
+		// load a resource
+		loader.load(
+			// resource URL
+			'path/to/material.json',
+			// Function when resource is loaded
+			function ( material ) {
+				object.material = material;
+			},
+			// Function called when download progresses
+			function ( xhr ) {
+				console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
+			},
+			// Function called when download errors
+			function ( xhr ) {
+				console.log( 'An error happened' );
+			}
+		);
+		</code>
+
 
 		<h2>Source</h2>
 

+ 75 - 0
docs/api/loaders/OBJLoader.html

@@ -0,0 +1,75 @@
+<!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 loader for loading an <em>.obj</em> resource.</div>
+
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( [page:LoadingManager manager] )</h3>
+		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		</div>
+		<div>
+		Creates a new [name].
+		</div>
+
+		<h2>Properties</h2>
+
+
+		<h2>Methods</h2>
+
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
+		<div>
+		[page:String url] — required<br />
+		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Object3D].<br />
+		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		[page:Function onError] — Will be called when load errors.<br />
+		</div>
+		<div>
+		Begin loading from url and call onLoad with the parsed response content.
+		</div>
+
+		<h3>[method:Object3D parse]( [page:String text] )</h3>
+		<div>
+		[page:String text] — The textual <em>obj</em> structure to parse.
+		</div>
+		<div>
+		Parse an <em>obj</em> text structure and return an [page:Object3D].<br />
+		Found objects are converted to [page:Mesh] with a [page:BufferGeometry] and a default [page:MeshLambertMaterial].
+		</div>
+
+		<h2>Example</h2>
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.OBJLoader();
+
+		// load a resource
+		loader.load(
+			// resource URL
+			'models/skinned/UCS_config.json',
+			// Function when resource is loaded
+			function ( object ) {
+				scene.add( object );
+			}
+		);
+		</code>
+
+		[example:webgl_loader_obj]
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/OBJLoader.js examples/js/loaders/OBJLoader.js]
+	</body>
+</html>

+ 87 - 0
docs/api/loaders/OBJMTLLoader.html

@@ -0,0 +1,87 @@
+<!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 loader for loading a <em>.obj</em> and its <em>.mtl</em> together.</div>
+
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( [page:LoadingManager manager] )</h3>
+		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		</div>
+		<div>
+		Creates a new [name].
+		</div>
+
+		<h2>Properties</h2>
+
+
+		<h2>Methods</h2>
+
+		<h3>[method:null load]( [page:String objUrl], [page:String mtlUrl], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
+		<div>
+		[page:String objUrl] — required. URL to the <em>.obj</em> resource<br />
+		[page:String mtlUrl] — required. URL to the <em>.mtl</em> resource<br />
+		[page:Function onLoad] — Will be called when both resources load complete. The argument will be the loaded [page:Object3D].<br />
+		[page:Function onProgress] — Will be called while both load progress. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		[page:Function onError] — Will be called when load errors.<br />
+		</div>
+		<div>
+		Begin loading from urls and call onLoad with the parsed response content.
+		</div>
+
+		<h3>[method:Object3D parse]( [page:String text], [page:Function mtllibCallback] )</h3>
+		<div>
+		[page:String text] — required. The textual <em>obj</em> structure to parse.<br/>
+		[page:Function mtllibCallback] — optional. Callback to handle <em>mtllib</em> declaration.<br/>
+		</div>
+		<div>
+		Parse an <em>obj</em> text structure and return an [page:Object3D].<br />
+		Found objects are converted to [page:Mesh] with a [page:BufferGeometry] and materials are converted to [page:MeshLambertMaterial].
+		</div>
+
+		<h2>Example</h2>
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.OBJMTLLoader();
+
+		// load an obj / mtl resource pair
+		loader.load(
+			// OBJ resource URL
+			'obj/male02/male02.obj',
+			// MTL resource URL
+			'obj/male02/male02_dds.mtl',
+			// Function when both resources are loaded
+			function ( object ) {
+				scene.add( object );
+			},
+			// Function called when downloads progress
+			function ( xhr ) {
+				console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
+			},
+			// Function called when downloads error
+			function ( xhr ) {
+				console.log( 'An error happened' );
+			}
+		);
+		</code>
+
+		[example:webgl_loader_obj_mtl]
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/OBJMTLLoader.js examples/js/loaders/OBJMTLLoader.js]
+	</body>
+</html>

+ 46 - 16
docs/api/loaders/ObjectLoader.html

@@ -9,36 +9,66 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">A loader for loading a JSON resource. Unlike the [page:JSONLoader], this one make use of the <em>.type</em> attributes of objects to map them to their original classes.</div>
 
-		<h2>Example</h2>
-
-		<code>todo</code>
 
 		<h2>Constructor</h2>
 
-
-		<h3>todo</h3>
-		<div></div>
+		<h3>[name]( [page:LoadingManager manager] )</h3>
+		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		</div>
+		<div>
+		Creates a new [name].
+		</div>
 
 
 		<h2>Properties</h2>
 
-		<h3>todo</h3>
+
+		<h2>Methods</h2>
+
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		todo
-		</div> 
+		[page:String url] — required<br />
+		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Object3D object].<br />
+		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		[page:Function onError] — Will be called when load errors.<br />
+		</div>
+		<div>
+		Begin loading from url and call onLoad with the parsed response content.
+		</div>
 
 
-		<h2>Methods</h2>
-		
+		<h3>[method:Object3D parse]( [page:Object json] )</h3>
+		<div>
+		[page:Object json] — required. The JSON source to parse<br />
+		</div>
+		<div>
+		Parse a <em>JSON</em> content and return a threejs object.
+		</div>
 
-		<h3>todo</h3>
-		<div>todo</div>
+		<h3>[method:null setCrossOrigin]( [page:String value] )</h3>
 		<div>
-		todo
+		[page:String value] — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
 		</div>
-		
+
+
+		<h2>Example</h2>
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.ObjectLoader();
+
+		// assuming we loaded a JSON structure from elsewhere
+		var object = loader.parse( a_json_object );
+
+		scene.add( object );
+		</code>
+
+		[example:webgl_loader_msgpack]
+
+
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 95 - 0
docs/api/loaders/PDBLoader.html

@@ -0,0 +1,95 @@
+<!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 loader for loading a <em>.pdb</em> resource.
+		<br /><br />
+		The <a href="http://en.wikipedia.org/wiki/Protein_Data_Bank_(file_format)">Protein Data Bank file format</a> is a textual file format describing the three-dimensional structures of molecules.
+		</div>
+
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( [page:LoadingManager manager] )</h3>
+		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		</div>
+		<div>
+		Creates a new [name].
+		</div>
+
+		<h2>Properties</h2>
+
+
+		<h2>Methods</h2>
+
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
+		<div>
+		[page:String url] — required. URL to the <em>.pdb</em> file<br />
+		[page:Function onLoad] — Will be called when load completes. The arguments will be an [page:Geometry geometryAtoms], [page:Geometry geometryBonds] and the [page:Object JSON] structure.<br />
+		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		[page:Function onError] — Will be called when load errors.<br />
+		</div>
+		<div>
+		Begin loading from url and call onLoad with the parsed response content.
+		</div>
+
+		<h3>[method:Object parsePDB]( [page:String text] )</h3>
+		<div>
+		[page:String text] — The textual <em>pdb</em> structure to parse.
+		</div>
+		<div>
+		Parse a <em>pdb</em> text and return a <em>JSON</em> structure.<br />
+		</div>
+
+		<h3>[method:null createModel]( [page:Object json], [page:Function callback] )</h3>
+		<div>
+		[page:Object json] — The <em>(JSON) pdb</em> structure to parse.<br />
+		[page:Function callback] — Will be called when parse completes, with three arguments: [page:Geometry geometryAtoms], [page:Geometry geometryBonds] and the original [page:Object json].<br />
+		</div>
+		<div>
+		Parse a <em>(JSON) pdb</em> structure and return two [page:Geometry]: one for atoms, one for bonds.<br />
+		</div>
+
+		<h2>Example</h2>
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.PDBLoader();
+
+		// load a PDB resource
+		loader.load(
+			// resource URL
+			'models/molecules/caffeine.pdb',
+			// Function when resource is loaded
+			function ( geometryAtoms, geometryBonds, json ) {
+				console.log( 'This molecule has ' + json.atoms.length + ' atoms' );
+			},
+			// Function called when download progresses
+			function ( xhr ) {
+				console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
+			},
+			// Function called when download errors
+			function ( xhr ) {
+				console.log( 'An error happened' );
+			}
+		);
+		</code>
+
+		[example:webgl_loader_pdb]
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PDBLoader.js examples/js/loaders/PDBLoader.js]
+	</body>
+</html>

+ 47 - 0
docs/api/loaders/SVGLoader.html

@@ -0,0 +1,47 @@
+<!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 loader for loading an <em>.svg</em> resource.</div>
+
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( [page:LoadingManager manager] )</h3>
+		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		</div>
+		<div>
+		Creates a new [name].
+		</div>
+
+		<h2>Properties</h2>
+
+
+		<h2>Methods</h2>
+
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
+		<div>
+		[page:String url] — required<br />
+		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:SVGDocument].<br />
+		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		[page:Function onError] — Will be called when load errors.<br />
+		</div>
+		<div>
+		Begin loading from url and call onLoad with the response content.
+		</div>
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/SVGLoader.js examples/js/loaders/SVGLoader.js]
+	</body>
+</html>

+ 114 - 0
docs/api/loaders/SceneLoader.html

@@ -0,0 +1,114 @@
+<!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 loader for loading a [page:Scene] from a <em>JSON</em> resource.</div>
+
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( [page:LoadingManager manager] )</h3>
+		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		</div>
+		<div>
+		Creates a new [name].
+		</div>
+
+		<h2>Properties</h2>
+
+
+		<h2>Methods</h2>
+
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
+		<div>
+		[page:String url] — required<br />
+		[page:Function onLoad] — Will be called when load completes. The argument will be an [page:Object] containing the loaded components.<br />
+		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		[page:Function onError] — Will be called when load errors.<br />
+		</div>
+		<div>
+		Begin loading from url and call onLoad with the parsed scene.
+		</div>
+
+		<h3>[method:Object parse]( [page:Object json], [page:Function callbackFinished], [page:String url] )</h3>
+		<div>
+		[page:Object json] — The <em>JSON</em> structure to parse.<br />
+		[page:Function callbackFinished] — Will be called when parse completes.<br />
+		[page:String url] — Will be used as base for assets' relative URLs.<br />
+		</div>
+		<div>
+		Parse a <em>JSON</em> scene description and return a new [page:Object] with fully instantiated Three.js objects.
+		</div>
+
+		<h3>[method:null setCrossOrigin]( [page:String value] )</h3>
+		<div>
+		[page:String value] — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
+		</div>
+
+		<h3>[method:null addGeometryHandler]( [page:String typeID], [page:Function loaderClass] )</h3>
+		<div>
+		[page:String typeID] — The type to handle.<br />
+		[page:Function loaderClass] — The handler class.<br />
+		</div>
+		<div>
+		Add an handler for a specific geometry type.
+		</div>
+
+		<h3>[method:null addHierarchyHandler]( [page:String typeID], [page:Function loaderClass] )</h3>
+		<div>
+		[page:String typeID] — The type to handle.<br />
+		[page:Function loaderClass] — The handler class.<br />
+		</div>
+		<div>
+		Add an handler for a specific object type.
+		</div>
+
+
+		<h2>Example</h2>
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.SceneLoader();
+
+		// Handle STL geometries
+		loader.addGeometryHandler( "stl", THREE.STLLoader );
+
+		// Handle OBJ objects
+		loader.addHierarchyHandler( "obj", THREE.OBJLoader );
+
+		// load a JSON resource
+		loader.load(
+			// resource URL
+			'scenes/test_scene.js',
+			// Function when resource is loaded
+			function ( result ) {
+				scene.add( result.scene );
+			},
+			// Function called when download progresses
+			function ( xhr ) {
+				console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
+			},
+			// Function called when download errors
+			function ( xhr ) {
+				console.log( 'An error happened' );
+			}
+		);
+		</code>
+
+		[example:webgl_loader_scene]
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/SceneLoader.js examples/js/loaders/SceneLoader.js]
+	</body>
+</html>

+ 77 - 0
docs/api/loaders/TGALoader.html

@@ -0,0 +1,77 @@
+<!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">Class for loading a <em>.tga</em> [page:DataTexture texture].</div>
+
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( [page:LoadingManager manager] )</h3>
+		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		</div>
+		<div>
+		Creates a new [name].
+		</div>
+
+
+		<h2>Methods</h2>
+
+		<h3>[method:DataTexture load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
+		<div>
+		[page:String url] — required<br />
+		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:DataTexture].<br />
+		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		[page:Function onError] — Will be called when load errors.<br />
+		</div>
+		<div>
+		Begin loading from url and pass the loaded [page:DataTexture texture] to onLoad. The [page:DataTexture texture] is also directly returned for immediate use (but may not be fully loaded).
+		</div>
+
+
+		<h2>Example</h2>
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.TGALoader();
+
+		// load a resource
+		var texture = loader.load(
+			// resource URL
+			'textures/crate_grey8.tga'
+			// Function when resource is loaded
+			function ( texture ) {
+				console.log( 'Texture is loaded' );
+			},
+			// Function called when download progresses
+			function ( xhr ) {
+				console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
+			},
+			// Function called when download errors
+			function ( xhr ) {
+				console.log( 'An error happened' );
+			}
+		);
+
+		var material = new THREE.MeshPhongMaterial( {
+			color: 0xffffff,
+			map: texture
+		} );
+		</code>
+
+		[example:webgl_materials_texture_tga]
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/TGALoader.js examples/js/loaders/TGALoader.js]
+	</body>
+</html>

+ 45 - 58
docs/api/loaders/TextureLoader.html

@@ -10,86 +10,73 @@
 		<h1>[name]</h1>
 
 		<div class="desc">Class for loading a [page:Texture texture].</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>Constructor</h2>
 
-		<h2>Events</h2>
-		
-		<h3>load</h3>
-		<div class="desc">
-		Dispatched when the texture has completed loading
-		</div>
+		<h3>[name]( [page:LoadingManager manager] )</h3>
 		<div>
-		content — loaded texture object
-		</div>
-		
-		<h3>error</h3>
-		<div class="desc">
-		Dispatched when the texture can't be loaded
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
 		</div>
 		<div>
-		message — error message
+		Creates a new [name].
 		</div>
-		
+
+
 		<h2>Properties</h2>
 
-		<h3>[property:todo crossOrigin]</h3>
+		<h3>[property:String crossOrigin]</h3>
 		<div>
 		default — *null*.<br />
 		If set, assigns the *crossOrigin* attribute of the image to the value of *crossOrigin*, prior to starting the load.
 		</div>
-		
-		<h2>Methods</h2>
 
-		<h3>[method:todo load]( [page:String url] )</h3>
-		<div>
-		url — required
-		</div>
-		
-		<div class="desc">Begin loading from <em>url</em></div>
 
-		<h3>[method:todo dispatchEvent]([page:todo event])</h3>
-		<div>
-		event -- todo
-		</div>
-		<div>
-		todo
-		</div>
+		<h2>Methods</h2>
 
-		<h3>[method:todo hasEventListener]([page:todo type], [page:todo listener])</h3>
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		type -- todo <br />
-		listener -- todo
+		[page:String url] — required<br />
+		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded text response.<br />
+		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		[page:Function onError] — Will be called when load errors.<br />
 		</div>
 		<div>
-		todo
+		Begin loading from url and pass the loaded [page:Texture texture] to onLoad.
 		</div>
 
-		<h3>[method:todo removeEventListener]([page:todo type], [page:todo listener])</h3>
-		<div>
-		type -- todo <br />
-		listener -- todo
-		</div>
-		<div>
-		todo
-		</div>
 
-		<h3>[method:todo addEventListener]([page:todo type], [page:todo listener])</h3>
-		<div>
-		type -- todo <br />
-		listener -- todo
-		</div>
-		<div>
-		todo
-		</div>
+
+		<h2>Example</h2>
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.TextureLoader();
+
+		// load a resource
+		loader.load(
+			// resource URL
+			'textures/land_ocean_ice_cloud_2048.jpg',
+			// Function when resource is loaded
+			function ( texture ) {
+				// do something with the texture
+				var material = new THREE.MeshBasicMaterial( {
+					map: texture
+				 } );
+			},
+			// Function called when download progresses
+			function ( xhr ) {
+				console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
+			},
+			// Function called when download errors
+			function ( xhr ) {
+				console.log( 'An error happened' );
+			}
+		);
+		</code>
+
+		[example:canvas_geometry_earth]
+
 
 		<h2>Source</h2>
 

+ 47 - 15
docs/api/loaders/XHRLoader.html

@@ -7,38 +7,70 @@
 		<link type="text/css" rel="stylesheet" href="../../page.css" />
 	</head>
 	<body>
-		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<h1>[name]</h1>
 
-		<h2>Example</h2>
+		<div class="desc">A low level class for loading resources with XmlHttpRequest, used internaly by most loaders.</div>
 
-		<code>todo</code>
 
 		<h2>Constructor</h2>
 
-
-		<h3>todo</h3>
-		<div></div>
+		<h3>[name]( [page:LoadingManager manager] )</h3>
+		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		</div>
+		<div>
+		Creates a new [name].
+		</div>
 
 
 		<h2>Properties</h2>
 
-		<h3>todo</h3>
+		<h3>[property:Cache cache]</h3>
 		<div>
-		todo
-		</div> 
+		A [page:Cache cache] instance that hold the response from each request made through this loader, so each file is requested once.
+		</div>
+
+		<h3>[property:String crossOrigin]</h3>
+		<div>
+		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
+		</div>
+
+		<h3>[property:String responseType]</h3>
+		<div>
+		Can be set to change the response type.
+		</div>
 
 
 		<h2>Methods</h2>
-		
 
-		<h3>todo</h3>
-		<div>todo</div>
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		todo
+		[page:String url] — required<br />
+		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded text response.<br />
+		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		[page:Function onError] — Will be called when load errors.<br />
 		</div>
-		
+		<div>
+		Begin loading from url and return the [page:String text] response that will contain the data.
+		</div>
+
+		<h3>[method:null setCrossOrigin]( [page:String value] )</h3>
+		<div>
+		[page:String value] — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
+		</div>
+
+		<h3>[method:null setResponseType]( [page:String value] )</h3>
+		<div>
+		[page:String value] — the empty string (default), "arraybuffer", "blob", "document", "json", or "text".
+		</div>
+
+
+		<h2>Example</h2>
+
+		[example:webgl_morphtargets_human]
+
+
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 73 - 0
docs/api/loaders/glTFLoader.html

@@ -0,0 +1,73 @@
+<!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:Loader] &rarr;
+		<h1>[name]</h1>
+
+		<div class="desc">
+		A loader for loading a <em>.gltf</em> resource in <em>JSON</em> format.
+		<br /><br />
+		The <a href="https://www.khronos.org/gltf">glTF file format</a> is a JSON file format to enable rapid delivery and loading of 3D content.
+		</div>
+
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( )</h3>
+		<div>
+		Creates a new [name].
+		</div>
+
+		<h2>Properties</h2>
+
+
+		<h2>Methods</h2>
+
+		<h3>[method:Object3D load]( [page:String url], [page:Function callback] )</h3>
+		<div>
+		[page:String url] — required<br />
+		[page:Function callback] — Will be called when load completes. The argument will be an [page:Object] containing the loaded .[page:Object3D scene],  .[page:Array cameras] and .[page:Array animations].<br />
+		</div>
+		<div>
+		Begin loading from url and call the callback function with the parsed response content.
+		</div>
+
+
+		<h2>Notes</h2>
+
+		<div>
+		This class is often used with [page:glTFAnimator THREE.glTFAnimator] to animate parsed animations.
+		</div>
+
+
+		<h2>Example</h2>
+
+		<code>
+		// instantiate a loader
+		var loader = new THREE.glTFLoader();
+
+		// load a glTF resource
+		loader.load(
+			// resource URL
+			'models/gltf/duck/duck.json',
+			// Function when resource is loaded
+			function ( object ) {
+				scene.add( object.scene );
+			}
+		);
+		</code>
+
+		[example:webgl_loader_gltf]
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/gltf/glTFLoader.js examples/js/loaders/gltf/glTFLoader.js]
+	</body>
+</html>

+ 15 - 15
docs/api/materials/LineDashedMaterial.html

@@ -34,37 +34,37 @@
 
 
 
-		<h3>[property:number scale]</h3>
-		<div>
-		The scale of the dashed part of a line.
-		</div> 
-
 		<h3>[property:Color color]</h3>
 		<div>
 		Sets the color of the line. Default is 0xffffff.
 		</div> 
 
-		<h3>[property:boolean vertexColors]</h3>
-		<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>[property:number linewidth]</h3>
+		<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>
+
+		<h3>[property:number scale]</h3>
+		<div>
+		The scale of the dashed part of a line.
+		</div> 
 
 		<h3>[property:number dashSize]</h3>
 		<div>
 		The size of the dash. This is both the gap with the stroke. Default is 3.
 		</div> 
 
-		<h3>[property:boolean fog]</h3>
-		<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>[property:number gapSize]</h3>
 		<div>
 		The size of the gap. Default is 1.
 		</div> 
 
-		<h3>[property:number linewidth]</h3>
-		<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>
+		<h3>[property:boolean vertexColors]</h3>
+		<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>[property:boolean fog]</h3>
+		<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>
 
 		<h2>Methods</h2>
 

+ 7 - 6
docs/api/materials/Material.html

@@ -53,14 +53,15 @@
 		</div>
 		<div>Default is *false*.</div>
 
-		<h3>[property:Blending blending]</h3>
+		<h3>.[page:Blending blending]</h3>
 		<div>
-		Which blending to use when displaying objects with this material. Default is [page:Materials NormalBlending].
+		Which blending to use when displaying objects with this material. Default is [page:Materials NormalBlending]. See the blending mode [page:Materials constants] for all possible values.
+
 		</div>
 
-		<h3>[property:Integer blendSrc]</h3>
+		<h3>.[page:Integer blendSrc]</h3>
 		<div>
-		Blending source. It's one of the blending mode constants defined in [page:Three Three.js]. Default is [page:CustomBlendingEquation SrcAlphaFactor]
+		Blending source. It's one of the blending mode constants defined in Three.js. Default is [page:CustomBlendingEquation SrcAlphaFactor]. See the destination factors [page:CustomBlendingEquation constants] for all possible values.
 		</div>
 
 		<h3>[property:Integer blendDst]</h3>
@@ -145,12 +146,12 @@
 		This clones the material in the optional parameter and returns it.
 		</div>
 
-		<h3>[method:todo dispose]()</h3>
+		<h3>[method:null dispose]()</h3>
 		<div>
 		This disposes the material.
 		</div>
 
-		<h3>[method:todo setValues]([page:object values])</h3>
+		<h3>[method:null setValues]([page:object values])</h3>
 		<div>
 		values -- a container with parameters.
 		</div>

+ 28 - 26
docs/api/materials/MeshBasicMaterial.html

@@ -14,6 +14,7 @@
 		<div class="desc">A material for drawing geometries in a simple shaded (flat or wireframe) way.</div>
 		<div class="desc">The default will render as flat polygons. To draw the mesh as wireframe, simply set the 'wireframe' property to true.</div>
 
+		<iframe src='../../scenes/material-browser.html#MeshBasicMaterial'></iframe>
 
 		<h2>Constructor</h2>
 
@@ -23,17 +24,18 @@
 		<div>parameters is an object with one or more properties defining the material's appearance.</div>
 		<div>
 		color — geometry color in hexadecimal. Default is 0xffffff.<br />
+		map — Sets the texture map. Default is null <br />
+		lightMap — Set light map. Default is null.<br />
+		specularMap — Set specular map. Default is null.<br />
+		alphaMap — Set alpha map. Default is null.<br />
+		envMap — Set env map. Default is null.<br />
+		fog — Define whether the material color is affected by global fog settings. Default is true.<br />
+		shading — Define shading type. Default is THREE.SmoothShading.<br />
 		wireframe — render geometry as wireframe. Default is false.<br />
 		wireframeLinewidth — Line thickness. Default is 1.<br />
 		wireframeLinecap — Define appearance of line ends. Default is 'round'.<br />
 		wireframeLinejoin — Define appearance of line joints. Default is 'round'.<br />
-		shading — Define shading type. Default is THREE.SmoothShading.<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 true.<br />
-		lightMap — Set light map. Default is null.<br />
-		specularMap — Set specular map. Default is null.<br />
-		alphaMap — Set alpha map. Default is null.<br />
-		envMap — Set env map. Default is null.<br />
 		skinning — Define whether the material uses skinning. Default is false.<br />
 		morphTargets — Define whether the material uses morphTargets. Default is false.
 		</div>
@@ -43,6 +45,26 @@
 		<h3>[property:Integer color]</h3>
 		<div>Sets the color of the geometry. Default is 0xffffff.</div>
 		
+		<h3>[property:Texture lightMap]</h3>
+		<div>Set light map. Default is null.</div>
+
+		<h3>[property:Texture specularMap]</h3>
+		<div>Set specular map. Default is null.</div>
+
+		<h3>[property:Texture alphaMap]</h3>
+		<div>The alpha map is a grayscale texture that controls the opacity across the surface (black: fully transparent; white: fully opaque). Default is null.</div>
+		<div>Only the color of the texture is used, ignoring the alpha channel if one exists. For RGB and RGBA textures, the [page:WebGLRenderer WebGL] renderer will use the green channel when sampling this texture due to the extra bit of precision provided for green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and luminance/alpha textures will also still work as expected.</div>
+
+		<h3>[property:TextureCube envMap]</h3>
+		<div>Set env map. Default is null.</div>
+
+		<h3>[property:Boolean fog]</h3>
+		<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>[property:String shading]</h3>
+		<div>Define shading type. Default is THREE.SmoothShading.</div>
+
 		<h3>[property:Boolean wireframe]</h3>
 		<div>Render geometry as wireframe. Default is false (i.e. render as flat polygons).</div>
 
@@ -58,30 +80,10 @@
 		<div>Define appearance of line joints. Possible values are "round", "bevel" and "miter". Default is 'round'.</div>
 		<div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
 		
-		<h3>[property:String shading]</h3>
-		<div>Define shading type. Default is THREE.SmoothShading.</div>
-
 		<h3>[property:Integer vertexColors]</h3>
 		<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. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.</div>
 
-		<h3>[property:Boolean fog]</h3>
-		<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>[property:Texture lightMap]</h3>
-		<div>Set light map. Default is null.</div>
-
-		<h3>[property:Texture specularMap]</h3>
-		<div>Set specular map. Default is null.</div>
-
-		<h3>[property:Texture alphaMap]</h3>
-		<div>The alpha map is a grayscale texture that controls the opacity across the surface (black: fully transparent; white: fully opaque). Default is null.</div>
-		<div>Only the color of the texture is used, ignoring the alpha channel if one exists. For RGB and RGBA textures, the [page:WebGLRenderer WebGL] renderer will use the green channel when sampling this texture due to the extra bit of precision provided for green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and luminance/alpha textures will also still work as expected.</div>
-
-		<h3>[property:TextureCube envMap]</h3>
-		<div>Set env map. Default is null.</div>
-
 		<h3>[property:Boolean skinning]</h3>
 		<div>Define whether the material uses skinning. Default is false.</div>
 	

+ 6 - 0
docs/api/materials/MeshDepthMaterial.html

@@ -12,6 +12,8 @@
 		<h1>[name]</h1>
 
 		<div class="desc">A material for drawing geometry by depth. Depth is based off of the camera near and far plane. White is nearest, black is farthest.</div>
+		
+		<iframe src='../../scenes/material-browser.html#MeshDepthMaterial'></iframe>
 
 		<h2>Constructor</h2>
 
@@ -21,6 +23,7 @@
 		parameters is an object with one or more properties defining the material's appearance. 
 		</div>
 		<div>
+		morphTargets -- Define whether the material uses morphTargets. Default is false.<br/>
 		wireframe -- Render geometry as wireframe. Default is false (i.e. render as smooth shaded).<br/>
 		wireframeLinewidth -- Controls wireframe thickness. Default is 1.<br/>
 		</div>
@@ -29,6 +32,9 @@
 		<h2>Properties</h2>
 
 
+		<h3>[property:boolean morphTargets]</h3>
+		<div>Define whether the material uses morphTargets. Default is false.</div> 
+
 		<h3>[property:boolean wireframe]</h3>
 		<div>Render geometry as wireframe. Default is false (i.e. render as smooth shaded).</div> 
 		

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

@@ -10,7 +10,7 @@
 		<h1>[name]</h1>
 
 		<div class="desc">
-		A Material to define multiple materials for the same geometry.
+		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>

+ 67 - 47
docs/api/materials/MeshLambertMaterial.html

@@ -12,17 +12,32 @@
 		<h1>[name]</h1>
 
 		<div class="desc">A material for non-shiny (Lambertian) surfaces, evaluated per vertex.</div>
-
+		
+		<iframe src='../../scenes/material-browser.html#MeshLambertMaterial'></iframe>
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo parameters])</h3>
+		<h3>[name]([page:Object parameters])</h3>
 		<div>
-		parameters -- todo
+		parameters -- parameters is an object with one or more properties defining the material's appearance.
 		</div>
 		<div>
-		todo
+		color — Line color in hexadecimal. Default is 0xffffff.<br />
+		map — Sets the texture map. Default is null <br />
+		lightMap — Set light map. Default is null.<br />
+		specularMap — Set specular map. Default is null.<br />
+		alphaMap — Set alpha map. Default is null.<br />
+		envMap — Set env map. Default is null.<br />
+		fog — Define whether the material color is affected by global fog settings. Default is false.
+		shading — How the triangles of a curved surface are rendered. Default is [page:Materials THREE.SmoothShading].<br/>
+		wireframe — Render geometry as wireframe. Default is false (i.e. render as smooth shaded).<br/>
+		wireframeLinewidth — Controls wireframe thickness. Default is 1.<br/>
+		wireframeLinecap — Define appearance of line ends. Default is 'round'.<br />
+		wireframeLinejoin — Define appearance of line joints. Default is 'round'.<br />
+		vertexColors — Define how the vertices gets colored. Default is THREE.NoColors.<br />
+		skinning — Define whether the material uses skinning. Default is false.<br />
+		morphTargets — Define whether the material uses morphTargets. Default is false.<br/>
 		</div>
 
 
@@ -43,34 +58,20 @@
 		<div>
 		Emissive (light) color of the material, essentially a solid color unaffected by other lighting. Default is black.<br />
 		</div>
-
-		<h3>[property:Integer shading]</h3>
-		<div>How the triangles of a curved surface are rendered: as a smooth surface, as flat separate facets, or no shading at all.</div>
-
-		<div>Options are [page:Materials THREE.SmoothShading] (default), [page:Materials THREE.FlatShading], [page:Materials THREE.NoShading].</div>
 		
-		<h3>[property:Boolean wireframe]</h3>
-		<div>Whether the triangles' edges are displayed instead of surfaces. Default is *false*.</div>
-		
-		<h3>[property:Float wireframeLinewidth]</h3>
-		<div>Line thickness for wireframe mode. Default is *1.0*.</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>
-
-		<h3>[property:String wireframeLinecap]</h3>
-		<div>Define appearance of line ends. Possible values are "butt", "round" and "square". Default is 'round'.</div>
-		<div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
-
-		<h3>[property:String wireframeLinejoin]</h3>
-		<div>Define appearance of line joints. Possible values are "round", "bevel" and "miter". Default is 'round'.</div>
-		<div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
-
-		<h3>[property:Integer vertexColors]</h3>
-		<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. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.</div>
+		<h3>[property:boolean wrapAround]</h3>
+		<div>
+			Define whether the diffuse lighting wraps around the model or not. This option adds a little more (tintable) light
+			onto the side of the object in relation to a light.
+		</div>
 
-		<h3>[property:Boolean fog]</h3>
-		<div>Define whether the material color is affected by global fog settings. Default is *true*.</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>[property:Vector3 wrapRGB]</h3>
+		<div>
+			Decide how much of the wrap around values get used if the wrapAround option is set. The x, y, z values correspond
+			to the r, g, b values respectively. The typical range is of each is from 0 to 1. For example setting all of the
+			vector values to 0.5 will add a moderate amount of light to the side of the model. Changing *b* to 1 will
+			tint the light on the side to be more blue. Defaults to *(1,1,1)*.
+		</div> 
 
 		<h3>[property:Texture map]</h3>
 		<div>Set color texture map. Default is null.</div>
@@ -88,38 +89,57 @@
 		<h3>[property:TextureCube envMap]</h3>
 		<div>Set env map. Default is null.</div>
 
+		<h3>[property:Integer combine]</h3>
+		<div>How to combine the result of the surface's color with the environment map, if any.</div> 
+		 
+		<div>Options are [page:Textures THREE.Multiply] (default), [page:Textures THREE.MixOperation], [page:Textures THREE.AddOperation]. If mix is chosen, the reflectivity is used to blend between the two colors.</div>
+		 
 		<h3>[property:Float reflectivity]</h3>
 		<div>How much the environment map affects the surface; also see "combine".</div> 
 
 		<h3>[property:Float refractionRatio]</h3>
 		<div>The index of refraction for an environment map using [page:Textures THREE.CubeRefractionMapping]. Default is *0.98*.</div>
 
-		<h3>[property:Integer combine]</h3>
-		<div>How to combine the result of the surface's color with the environment map, if any.</div> 
-		 
-		<div>Options are [page:Textures THREE.Multiply] (default), [page:Textures THREE.MixOperation], [page:Textures THREE.AddOperation]. If mix is chosen, the reflectivity is used to blend between the two colors.</div>
-		 
+		<h3>[property:Boolean fog]</h3>
+		<div>Define whether the material color is affected by global fog settings. Default is *true*.</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>[property:Integer shading]</h3>
+		<div>How the triangles of a curved surface are rendered: as a smooth surface, as flat separate facets, or no shading at all.</div>
+
+		<div>Options are [page:Materials THREE.SmoothShading] (default), [page:Materials THREE.FlatShading], [page:Materials THREE.NoShading].</div>
+		
+		<h3>[property:Boolean wireframe]</h3>
+		<div>Whether the triangles' edges are displayed instead of surfaces. Default is *false*.</div>
+		
+		<h3>[property:Float wireframeLinewidth]</h3>
+		<div>Line thickness for wireframe mode. Default is *1.0*.</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>
+
+		<h3>[property:String wireframeLinecap]</h3>
+		<div>Define appearance of line ends. Possible values are "butt", "round" and "square". Default is 'round'.</div>
+		<div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
+
+		<h3>[property:String wireframeLinejoin]</h3>
+		<div>Define appearance of line joints. Possible values are "round", "bevel" and "miter". Default is 'round'.</div>
+		<div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
+
+		<h3>[property:Integer vertexColors]</h3>
+		<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. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.</div>
+
 		<h3>[property:Boolean skinning]</h3>
 		<div>Define whether the material uses skinning. Default is *false*.</div>
 	
 		<h3>[property:Boolean morphTargets]</h3>
 		<div>Define whether the material uses morphTargets. Default is *false*.</div>	
 
-
-		<h3>[property:Vector3 wrapRGB]</h3>
-		<div>
-		todo
-		</div> 
-
 		<h3>[property:boolean morphNormals]</h3>
 		<div>
-		todo
-		</div> 
+			Defines whether the material uses morphNormals. Set as true to pass morphNormal attributes from the [page:Geometry]
+			to the shader. Default is *false*.
+		</div>
 
-		<h3>[property:boolean wrapAround]</h3>
-		<div>
-		todo
-		</div> 
 
 		<h2>Methods</h2>
 

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

@@ -12,6 +12,8 @@
 		<h1>[name]</h1>
 
 		<div class="desc">A material that maps the normal vectors to RGB colors.</div>
+		
+		<iframe src='../../scenes/material-browser.html#MeshNormalMaterial'></iframe>
 
 
 		<h2>Constructor</h2>
@@ -22,26 +24,21 @@
 		parameters is an object with one or more properties defining the material's appearance. 
 		</div>
 		<div>
-		morphTargets -- Define whether the material uses morphTargets. Default is false.<br/>
-		shading --  How the triangles of a curved surface are rendered. Default is [page:Materials THREE.SmoothShading].<br/>
+		shading --  How the triangles of a curved surface are rendered. Default is [page:Materials THREE.FlatShading].<br/>
 		wireframe -- Render geometry as wireframe. Default is false (i.e. render as smooth shaded).<br/>
 		wireframeLinewidth -- Controls wireframe thickness. Default is 1.<br/>
+		morphTargets -- Define whether the material uses morphTargets. Default is false.<br/>
 		</div>
 
 
 		<h2>Properties</h2>
 
 
-
-		<h3>[property:boolean morphTargets]</h3>
-		<div>Define whether the material uses morphTargets. Default is false.</div> 
-
 		<h3>[property:number shading]</h3>
 		<div>
 			How the triangles of a curved surface are rendered: as a smooth surface, as flat separate facets, or no shading at all.<br/><br/>
-			Options are [page:Materials THREE.SmoothShading] (default), [page:Materials THREE.FlatShading]
+			Options are [page:Materials THREE.SmoothShading], [page:Materials THREE.FlatShading](default)
 		</div>
-		
 
 		<h3>[property:boolean wireframe]</h3>
 		<div>
@@ -54,6 +51,9 @@
 			Due to limitations in the ANGLE layer, on Windows platforms linewidth will always be 1 regardless of the set value.
 		</div> 
 
+		<h3>[property:boolean morphTargets]</h3>
+		<div>Define whether the material uses morphTargets. Default is false.</div> 
+
 		<h2>Methods</h2>
 
 

+ 97 - 70
docs/api/materials/MeshPhongMaterial.html

@@ -13,13 +13,31 @@
 
 		<div class="desc">A material for shiny surfaces, evaluated per pixel.</div>
 
+		<iframe src='../../scenes/material-browser.html#MeshPhongMaterial'></iframe>
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo parameters])</h3>
+		<h3>[name]([page:Object parameters])</h3>
 		<div>
-		parameters -- A JSON object with settable parameters.
+		parameters -- an object with one or more of the material's properties defining the its appearance.
+		</div>
+		<div>
+		color — geometry color in hexadecimal. Default is 0xffffff.<br />
+		map — Sets the texture map. Default is null <br />
+		lightMap — Set light map. Default is null.<br />
+		specularMap — Set specular map. Default is null.<br />
+		alphaMap — Set alpha map. Default is null.<br />
+		envMap — Set env map. Default is null.<br />
+		fog — Define whether the material color is affected by global fog settings. Default is true.<br />
+		shading — Define shading type. Default is THREE.SmoothShading.<br />
+		wireframe — render geometry as wireframe. Default is false.<br />
+		wireframeLinewidth — Line thickness. Default is 1.<br />
+		wireframeLinecap — Define appearance of line ends. Default is 'round'.<br />
+		wireframeLinejoin — Define appearance of line joints. Default is 'round'.<br />
+		vertexColors — Define how the vertices gets colored. Default is THREE.NoColors.<br />
+		skinning — Define whether the material uses skinning. Default is false.<br />
+		morphTargets — Define whether the material uses morphTargets. Default is false.
 		</div>
 		<div>
 		Example:<br>
@@ -54,33 +72,26 @@
 		<h3>[property:Float shininess]</h3>
 		<div>How shiny the specular highlight is; a higher value gives a sharper highlight. Default is *30*.</div>
 
-		<h3>[property:Integer shading]</h3>
-		<div>How the triangles of a curved surface are rendered: as a smooth surface, as flat separate facets, or no shading at all.</div>
-
-		<div>Options are [page:Materials THREE.SmoothShading] (default), [page:Materials THREE.FlatShading], [page:Materials THREE.NoShading].</div>
-		
-		<h3>[property:Boolean wireframe]</h3>
-		<div>Whether the triangles' edges are displayed instead of surfaces. Default is *false*.</div>
-		
-		<h3>[property:Float wireframeLinewidth]</h3>
-		<div>Line thickness for wireframe mode. Default is *1.0*.</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>
-
-		<h3>[property:String wireframeLinecap]</h3>
-		<div>Define appearance of line ends. Possible values are "butt", "round" and "square". Default is 'round'.</div>
-		<div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
-
-		<h3>[property:String wireframeLinejoin]</h3>
-		<div>Define appearance of line joints. Possible values are "round", "bevel" and "miter". Default is 'round'.</div>
-		<div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
+		<h3>[property:boolean metal]</h3>
+		<div>
+			If set to true the shader multiplies the specular highlight by the underlying color of the object, making
+			it appear to be more metal-like and darker. If set to false the specular highlight is added ontop of the
+			underlying colors.
+		</div> 
 
-		<h3>[property:Integer vertexColors]</h3>
-		<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. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.</div>
+		<h3>[property:boolean wrapAround]</h3>
+		<div>
+			Define whether the diffuse lighting wraps around the model or not. This option adds a little more (tintable) light
+			onto the side of the object in relation to a light.
+		</div>
 
-		<h3>[property:Boolean fog]</h3>
-		<div>Define whether the material color is affected by global fog settings. Default is *true*.</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>[property:Vector3 wrapRGB]</h3>
+		<div>
+			Decide how much of the wrap around values get used if the wrapAround option is set. The x, y, z values correspond
+			to the r, g, b values respectively. The typical range is of each is from 0 to 1. For example setting all of the
+			vector values to 0.5 will add a moderate amount of light to the side of the model. Changing *b* to 1 will
+			tint the light on the side to be more blue. Defaults to (1,1,1).
+		</div>
 
 		<h3>[property:Texture map]</h3>
 		<div>Set color texture map. Default is null.</div>
@@ -88,6 +99,29 @@
 		<h3>[property:Texture lightMap]</h3>
 		<div>Set light map. Default is null.</div>
 
+		<h3>[property:Texture bumpMap]</h3>
+		<div>
+			The texture to create a bump map. The black and white values map to the perceived depth in relation to the lights.
+			Bump doesn't actually affect the geometry of the object, only the lighting. If a normal map is defined this will
+			be ignored.
+		</div>
+		
+		<h3>[property:Float bumpScale]</h3>
+		<div>
+			How much the bump map affects the material. Typical ranges are 0-1. Default is 1.
+		</div>
+
+		<h3>[property:Texture normalMap]</h3>
+		<div>
+			The texture to create a normal map. The RGB values affect the surface normal for each pixel fragment and change
+			the way the color is lit. Normal maps do not change the actual shape of the surface, only the lighting.
+		</div>
+		
+		<h3>[property:Vector2 normalScale]</h3>
+		<div>
+			How much the normal map affects the material. Typical ranges are 0-1. Default is (1,1).
+		</div> 
+
 		<h3>[property:Texture specularMap]</h3>
 		<div>The specular map value affects both how much the specular surface highlight contributes and how much of the environment map affects the surface. Default is null.</div>
 
@@ -97,64 +131,57 @@
 
 		<h3>[property:TextureCube envMap]</h3>
 		<div>Set env map. Default is null.</div>
-
-		<h3>[property:Float reflectivity]</h3>
-		<div>How much the environment map affects the surface; also see "combine".</div> 
-
-		<h3>[property:Float refractionRatio]</h3>
-		<div>The index of refraction for an environment map using [page:Textures THREE.CubeRefractionMapping]. Default is *0.98*.</div>
-
+		
 		<h3>[property:Integer combine]</h3>
 		<div>How to combine the result of the surface's color with the environment map, if any.</div> 
 		 
 		<div>Options are [page:Textures THREE.MultiplyOperation] (default), [page:Textures THREE.MixOperation], [page:Textures THREE.AddOperation]. If mix is chosen, the reflectivity is used to blend between the two colors.</div>
 		 
-		<h3>[property:Boolean skinning]</h3>
-		<div>Define whether the material uses skinning. Default is *false*.</div>
-	
-		<h3>[property:Boolean morphTargets]</h3>
-		<div>Define whether the material uses morphTargets. Default is *false*.</div>	
+		<h3>[property:Float reflectivity]</h3>
+		<div>How much the environment map affects the surface; also see "combine".</div> 
 
+		<h3>[property:Float refractionRatio]</h3>
+		<div>The index of refraction for an environment map using [page:Textures THREE.CubeRefractionMapping]. Default is *0.98*.</div>
 
-		<h3>[property:Vector2 normalScale]</h3>
-		<div>
-		todo
-		</div> 
+		<h3>[property:Boolean fog]</h3>
+		<div>Define whether the material color is affected by global fog settings. Default is *true*.</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>[property:boolean morphNormals]</h3>
-		<div>
-		todo
-		</div> 
+		<h3>[property:Integer shading]</h3>
+		<div>How the triangles of a curved surface are rendered: as a smooth surface, as flat separate facets, or no shading at all.</div>
 
-		<h3>[property:boolean metal]</h3>
-		<div>
-		todo
-		</div> 
+		<div>Options are [page:Materials THREE.SmoothShading] (default), [page:Materials THREE.FlatShading], [page:Materials THREE.NoShading].</div>
+		
+		<h3>[property:Boolean wireframe]</h3>
+		<div>Whether the triangles' edges are displayed instead of surfaces. Default is *false*.</div>
+		
+		<h3>[property:Float wireframeLinewidth]</h3>
+		<div>Line thickness for wireframe mode. Default is *1.0*.</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>
 
-		<h3>[property:number bumpScale]</h3>
-		<div>
-		todo
-		</div> 
+		<h3>[property:String wireframeLinecap]</h3>
+		<div>Define appearance of line ends. Possible values are "butt", "round" and "square". Default is 'round'.</div>
+		<div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
 
-		<h3>[property:boolean wrapAround]</h3>
-		<div>
-		todo
-		</div>
+		<h3>[property:String wireframeLinejoin]</h3>
+		<div>Define appearance of line joints. Possible values are "round", "bevel" and "miter". Default is 'round'.</div>
+		<div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
 
-		<h3>[property:object normalMap]</h3>
-		<div>
-		todo
-		</div> 
+		<h3>[property:Integer vertexColors]</h3>
+		<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. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.</div>
 
-		<h3>[property:object bumpMap]</h3>
-		<div>
-		todo
-		</div> 
+		<h3>[property:Boolean skinning]</h3>
+		<div>Define whether the material uses skinning. Default is *false*.</div>
+	
+		<h3>[property:Boolean morphTargets]</h3>
+		<div>Define whether the material uses morphTargets. Default is *false*.</div>	
 
-		<h3>[property:Vector3 wrapRGB]</h3>
+		<h3>[property:boolean morphNormals]</h3>
 		<div>
-		todo
-		</div> 
+			Defines whether the material uses morphNormals. Set as true to pass morphNormal attributes from the [page:Geometry]
+			to the shader. Default is *false*.
+		</div>
 
 		<h2>Methods</h2>
 

+ 3 - 1
docs/api/materials/PointCloudMaterial.html

@@ -48,7 +48,9 @@
 		<div>Specify whether particles' size will get smaller with the distance. Default is true.</div>
 
 		<h3>[property:Boolean vertexColors]</h3>
-
+		<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. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.</div>
+		
 		<h3>[property:Boolean fog]</h3>
 		<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>

+ 56 - 49
docs/api/materials/ShaderMaterial.html

@@ -11,13 +11,13 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">Material rendered with custom shaders. A shader is a small program written in [link:https://www.opengl.org/documentation/glsl/ GLSL] to run on the GPU. You may want to use a custom shader if you need to: 
+		<div class="desc">Material rendered with custom shaders. A shader is a small program written in [link:https://www.opengl.org/documentation/glsl/ GLSL] to run on the GPU. You may want to use a custom shader if you need to:
 		<ul>
 			<li>implement an effect not included with any of the built-in [page:Material materials]</li>
 			<li>combine many objects into a single [page:Geometry] or [page:BufferGeometry] in order to improve performance</li>
 			<li>associate custom data with individual vertices ("custom attributes")</li>
 		</ul>
-		Note that a ShaderMaterial will only be rendered properly by [page:WebGLRenderer], since the GLSL code in the vertexShader and fragmentShader properties must be compiled and run on the GPU using WebGL. 
+		Note that a ShaderMaterial will only be rendered properly by [page:WebGLRenderer], since the GLSL code in the vertexShader and fragmentShader properties must be compiled and run on the GPU using WebGL.
 		</div>
 
 		<h3>Example</h3>
@@ -39,7 +39,7 @@
 		</code>
 
 		<h3>Vertex shaders and fragment shaders</h3>
-		<p>You can specify two different types of shaders for each material: 
+		<p>You can specify two different types of shaders for each material:
 		<ul>
 			<li>The *vertex shader* runs first; it recieves *attributes*, calculates/manipulates the position of each individual vertex, and passes additional data (*varying*s) to the fragment shader.</li>
 			<li>The *fragment shader* runs second; it sets the color of each individual "fragment" (pixel) rendered to the screen.</li>
@@ -69,13 +69,13 @@
 		Custom attributes and uniforms must be declared both in your GLSL shader code (within *vertexShader* and/or *fragmentShader*), <emph>and</emph> in the *attributes* and *uniforms* properties of your ShaderMaterial. The declaration in the material is necessary to ensure [page:WebGLRenderer] passes your attribute/uniform data in a buffer to the GPU when the shader is run. Note that *varying*s only need to be declared within the shader code (not within the material).
 		</p>
 		<p>
-		To declare a custom attribute, use the *attributes* property of the material: 
+		To declare a custom attribute, use the *attributes* property of the material:
 		<code>
 		attributes: {
 			vertexOpacity: { type: 'f', value: [] }
 		}
 		</code>
-		Each attribute must have a *type* property and a *value* property. 
+		Each attribute must have a *type* property and a *value* property.
 		<table>
 			<caption><a id="attribute-types">Attribute types</a></caption>
 			<thead>
@@ -113,7 +113,7 @@
 				</tr>
 			</tbody>
 		</table>
-		The way attribute data is stored depends on whether you're using [page:BufferGeometry] or [page:Geometry]: 
+		The way attribute data is stored depends on whether you're using [page:BufferGeometry] or [page:Geometry]:
 		<ul>
 			<li>When using [page:Geometry], attribute data is stored directly on the <emph>material</emph>, using the attribute's *value* array; each element of *value* should correspond to one vertex. To update an attribute, set the *needsUpdate* flag to true on the material attribute:
 			<code>
@@ -135,7 +135,7 @@
 			time: { type: "f", value: 1.0 },
 			resolution: { type: "v2", value: new THREE.Vector2() }
 		}
-		</code> 
+		</code>
 		Each uniform must have a <a href="#uniform-types">*type*</a> and a *value*:
 		<table>
 			<caption><a id="uniform-types">Uniform types</a></caption>
@@ -210,7 +210,15 @@
 		<div>
 		parameters -- An object containing various parameters setting up shaders and their uniforms.
 		</div>
-
+		<div>
+		shading — Define shading type. Default is THREE.SmoothShading.<br />
+		fog — Define whether the material color is affected by global fog settings. Default is true.<br />
+		wireframe — render geometry as wireframe. Default is false.<br />
+		wireframeLinewidth — Line thickness. Default is 1.<br />
+		vertexColors — Define how the vertices gets colored. Default is THREE.NoColors.<br />
+		skinning — Define whether the material uses skinning. Default is false.<br />
+		morphTargets — Define whether the material uses morphTargets. Default is false.
+		</div>
 
 		<h2>Properties</h2>
 
@@ -221,7 +229,7 @@
 		{ type: 'f', value: 1.0 }
 		</code>
 		where *type* is a <a href="#uniform-types">uniform type string</a>, and *value* is the value of the uniform. Names must match the name of the uniform, as defined in the GLSL code. Note that uniforms are refreshed on every frame, so updating the value of the uniform will immediately update the value available to the GLSL code.
-		</div> 
+		</div>
 
 		<h3>[property:Object attributes]</h3>
 		<div>
@@ -230,12 +238,12 @@
 		<code>
 		{ type: 'f', value: [1.0, 0.5, 2.0, ...] }
 		</code>
-		where *type* is an <a href="#attribute-types">attribute type string</a>, and *value* is an array containing an attribute value for each vertex in the geometry (or *undefined* if using [page:BufferGeometry]). Names must match the name of the attribute, as defined in the GLSL code. 
+		where *type* is an <a href="#attribute-types">attribute type string</a>, and *value* is an array containing an attribute value for each vertex in the geometry (or *undefined* if using [page:BufferGeometry]). Names must match the name of the attribute, as defined in the GLSL code.
 		</p>
 		<p>
 		Note that attribute buffers are <emph>not</emph> refreshed automatically when their values change; if using [page:Geometry], set <code>needsUpdate = true</code> on the attribute definition. If using [page:BufferGeometry], set <code>needsUpdate = true</code> on the [page:BufferAttribute].
 		</p>
-		</div> 
+		</div>
 
 		<h3>[property:Object defines]</h3>
 		<div>
@@ -251,66 +259,65 @@
 		#define FOO 15
 		#define BAR true
 		</code>
-		in the GLSL code. 
-		</div> 
-
-		<h3>[property:String fragmentShader]</h3>
-		<div>
-		Fragment shader GLSL code.  This is the actual code for the shader. In the example above, the *vertexShader* and *fragmentShader* code is extracted from the DOM; it could be passed as a string directly or loaded via AJAX instead.
-		</div> 
+		in the GLSL code.
+		</div>
 
 		<h3>[property:String vertexShader]</h3>
 		<div>
 		Vertex shader GLSL code.  This is the actual code for the shader. In the example above, the *vertexShader* and *fragmentShader* code is extracted from the DOM; it could be passed as a string directly or loaded via AJAX instead.
-		</div> 
-
+		</div>
 
-		<h3>[property:Boolean lights]</h3>
+		<h3>[property:String fragmentShader]</h3>
 		<div>
-		Defines whether this material uses lighting; true to pass uniform data related to lighting to this shader
-		</div> 
+		Fragment shader GLSL code.  This is the actual code for the shader. In the example above, the *vertexShader* and *fragmentShader* code is extracted from the DOM; it could be passed as a string directly or loaded via AJAX instead.
+		</div>
 
-		<h3>[property:Boolean morphTargets]</h3>
+		<h3>[property:Number shading]</h3>
 		<div>
-		Defines whether the material uses morphTargets; true morphTarget attributes to this shader
-		</div> 
+		Define shading type, which determines whether normals are smoothed between vertices; possible values are [page:Materials THREE.SmoothShading] or [page:Materials THREE.FlatShading]. Default is THREE.SmoothShading.
+		</div>
 
-		<h3>[property:Boolean morphNormals]</h3>
-		<div>
-		Defines whether the material uses morphNormals; true to pass morphNormal attributes to this shader
-		</div> 
+		<h3>[property:Number linewidth]</h3>
+		<div>Controls line thickness; only effective if the material is attached to a [page:Line]. 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>
 
 		<h3>[property:Boolean wireframe]</h3>
 		<div>
 		Render geometry as wireframe (using GL_LINES instead of GL_TRIANGLES). Default is false (i.e. render as flat polygons).
-		</div> 
+		</div>
+
+		<h3>[property:Number wireframeLinewidth]</h3>
+		<div>Controls wireframe thickness; only effective if the material is attached to a [page:Mesh] and *wireframe* is true. 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>
+
+		<h3>[property:Boolean fog]</h3>
+		<div>Define whether the material color is affected by global fog settings; true to pass fog uniforms to the shader. Default is false.</div>
+
+		<h3>[property:Boolean lights]</h3>
+		<div>
+		Defines whether this material uses lighting; true to pass uniform data related to lighting to this shader
+		</div>
 
 		<h3>[property:Number vertexColors]</h3>
 		<div>
 		Define how the vertices are colored, by defining how the *colors* attribute gets populated. Possible values are [page:Materials THREE.NoColors], [page:Materials THREE.FaceColors] and [page:Materials THREE.VertexColors]. Default is THREE.NoColors.
 		</div>
-		
+
 		<h3>[property:Boolean skinning]</h3>
 		<div>
 		Define whether the material uses skinning; true to pass skinning attributes to the shader. Default is false.
-		</div> 
-
-		<h3>[property:Boolean fog]</h3>
-		<div>Define whether the material color is affected by global fog settings; true to pass fog uniforms to the shader. Default is false.</div>
-
+		</div>
 
-		<h3>[property:Number shading]</h3>
+		<h3>[property:Boolean morphTargets]</h3>
 		<div>
-		Define shading type, which determines whether normals are smoothed between vertices; possible values are [page:Materials THREE.SmoothShading] or [page:Materials THREE.FlatShading]. Default is THREE.SmoothShading.
-		</div> 
-
-		<h3>[property:Number linewidth]</h3>
-		<div>Controls line thickness; only effective if the material is attached to a [page:Line]. 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>
+		Defines whether the material uses morphTargets; true morphTarget attributes to this shader
+		</div>
 
-		<h3>[property:Number wireframeLinewidth]</h3>
-		<div>Controls wireframe thickness; only effective if the material is attached to a [page:Mesh] and *wireframe* is true. 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>
+		<h3>[property:boolean morphNormals]</h3>
+		<div>
+			Defines whether the material uses morphNormals. Set as true to pass morphNormal attributes from the [page:Geometry]
+			to the shader. Default is *false*.
+		</div>
 
 		<h3>[property:WebGLProgram program]</h3>
 		<div>
@@ -319,9 +326,9 @@
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo clone]()</h3>
+		<h3>[method:ShaderMaterial clone]()</h3>
 		<div>
-		Generates a shallow copy of this material. Note that the vertexShader and fragmentShader are copied <emph>by reference</emph>, as are the definitions of the *attributes*; this means that clones of the material will share the same compiled [page:WebGLProgram]. However, the *uniforms* are copied <emph>by value</emph>, which allows you to have different sets of uniforms for different copies of the material. 
+		Generates a shallow copy of this material. Note that the vertexShader and fragmentShader are copied <emph>by reference</emph>, as are the definitions of the *attributes*; this means that clones of the material will share the same compiled [page:WebGLProgram]. However, the *uniforms* are copied <emph>by value</emph>, which allows you to have different sets of uniforms for different copies of the material.
 		</div>
 
 		<h2>Source</h2>

+ 11 - 10
docs/api/materials/SpriteCanvasMaterial.html

@@ -11,18 +11,19 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">Create a material that can draw custom sprites using a 2d canvas.</div>
 
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo parameters])</h3>
+		<h3>[name]( [page:Object parameters] )</h3>
 		<div>
-		parameters -- todo
+		parameters is an object that can be used to set up the default properties
 		</div>
 		<div>
-		todo
+		color - the color of the sprite<br/>
+		program - the program used to draw the sprite
 		</div>
 
 
@@ -32,20 +33,20 @@
 
 		<h3>[property:Color color]</h3>
 		<div>
-		todo
-		</div> 
+		The color of the sprite. The material will set up the color for the context before calling the material's program.
+		</div>
 
 		<h2>Methods</h2>
 
 
 
-		<h3>[method:todo program]([page:todo context], [page:todo color])</h3>
+		<h3>[method:null program]([page:CanvasRenderingContext2D context], [page:Color color])</h3>
 		<div>
-		context -- todo <br />
-		color -- todo
+		context -- The canvas context <br />
+		color -- The color of the sprite
 		</div>
 		<div>
-		todo
+			Define a program that will use the context to draw the sprite.
 		</div>
 
 		<h2>Source</h2>

+ 13 - 45
docs/api/materials/SpriteMaterial.html

@@ -11,70 +11,38 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">A material for a [page:Sprite].</div>
 
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo parameters])</h3>
+		<h3>[name]( [page:Object parameters] )</h3>
 		<div>
-		parameters -- todo
+		parameters -- an object defining the the default properties
 		</div>
 		<div>
-		todo
+		color - color of the sprite<br/>
+		map - the texture map<br/>
+		rotation - the rotation of the sprite
+		fog - whether or not to use the scene fog<br/>
 		</div>
 
 
 		<h2>Properties</h2>
 
 
+		<h3>[property:Color color]</h3>
+		<div>The texture is multiplied by this color. The default is 0xffffff</div> 
 
 		<h3>[property:Texture map]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h3>[property:Vector2 uvScale]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h3>[property:boolean sizeAttenuation]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h3>[property:Color color]</h3>
-		<div>
-		todo
-		</div> 
+		<div>The texture map. Default is null.</div> 
 
-		<h3>[property:Vector2 uvOffset]</h3>
-		<div>
-		todo
-		</div> 
+		<h3>[property:Radians rotation]</h3>
+		<div>The rotation of the sprite in radians. Default is 0.</div>
 
 		<h3>[property:boolean fog]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h3>[property:boolean useScreenCoordinates]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h3>[property:boolean scaleByViewport]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h3>[property:Vector2 alignment]</h3>
-		<div>
-		todo
-		</div> 
-
+		<div>Whether or not this material affected by the scene's fog. Default is false</div>
 
 		<h2>Source</h2>
 

+ 4 - 4
docs/api/math/Box2.html

@@ -29,14 +29,14 @@
 
 
 
-		<h3>[property:Vector2 max]</h3>
+		<h3>[property:Vector2 min]</h3>
 		<div>
-		Upper (x, y) boundary of this box.
+		Lower (x, y) boundary of this box.
 		</div> 
 
-		<h3>[property:Vector2 min]</h3>
+		<h3>[property:Vector2 max]</h3>
 		<div>
-		Lower (x, y) boundary of this box.
+		Upper (x, y) boundary of this box.
 		</div> 
 
 		<h2>Methods</h2>

+ 5 - 5
docs/api/math/Box3.html

@@ -28,16 +28,16 @@
 
 
 
-		<h3>[property:Vector3 max]</h3>
-		<div>
-		Upper (x, y, z) boundary of this box.
-		</div> 
-
 		<h3>[property:Vector3 min]</h3>
 		<div>
 		Lower (x, y, z) boundary of this box.
 		</div>
 
+		<h3>[property:Vector3 max]</h3>
+		<div>
+		Upper (x, y, z) boundary of this box.
+		</div> 
+
 		<h2>Methods</h2>
 
 

+ 14 - 0
docs/api/math/Euler.html

@@ -91,6 +91,20 @@
     WARNING: this discards revolution information.
     </div>
 
+    <h3>[method:Euler setFromVector3]([page:Vector3 vector], [page:String order]) [page:Euler this]</h3>
+    <div>
+    vector -- [page:Vector3].
+    order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
+    </div>
+    <div>
+    Optionally Vector3 to the XYZ parameters of Euler, and order to the Euler's order property.
+    </div>
+
+    <h3>[method:Vector3 toVector3]()</h3>
+    <div>
+    Returns the Euler's XYZ properties as a Vector3.
+    </div>
+
     <h3>[method:Euler fromArray]([page:Array array]) [page:Euler this]</h3>
     <div>
     array -- [page:Array] of length 3 or 4. array[3] is an optional order argument.

+ 1 - 1
docs/api/math/Frustum.html

@@ -39,7 +39,7 @@
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo setFromMatrix]( [page:Matrix4 matrix] )</h3>
+		<h3>[method:Frustum setFromMatrix]( [page:Matrix4 matrix] )</h3>
 
 		<h3>[method:Boolean intersectsObject]( [page:Object3D object] )</h3>
 		<div>

+ 10 - 0
docs/api/math/Matrix4.html

@@ -71,6 +71,16 @@
 		Copies the translation component of the supplied matrix *m* into this matrix translation component.
 		</div>
 
+		<h3>[method:Matrix4 makeBasis]( [page:Vector3 xAxis], [page:Vector3 zAxis], [page:Vector3 zAxis] ) [page:Matrix4 this]</h3>
+		<div>
+		Creates the basis matrix consisting of the three provided axis vectors.  Returns the current matrix.
+		</div>
+
+		<h3>[method:Matrix4 extractBasis]( [page:Vector3 xAxis], [page:Vector3 zAxis], [page:Vector3 zAxis] ) [page:Matrix4 this]</h3>
+		<div>
+		Extracts basis of into the three axis vectors provided.  Returns the current matrix.
+		</div>
+
 		<h3>[method:Matrix4 extractRotation]( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
 		<div>
 		Extracts the rotation of the supplied matrix *m* into this matrix rotation component.

+ 1 - 1
docs/api/math/Ray.html

@@ -165,7 +165,7 @@
 		Return whether or not this [page:Ray] intersects with the [page:Sphere].
 		</div>
 
-		<h3>[method:todo recast]([page:Float t])</h3>
+		<h3>[method:Ray recast]([page:Float t])</h3>
 		<div>
 		t -- The distance along the [page:Ray] to interpolate.
 		</div>

+ 10 - 6
docs/api/math/Spline.html

@@ -27,30 +27,34 @@
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo initFromArray]( [page:Array a] )</h3>
+		<h3>[method:null initFromArray]( [page:Array a] )</h3>
 		<div>
 		a — array of triplets containing x, y, z coordinates<br />
 		</div>
 		<div>Initialises using the data in the array as a series of points. Each value in *a* must be another array with three values, where a[n] is v, the value for the *nth* point, and v[0], v[1] and v[2] are the x, y and z coordinates of that point n, respectively.
 		</div>
 
-		<h3>[method:todo getPoint]( [page:Integer k] )</h3>
+		<h3>[method:Vector3 getPoint]( [page:Integer k] )</h3>
 		<div>
 		k — point index
 		</div>
 		<div>Return the interpolated point at *k*.</div>
 		
-		<h3>[method:todo getControlPointsArray]( )</h3>
+		<h3>[method:Array getControlPointsArray]( )</h3>
 		<div>Returns an array with triplets of x, y, z coordinates that correspond to the current control points.
 		</div>
 		
-		<h3>[method:todo getLength]( [page:Integer nSubDivisions] )</h3>
+		<h3>[method:Object getLength]( [page:Integer nSubDivisions] )</h3>
 		<div>
 		nSubDivisions — number of subdivisions between control points. Default is *100*.
 		</div>
-		<div>Returns the length of the spline when using nSubDivisions.</div>
+		<div>
+			Returns an object with the two properties. The property .[page:Number total]</strong> contains
+			the length of the spline when using nSubDivisions. The property .[page:Array chunkLength]
+			contains an array with the total length from the beginning of the spline to the end of that chunk.
+		</div>
 		
-		<h3>[method:todo reparametrizeByArcLength]( [page:Float samplingCoef] )</h3>
+		<h3>[method:null reparametrizeByArcLength]( [page:Float samplingCoef] )</h3>
 		<div>
 		samplingCoef — how many intermediate values to use between spline points
 		</div>

+ 2 - 2
docs/api/math/Triangle.html

@@ -35,12 +35,12 @@
 		The first [page:Vector3] of the triangle.
 		</div>
 		
-		<h3>[property:Vector3 c]</h3>
+		<h3>[property:Vector3 b]</h3>
 		<div>
 		The second [page:Vector3] of the triangle.
 		</div>
 
-		<h3>[property:Vector3 b]</h3>
+		<h3>[property:Vector3 c]</h3>
 		<div>
 		The third [page:Vector3] of the triangle.
 		</div>

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

@@ -234,7 +234,7 @@
  
 		</div>
 
-		<h3>[method:todo setComponent]([page:Integer index], [page:Float value])</h3>
+		<h3>[method:null setComponent]([page:Integer index], [page:Float value])</h3>
 		<div>
 		index -- [page:Integer] 0 - 3 <br />
 		value -- [page:Float]

+ 2 - 2
docs/api/objects/Mesh.html

@@ -46,7 +46,7 @@
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo getMorphTargetIndexByName]( [page:String name] )</h3>
+		<h3>[method:Integer getMorphTargetIndexByName]( [page:String name] )</h3>
 		<div>
 		name — a morph target name<br />
 		</div>
@@ -55,7 +55,7 @@
 		</div>
 
 
-		<h3>[method:todo updateMorphTargets]()</h3>
+		<h3>[method:null updateMorphTargets]()</h3>
 		<div>
 		Updates the morphtargets to have no influence on the object.
 		</div>

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

@@ -16,7 +16,6 @@
 
 		<h2>Constructor</h2>
 
-
 		<h3>[name]( [page:Geometry geometry], [page:Material material] )</h3>
 
 		<div>
@@ -24,6 +23,7 @@
 		material — An instance of [page:Material] (optional).
 		</div>
 
+
 		<h2>Properties</h2>
 
 		<h3>[property:Geometry geometry]</h3>
@@ -34,20 +34,18 @@
 
 		<div>An instance of [page:Material], defining the object's appearance. Default is a [page:PointCloudMaterial] with randomised colour.</div>
 
-		<h3>[property:boolean sortParticles]</h3>
-		<div>
-		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>[method:todo clone]()</h3>
+		<h3>[method:PointCloud 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]
+
 	</body>
 </html>

+ 1 - 1
docs/api/objects/SkinnedMesh.html

@@ -54,7 +54,7 @@
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo pose]()</h3>
+		<h3>[method:null pose]()</h3>
 		<div>
 		This method sets the skinnedmesh in the rest pose.
 		</div>

+ 1 - 1
docs/api/objects/Sprite.html

@@ -43,7 +43,7 @@
 -
            	<h2>Methods</h2>
 
-                <h3>[method:todo clone]()</h3>
+                <h3>[method:Sprite clone]()</h3>
                 <div>
                 This creates a new clone of the sprite.
                 </div>

+ 81 - 69
docs/api/renderers/CanvasRenderer.html

@@ -9,22 +9,36 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">The Canvas renderer displays your beautifully crafted scenes <em>not</em> using WebGL,
-                  but draws it using the (slower) <a href="http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas/">Canvas 2D Context</a> API.</div>
-		<div class="desc">This renderer can be a nice fallback from [page:WebGLRenderer] for simple scenes:</div>
-		<code>
-		if (window.WebGLRenderingContext)
-			renderer = new THREE.WebGLRenderer();
-		else
-			renderer = new THREE.CanvasRenderer();
-		</code>
 		<div class="desc">
+			The Canvas renderer displays your beautifully crafted scenes <em>not</em> using WebGL, but draws it using the (slower) <a href="http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas/">Canvas 2D Context</a> API.<br /><br />
+			This renderer can be a nice fallback from [page:WebGLRenderer] for simple scenes:
+
+			<code>
+			function webglAvailable() {
+				try {
+					var canvas = document.createElement( 'canvas' );
+					return !!( window.WebGLRenderingContext && (
+						canvas.getContext( 'webgl' ) ||
+						canvas.getContext( 'experimental-webgl' ) )
+					);
+				} catch ( e ) {
+					return false;
+				}
+			}
+
+			if ( webglAvailable() ) {
+				renderer = new THREE.WebGLRenderer();
+			} else {
+				renderer = new THREE.CanvasRenderer();
+			}
+			</code>
+
 			Note: both WebGLRenderer and CanvasRenderer are embedded in the web page using an HTML5 &lt;canvas&gt; tag.
-			The "Canvas" in CanvasRenderer means it uses Canvas 2D instead of WebGL.<br />
+			The "Canvas" in CanvasRenderer means it uses Canvas 2D instead of WebGL.<br /><br />
+
 			Don't confuse either CanvasRenderer with the SoftwareRenderer example, which simulates a screen buffer in a Javascript array.
 		</div>
 
-
 		<h2>Constructor</h2>
 
 
@@ -32,114 +46,112 @@
         <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>
-		canvas — A [page:Canvas] where the renderer draws its output.<br />
-		devicePixelRatio — The device its pixelRatio.<br />
+		canvas — A [page:Canvas] where the renderer draws its output.
 		</div>
 
 
 		<h2>Properties</h2>
 
+    <h3>[property:Object info]</h3>
 
-        <h3>[property:Object info]</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>
-		<ul>
-			<li>render:
-				<ul>
-					<li>vertices</li>
-					<li>faces</li>
-				</ul>
-			</li>
-		</ul>
+			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>
+			<ul>
+				<li>render:
+					<ul>
+						<li>vertices</li>
+						<li>faces</li>
+					</ul>
+				</li>
+			</ul>
 		</div>
 
-        <h3>[property: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>[property:DOMElement domElement]</h3>
 
-		<h3>[property:number devicePixelRatio]</h3>
 		<div>
-		The pixel ration of the devices.
-		</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>[property:Boolean autoClear]</h3>
 		<div>
-        Defines whether the renderer should automatically clear its output before rendering.
-        </div>
+      Defines whether the renderer should automatically clear its output before rendering.
+    </div>
 
 		<h3>[property:Boolean sortObjects]</h3>
 		<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>
+      Defines whether the renderer should sort objects. Default is true.<br />
+      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>[property:boolean sortElements]</h3>
 		<div>
-		Defines whether the renderer should sort the face of each object. Default is true.
-		</div> 
-
-		<h2>Methods</h2>
+			Defines whether the renderer should sort the face of each object. Default is true.
+		</div>
 
 
-		<h3>[method:number getMaxAnisotropy]()</h3>
-		<div>
-		This returns the anisotropy level of the textures.
-		</div>
+		<h2>Methods</h2>
 
-		<h3>[method:todo render]( [page:Scene scene], [page:Camera camera])</h3>
+		<h3>[method:null render]([page:Scene scene], [page:Camera camera])</h3>
 		<div>
-		scene -- The scene to render. <br />
-		camera -- the camera to view the scene.
+			scene -- The scene to render. <br />
+			camera -- the camera to view the scene.
 		</div>
 		<div>
         Render a scene using a camera.
 		</div>
 
-		<h3>[method:todo clear]()</h3>
+		<h3>[method:null clear]()</h3>
 		<div>
-		Tells the renderer to clear its color drawing buffer with the clearcolor.
+			Tells the renderer to clear its color drawing buffer with the clearcolor.
 		</div>
 
-		<h3>[method:todo setClearColor]([page:Color color], [page:number alpha])</h3>
+		<h3>[method:null setClearColor]([page:Color color], [page:number alpha])</h3>
 		<div>
-		color -- The color to clear the canvas with. <br />
-		alpha -- The alpha channel to clear the canvas with.
+			color -- The color to clear the canvas with. <br />
+			alpha -- The alpha channel to clear the canvas with.
 		</div>
 		<div>
-		This set the clearColor and the clearAlpha.
+			This set the clearColor and the clearAlpha.
 		</div>
 
-		<h3>[method:todo setFaceCulling]()</h3>
+
+		<h3>[method:null setSize]([page:Number width], [page:Number height])</h3>
 		<div>
-		Empty function to keep compability with [page:WebglRenderer].
+			width -- The width of the drawing canvas. <br />
+			height -- The height of the drawing canvas.
 		</div>
-
-		<h3>[method:todo supportsVertexTextures]()</h3>
 		<div>
-		Empty function to keep compability with [page:WebglRenderer].
+			This set the size of the drawing canvas and if updateStyle is set, then the css of the canvas is updated too.
 		</div>
 
-		<h3>[method:todo setSize]([page:Number width], [page:Number height], [page:boolean updateStyle])</h3>
+		<h3>[method:null setClearColorHex]([page:number hex], [page:number alpha])</h3>
 		<div>
-		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.
+			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>
-		This set the size of the drawing canvas and if updateStyle is set, then the css of the canvas is updated too.
+			This set the clearColor and the clearAlpha.
 		</div>
 
-		<h3>[method:todo setClearColorHex]([page:number hex], [page:number alpha])</h3>
+		<h3>[method:number getClearColorHex]()</h3>
 		<div>
-		hex -- The the hexadecimal value of the color to clear the canvas with. <br />
-        alpha -- The alpha channel to clear the canvas with.
+			Returns the [page:number hex] color.
 		</div>
+
+		<h3>[method:number getClearAlpha]()</h3>
+		<div>
+			Returns the alpha value.
+		</div>
+
+		<h2>Empty Methods to Maintain Compatibility with [page:WebglRenderer]</h2>
 		<div>
-		This set the clearColor and the clearAlpha.
+			[method:null clearColor]()<br/>
+			[method:null clearDepth]()<br/>
+			[method:null clearStencil]()<br/>
+			[method:null setFaceCulling]()<br/>
+			[method:null supportsVertexTextures]()<br/>
+			[method:number getMaxAnisotropy]() - returns 1 <br/>
 		</div>
 
 		<h2>Source</h2>

+ 84 - 1
docs/api/renderers/WebGLRenderTarget.html

@@ -19,7 +19,7 @@
 		<div>
 		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.
+		options -- The options sets the properties of the render target.
 		</div>
 		<div>
 		Creates a new renderTarget with a certain width and height.
@@ -27,9 +27,92 @@
 
 		<h2>Properties</h2>
 
+		<h3>[property: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>[property: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>[property: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>[property: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>[property: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>[property:Vector2 repeat]</h3>
+		<div>
+		How many times the texture is repeated across the surface, in each direction U and V.
+		</div>
+
+		<h3>[property: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>[property: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>[property: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>[property:boolean depthBuffer]</h3>
+		<div>
+		Renders to the depth buffer. Default is true.
+		</div>
+		
+		<h3>[property:boolean stencilBuffer]</h3>
+		<div>
+		Renders to the stencil buffer. Default is true.
+		</div>
+
+		<h3>[property:boolean generateMipmaps]</h3>
+		<div>
+		Whether to generate mipmaps (if possible) for a texture. True by default.
+		</div>
+
+		<h3>[property:WebGLRenderTarget shareDepthFrom]</h3>
+		<div>
+		Shares the depth from another WebGLRenderTarget. Default is null.
+		</div>
+
+		
 		<h2>Methods</h2>
+		
+		<h3>[method:null setSize]( [page:Number width], [page:Number height] )</h3>
+		<div>
+		Sets the size of the renderTarget.
+		</div>
+		
+		<h3>[method:RenderTarget clone]()</h3>
+		<div>
+		Creates a copy of the render target.
+		</div>
+		
+		<h3>[method:null dispose]()</h3>
+		<div>
+		Dispatches a dispose event.
+		</div>
+		
+		
+		
+		
 
 		<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
 

+ 19 - 11
docs/api/renderers/WebGLRenderTargetCube.html

@@ -7,34 +7,42 @@
 		<link type="text/css" rel="stylesheet" href="../../page.css" />
 	</head>
 	<body>
+		[page:WebGLRenderTarget] &rarr;
+		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">[page:CubeCamera] uses this as its [page:WebGLRenderTarget]</div>
+
+		<h2>Examples</h2>
+		
+		<div>See [page:CubeCamera] for examples.</div>
 
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo width], [page:todo height], [page:todo options])</h3>
-		<div>
-		width -- todo <br />
-		height -- todo <br />
-		options -- todo
-		</div>
+		<h3>[name]([page:Number width], [page:Number height], [page:Object options])</h3>
 		<div>
-		todo
+		width -- The width of the renderTarget. <br />
+		height -- The height of the renderTarget. <br />
+		options -- The options sets the properties of the render target.
 		</div>
 
 
-		<h3>[name]()</h3>
-
-
 		<h2>Properties</h2>
 
+		<h3>[property:integer activeCubeFace]</h3>
+		<div>
+		The activeCubeFace property corresponds to a cube side (PX 0, NX 1, PY 2, NY 3, PZ 4, NZ 5) and is
+		used and set internally by the [page:CubeCamera].
+		</div>
+
+		<h3>See [page:WebGLRenderTarget] for inherited properties</h3>
 
 
 		<h2>Methods</h2>
 
+		<h3>See [page:WebGLRenderTarget] for inherited methods</h3>
 
 
 		<h2>Source</h2>

+ 27 - 52
docs/api/renderers/WebGLRenderer.html

@@ -150,47 +150,42 @@
 		<h3>[property:ShadowMapPlugin shadowMapPlugin]</h3>
 		<div>
 		This contains the reference to the shadowMapPlugin.
-		</div> 
-
+		</div>
 
-		<h3>[property:number devicePixelRatio]</h3>
-		<div>
-		The pixel ration of the devices. 
-		</div> 
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo getContext]()</h3>
+		<h3>[method:WebGLRenderingContext getContext]()</h3>
 		<div>
 		Return the WebGL context.
 		</div>
 
-		<h3>[method:todo supportsVertexTextures]()</h3>
+		<h3>[method:Boolean supportsVertexTextures]()</h3>
 		<div>
 		Return a [page:Boolean] true if the context supports vertex textures.
 		</div>
 
 
-		<h3>[method:todo setSize]( [page:Integer width], [page:Integer height] )</h3>
+		<h3>[method:null setSize]( [page:Integer width], [page:Integer height] )</h3>
 		<div>Resizes the output canvas to (width, height), and also sets the viewport to fit that size, starting in (0, 0).</div>
 
-		<h3>[method:todo setViewport]( [page:Integer x], [page:Integer y], [page:Integer width], [page:Integer height] )</h3>
+		<h3>[method:null setViewport]( [page:Integer x], [page:Integer y], [page:Integer width], [page:Integer height] )</h3>
 		<div>Sets the viewport to render from (x, y) to (x + width, y + height).</div>
 
 
-		<h3>[method:todo setScissor]( [page:Integer x], [page:Integer y], [page:Integer width], [page:Integer height] )</h3>
+		<h3>[method:null setScissor]( [page:Integer x], [page:Integer y], [page:Integer width], [page:Integer height] )</h3>
 		<div>Sets the scissor area from (x, y) to (x + width, y + height).</div>
 
-		<h3>[method:todo enableScissorTest]( [page:Boolean enable] )</h3>
+		<h3>[method:null enableScissorTest]( [page:Boolean enable] )</h3>
 		<div>Enable the scissor test. When this is enabled, only the pixels within the defined scissor area will be affected by further renderer actions.</div>
 
-		<h3>[method:todo setClearColor]( [page:Color color], [page:Float alpha] )</h3>
+		<h3>[method:null setClearColor]( [page:Color color], [page:Float alpha] )</h3>
 		<div>Sets the clear color and opacity.</div>
 
 		<code>// Creates a renderer with red background
 		var renderer = new THREE.WebGLRenderer();
-		renderer.setSize(200, 100);
-		renderer.setClearColor(0xff0000, 1);
+		renderer.setSize( 200, 100 );
+		renderer.setClearColor( 0xff0000 );
 		</code>
 
 		<h3>[method:Color getClearColor]()</h3>
@@ -199,11 +194,11 @@
 		<h3>[method:Float getClearAlpha]()</h3>
 		<div>Returns a [page:Float float] with the current clear alpha. Ranges from 0 to 1.</div>
 
-		<h3>[method:todo clear]( [page:Boolean color], [page:Boolean depth], [page:Boolean stencil] )</h3>
+		<h3>[method:null clear]( [page:Boolean color], [page:Boolean depth], [page:Boolean stencil] )</h3>
 		<div>Tells the renderer to clear its color, depth or stencil drawing buffer(s).</div>
 		<div>Arguments default to true.</div>
 
-		<h3>[method:todo renderBufferImmediate]( [page:Object3D object], [page:shaderprogram program], [page:Material shading] )</h3>
+		<h3>[method:null renderBufferImmediate]( [page:Object3D object], [page:shaderprogram program], [page:Material shading] )</h3>
 		<div>object — an instance of [page:Object3D]]<br />
 		program — an instance of shaderProgram<br />
 		shading — an instance of Material<br />
@@ -213,45 +208,25 @@
 		</div>
 
 
-		<h3>[method:todo renderBufferDirect]( [page:Camera camera], [page:Array lights], [page:Fog fog], [page:Material material], [page:Object geometryGroup], [page:Object3D object] )</h3>
+		<h3>[method:null 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>[method:todo renderBuffer]( [page:Camera camera], [page:Array lights], [page:Fog fog], [page:Material material], [page:Object geometryGroup], [page:Object3D object] )</h3>
+		<h3>[method:null 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>[method:todo render]( [page:Scene scene], [page:Camera camera], [page:WebGLRenderTarget renderTarget], [page:Boolean forceClear] )</h3>
+		<h3>[method:null 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 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>[method:todo renderImmediateObject]( camera, lights, fog, material, object )</h3>
+		<h3>[method:null renderImmediateObject]( camera, lights, fog, material, object )</h3>
 		<div>Renders an immediate Object using a camera.</div>
 
 
-		<h3>[method:todo initWebGLObjects]( [page:Scene scene] )</h3>
-		<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>[method:todo 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>[method:todo setFaceCulling]( cullFace, frontFace )</h3>
+		<h3>[method:null setFaceCulling]( cullFace, frontFace )</h3>
 		<div>
 		[page:String cullFace] —- "back", "front", "front_and_back", or false.<br />
 		[page:String frontFace] —- "ccw" or "cw<br />
@@ -260,7 +235,7 @@
 		<div>If cullFace is false, culling will be disabled.</div>
 
 
-		<h3>[method:todo setDepthTest]( [page:boolean depthTest] )</h3>
+		<h3>[method:null 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>
@@ -268,7 +243,7 @@
 		This sets, based on depthTest, whether or not the depth data needs to be tested against the depth buffer.
 		</div>
 
-		<h3>[method:todo setDepthWrite]( [page:boolean depthWrite] )</h3>
+		<h3>[method:null setDepthWrite]( [page:boolean depthWrite] )</h3>
 		<div>
 		depthWrite -- The boolean to decide if depth of a fragment needs to be kept. <br />
 		</div>
@@ -277,7 +252,7 @@
 		</div>
 
 
-		<h3>[method:todo setBlending]( [page:number blending], [page:number blendEquation], [page:number blendSrc], [page:number blendDst] )</h3>
+		<h3>[method:null setBlending]( [page:number blending], [page:number blendEquation], [page:number blendSrc], [page:number blendDst] )</h3>
 		<div>
 		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 />
@@ -287,8 +262,8 @@
 		<div>
 		This method sets the correct blending.
 		</div>
-		
-		<h3>[method:todo setTexture]( [page:Texture texture], [page:number slot] )</h3>
+
+		<h3>[method:null setTexture]( [page:Texture texture], [page:number slot] )</h3>
 		<div>
 		texture -- The [page:Texture texture] that needs to be set.<br />
 		slot -- The number indicating which slot should be used by the texture.
@@ -296,8 +271,8 @@
 		<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>[method:todo setRenderTarget]( [page:WebGLRenderTarget renderTarget] )</h3>
+
+		<h3>[method:null setRenderTarget]( [page:WebGLRenderTarget renderTarget] )</h3>
 		<div>
 		renderTarget -- The [page:WebGLRenderTarget renderTarget] that needs to be activated.<br />
 		</div>
@@ -320,9 +295,9 @@
 		This gets the precision used by the shaders. It returns "highp","mediump" or "lowp".
 		</div>
 
-		<h3>[method:todo setMaterialFaces]([page:Material material])</h3>
+		<h3>[method:null setMaterialFaces]([page:Material material])</h3>
 		<div>
-		material -- The [page:Material material] with side that shouldn't be culled.  
+		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.
@@ -338,7 +313,7 @@
 		This method returns true if the webgl implementation supports float textures.
 		</div>
 
-		<h3>[method:todo clearTarget]([page:WebGLRenderTarget renderTarget], [page:boolean color], [page:boolean depth], [page:boolean stencil])</h3>
+		<h3>[method:null clearTarget]([page:WebGLRenderTarget renderTarget], [page:boolean color], [page:boolean depth], [page:boolean stencil])</h3>
 		<div>
 		renderTarget -- The [page:WebGLRenderTarget renderTarget] that needs to be cleared.<br />
 		color -- If set, then the color gets cleared. <br />

+ 1 - 1
docs/api/renderers/webgl/WebGLProgram.html

@@ -31,7 +31,7 @@
 		// = inverse transpose of modelViewMatrix
 		uniform mat3 normalMatrix;
 
-		// = camera.position
+		// = camera position in world space
 		uniform vec3 cameraPosition;
 		</code>
 		<code>

+ 1 - 1
docs/api/renderers/webgl/plugins/LensFlarePlugin.html

@@ -22,7 +22,7 @@
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo render]([page:Scene scene], [page:Camera camera], [page:Number viewportWidth], [page:Number viewportHeight])</h3>
+		<h3>[method:null render]([page:Scene scene], [page:Camera camera], [page:Number viewportWidth], [page:Number viewportHeight])</h3>
 		<div>
 		scene -- The scene to render. <br />
 		camera -- The camera to render. <br />

+ 1 - 1
docs/api/renderers/webgl/plugins/ShadowMapPlugin.html

@@ -22,7 +22,7 @@
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo render]([page:Scene scene], [page:Camera camera])</h3>
+		<h3>[method:null render]([page:Scene scene], [page:Camera camera])</h3>
 		<div>
 		scene -- The scene to render. <br />
 		camera -- The camera to render.

+ 1 - 1
docs/api/renderers/webgl/plugins/SpritePlugin.html

@@ -22,7 +22,7 @@
 
 		<h2>Methods</h2>
 
-		<h3>[method:todo render]([page:Scene scene], [page:Camera camera])</h3>
+		<h3>[method:null render]([page:Scene scene], [page:Camera camera])</h3>
 		<div>
 		scene -- The scene to render. <br />
 		camera -- The camera to render.

+ 12 - 1
docs/api/textures/CompressedTexture.html

@@ -26,7 +26,7 @@
 		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 />
+		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; and THREE.SphericalReflectionMapping, a spherical reflection map projection.<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 />
@@ -39,6 +39,17 @@
 
 		<h2>Properties</h2>
 
+		<h3>[property:boolean flipY]</h3>
+		
+		<div>
+			False by default. Flipping textures does not work for compressed textures.
+		</div>
+
+		<h3>[property:boolean generateMipmaps]</h3>
+		
+		<div>
+			False by default. Mipmaps can't be generated for compressed textures
+		</div>
 
 
 		<h2>Methods</h2>

+ 1 - 1
docs/api/textures/DataTexture.html

@@ -26,7 +26,7 @@
 		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 />
+		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; and THREE.SphericalReflectionMapping, a spherical reflection map projection.<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 />

+ 6 - 2
docs/api/textures/Texture.html

@@ -40,7 +40,7 @@
 
 		<h3>[property: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.
+		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; and THREE.SphericalReflectionMapping, a spherical reflection map projection.
 		</div>
 
 		<h3>[property:number wrapS]</h3>
@@ -52,6 +52,10 @@
 		<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>
+		
+		<div>
+		NOTE: tiling of images in textures only functions if image dimensions are powers of two (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...) in terms of pixels. Individual dimensions need not be equal, but each must be a power of two. This is a limitation of WebGL, not Three.js.
+		</div>
 
 		<h3>[property:number magFilter]</h3>
 		<div>
@@ -105,7 +109,7 @@
 
 		<h3>[property:boolean flipY]</h3>
 		<div>
-		False by default, set this to true if the texture needs to be flipped vertically.
+		True by default. Flips the image's Y axis to match the WebGL texture coordinate space.
 		</div>
 
 		<h3>[property:array mipmaps]</h3>

+ 12 - 6
docs/list.js

@@ -19,6 +19,7 @@ var list = {
 
 		"Cameras": [
 			[ "Camera", "api/cameras/Camera" ],
+			[ "CubeCamera", "api/cameras/CubeCamera" ],
 			[ "OrthographicCamera", "api/cameras/OrthographicCamera" ],
 			[ "PerspectiveCamera", "api/cameras/PerspectiveCamera" ]
 		],
@@ -46,15 +47,25 @@ var list = {
 
 
 		"Loaders": [
+			[ "BabylonLoader", "api/loaders/BabylonLoader" ],
 			[ "BufferGeometryLoader", "api/loaders/BufferGeometryLoader" ],
 			[ "Cache", "api/loaders/Cache" ],
+			[ "ColladaLoader", "api/loaders/ColladaLoader" ],
+			[ "glTFLoader", "api/loaders/glTFLoader" ],
 			[ "ImageLoader", "api/loaders/ImageLoader" ],
 			[ "JSONLoader", "api/loaders/JSONLoader" ],
 			[ "Loader", "api/loaders/Loader" ],
 			[ "LoadingManager", "api/loaders/LoadingManager" ],
 			[ "MaterialLoader", "api/loaders/MaterialLoader" ],
+			[ "MTLLoader", "api/loaders/MTLLoader" ],
+			[ "OBJLoader", "api/loaders/OBJLoader" ],
+			[ "OBJMTLLoader", "api/loaders/OBJMTLLoader" ],
 			[ "ObjectLoader", "api/loaders/ObjectLoader" ],
+			[ "PDBLoader", "api/loaders/PDBLoader" ],
+			[ "SVGLoader", "api/loaders/SVGLoader" ],
+			[ "SceneLoader", "api/loaders/SceneLoader" ],
 			[ "TextureLoader", "api/loaders/TextureLoader" ],
+			[ "TGALoader", "api/loaders/TGALoader" ],
 			[ "XHRLoader", "api/loaders/XHRLoader" ]
 		],
 
@@ -159,12 +170,6 @@ var list = {
 			[ "AnimationMorphTarget", "api/extras/animation/AnimationMorphTarget" ]
 		],
 
-		"Extras / Cameras": [
-			[ "CombinedCamera", "api/extras/cameras/CombinedCamera" ],
-			[ "CubeCamera", "api/extras/cameras/CubeCamera" ]
-		],
-
-		
 		"Extras / Core": [
 			[ "Curve", "api/extras/core/Curve" ],
 			[ "CurvePath", "api/extras/core/CurvePath" ],
@@ -233,6 +238,7 @@ var list = {
 		],
 
 		"Examples" : [
+			[ "CombinedCamera", "api/examples/cameras/CombinedCamera" ],
 			[ "LookupTable", "api/examples/Lut" ]
 
 		]

+ 4 - 4
docs/manual/introduction/Creating-a-scene.html

@@ -9,13 +9,13 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div>The goal of this section is to give a brief introduction to Three.js. We will start by setting up a scene, with a spinning cube. A working example is provided at the bottom of the page, if you get stuck, and need help.</div>
+		<div>The goal of this section is to give a brief introduction to Three.js. We will start by setting up a scene, with a spinning cube. A working example is provided at the bottom of the page in case you get stuck and need help.</div>
 
 		<h2>What is Three.js?</h2>
 
-		<div>If you're reading this, you probably have some understanding of what Three.js is, and what it helps you with, but let's try to describe it briefly anyway.</div>
+		<div>Let's try to describe it briefly:</div>
 
-		<div>Three.js is a library that makes WebGL - 3D in the browser - very easy. While a simple cube in raw WebGL would turn out hundreds of lines of Javascript and shader code, a Three.js equivalent is only a fraction of that.</div>
+		<div>Three.js is a library that makes WebGL - 3D in the browser - easy to use. While a simple cube in raw WebGL would turn out hundreds of lines of Javascript and shader code, a Three.js equivalent is only a fraction of that.</div>
 
 		<h2>Before we start</h2>
 		<div>Before you can use Three.js, you need somewhere to display it. Save the following HTML to a file on your computer, along with a copy of <a href="http://threejs.org/build/three.min.js">three.min.js</a> in the js/ directory, and open it in your browser.</div>
@@ -53,7 +53,7 @@
 		document.body.appendChild( renderer.domElement );
 		</code>
 
-		<div>Let's take a moment to explain what's going on here. We have now set up the scene, our camera and the renderer. There are a few different cameras in Three.js, but we'll go more into that later. For now, let's use a PerspectiveCamera. The first attribute is the <strong>field of view</strong>.</div>
+		<div>Let's take a moment to explain what's going on here. We have now set up the scene, our camera and the renderer. There are a few different cameras in Three.js. For now, let's use a PerspectiveCamera. The first attribute is the <strong>field of view</strong>.</div>
 
 		<div>The second one is the <strong>aspect ratio</strong>. You almost always want to use the width of the element divided by the height, or you'll get the same result as when you play old movies on a widescreen TV - the image looks squished.</div>
 

+ 5 - 1
docs/page.css

@@ -66,7 +66,11 @@ code {
 	overflow: auto;
 }
 
-
+iframe {
+	width: 100%;
+	height: 420px;
+	border:0;
+}
 
 th {
 	padding: 10px;

+ 535 - 0
docs/scenes/js/material.js

@@ -0,0 +1,535 @@
+/**
+ * @author TatumCreative (Greg Tatum) / http://gregtatum.com/
+ */
+
+var constants = {
+
+	combine: {
+
+		"THREE.MultiplyOperation" : THREE.MultiplyOperation,
+		"THREE.MixOperation" : THREE.MixOperation,
+		"THREE.AddOperation" : THREE.AddOperation
+
+	},
+
+	side : {
+
+		"THREE.FrontSide" : THREE.FrontSide,
+		"THREE.BackSide" : THREE.BackSide,
+		"THREE.DoubleSide" : THREE.DoubleSide
+
+	},
+
+	shading : {
+
+		"THREE.NoShading" : THREE.NoShading,
+		"THREE.FlatShading" : THREE.FlatShading,
+		"THREE.SmoothShading" : THREE.SmoothShading
+
+	},
+
+	colors : {
+
+		"THREE.NoColors" : THREE.NoColors,
+		"THREE.FaceColors" : THREE.FaceColors,
+		"THREE.VertexColors" : THREE.VertexColors
+
+	},
+
+	blendingMode : {
+
+		"THREE.NoBlending" : THREE.NoBlending,
+		"THREE.NormalBlending" : THREE.NormalBlending,
+		"THREE.AdditiveBlending" : THREE.AdditiveBlending,
+		"THREE.SubtractiveBlending" : THREE.SubtractiveBlending,
+		"THREE.MultiplyBlending" : THREE.MultiplyBlending,
+		"THREE.CustomBlending" : THREE.CustomBlending
+
+	},
+
+	equations : {
+
+		"THREE.AddEquation" : THREE.AddEquation,
+		"THREE.SubtractEquation" : THREE.SubtractEquation,
+		"THREE.ReverseSubtractEquation" : THREE.ReverseSubtractEquation
+
+	},
+
+	destinationFactors : {
+
+		"THREE.ZeroFactor" : THREE.ZeroFactor,
+		"THREE.OneFactor" : THREE.OneFactor,
+		"THREE.SrcColorFactor" : THREE.SrcColorFactor,
+		"THREE.OneMinusSrcColorFactor" : THREE.OneMinusSrcColorFactor,
+		"THREE.SrcAlphaFactor" : THREE.SrcAlphaFactor,
+		"THREE.OneMinusSrcAlphaFactor" : THREE.OneMinusSrcAlphaFactor,
+		"THREE.DstAlphaFactor" : THREE.DstAlphaFactor,
+		"THREE.OneMinusDstAlphaFactor" : THREE.OneMinusDstAlphaFactor
+
+	},
+
+	sourceFactors : {
+
+		"THREE.DstColorFactor" : THREE.DstColorFactor,
+		"THREE.OneMinusDstColorFactor" : THREE.OneMinusDstColorFactor,
+		"THREE.SrcAlphaSaturateFactor" : THREE.SrcAlphaSaturateFactor
+
+	}
+
+}
+
+function getObjectsKeys( obj ) {
+
+	var keys = [];
+
+	for ( var key in obj ) {
+
+		if ( obj.hasOwnProperty( key ) ) {
+
+			keys.push( key );
+
+		}
+
+	}
+
+	return keys;
+}
+
+var envMaps = (function () {
+
+	var path = "../../examples/textures/cube/SwedishRoyalCastle/";
+	var format = '.jpg';
+	var urls = [
+		path + 'px' + format, path + 'nx' + format,
+		path + 'py' + format, path + 'ny' + format,
+		path + 'pz' + format, path + 'nz' + format
+	];
+
+	var textureCube = THREE.ImageUtils.loadTextureCube( urls, THREE.CubeRefractionMapping );
+	var reflectionCube = THREE.ImageUtils.loadTextureCube( urls );
+	reflectionCube.format = THREE.RGBFormat;
+
+	var refractionCube = new THREE.Texture( reflectionCube.image, THREE.CubeRefractionMapping );
+	reflectionCube.format = THREE.RGBFormat;
+
+	return {
+		none : null,
+		reflection : reflectionCube,
+		refraction : refractionCube
+	};
+
+})();
+
+var envMapKeys = getObjectsKeys( envMaps );
+
+var textureMaps = (function () {
+
+	return {
+		none : null,
+		grass : THREE.ImageUtils.loadTexture( "../../examples/textures/terrain/grasslight-thin.jpg" )
+	};
+
+})();
+
+var textureMapKeys = getObjectsKeys( textureMaps );
+
+function generateVertexColors ( geometry ) {
+
+	for ( var i=0, il = geometry.faces.length; i < il; i++ ) {
+
+		geometry.faces[i].vertexColors.push( new THREE.Color().setHSL(
+			i / il * Math.random(),
+			0.5,
+			0.5
+		) );
+		geometry.faces[i].vertexColors.push( new THREE.Color().setHSL(
+			i / il * Math.random(),
+			0.5,
+			0.5
+		) );
+		geometry.faces[i].vertexColors.push( new THREE.Color().setHSL(
+			i / il * Math.random(),
+			0.5,
+			0.5
+		) );
+
+		geometry.faces[i].color = new THREE.Color().setHSL(
+			i / il * Math.random(),
+			0.5,
+			0.5
+		);
+
+	}
+
+}
+
+function generateMorphTargets ( mesh, geometry ) {
+
+	var vertices = [], scale;
+
+	for ( var i = 0; i < geometry.vertices.length; i++ ) {
+
+		vertices.push( geometry.vertices[ i ].clone() );
+
+		scale = 1 + Math.random() * 0.3;
+
+		vertices[ vertices.length - 1 ].x *= scale;
+		vertices[ vertices.length - 1 ].y *= scale;
+		vertices[ vertices.length - 1 ].z *= scale;
+
+	}
+
+	geometry.morphTargets.push( { name: "target1", vertices: vertices } );
+
+	geometry.update
+
+}
+
+function handleColorChange ( color ) {
+
+	return function ( value ){
+
+		if (typeof value === "string") {
+
+			value = value.replace('#', '0x');
+
+		}
+
+		color.setHex( value );
+
+    };
+
+}
+
+function needsUpdate ( material, geometry ) {
+
+	return function () {
+
+		material.shading = +material.shading; //Ensure number
+		material.vertexColors = +material.vertexColors; //Ensure number
+		material.side = +material.side; //Ensure number
+		material.needsUpdate = true;
+		geometry.verticesNeedUpdate = true;
+		geometry.normalsNeedUpdate = true;
+		geometry.colorsNeedUpdate = true;
+
+	};
+
+};
+
+function updateMorphs ( torus, material ) {
+
+	return function () {
+
+		torus.updateMorphTargets();
+		material.needsUpdate = true;
+
+	};
+
+}
+
+function updateTexture ( material, materialKey, textures ) {
+
+	return function ( key ) {
+
+		material[materialKey] = textures[key];
+		material.needsUpdate = true;
+
+	};
+
+}
+
+function guiScene ( gui, scene ) {
+
+	var folder = gui.addFolder('Scene');
+
+	var data = {
+		background : "#000000",
+		"ambient light" : ambientLight.color.getHex()
+	}
+
+	var color = new THREE.Color();
+	var colorConvert = handleColorChange( color );
+
+	folder.addColor( data, "background" ).onChange( function ( value ) {
+
+		colorConvert( value );
+
+		renderer.setClearColor( color.getHex() );
+
+	} );
+
+	folder.addColor( data, "ambient light" ).onChange( handleColorChange( ambientLight.color ) )
+
+	guiSceneFog( folder, scene );
+
+}
+
+function guiSceneFog ( folder, scene ) {
+
+	var fogFolder = folder.addFolder('scene.fog');
+
+	var fog = new THREE.Fog( 0x3f7b9d, 0, 60 );
+
+	var data = {
+		fog : {
+			"THREE.Fog()" : false,
+			"scene.fog.color" : fog.color.getHex()
+		}
+	};
+
+	fogFolder.add( data.fog, 'THREE.Fog()' ).onChange( function ( useFog ) {
+
+		if ( useFog ) {
+
+			scene.fog = fog;
+
+		} else {
+
+			scene.fog = null;
+
+		}
+
+	} );
+
+	fogFolder.addColor( data.fog, 'scene.fog.color').onChange( handleColorChange( fog.color ) );
+
+}
+
+function guiMaterial ( gui, mesh, material, geometry ) {
+
+	var folder = gui.addFolder('THREE.Material');
+
+	folder.add( material, 'transparent' );
+	folder.add( material, 'opacity', 0, 1 );
+	// folder.add( material, 'blending', constants.blendingMode );
+	// folder.add( material, 'blendSrc', constants.destinationFactors );
+	// folder.add( material, 'blendDst', constants.destinationFactors );
+	// folder.add( material, 'blendEquation', constants.equations );
+	folder.add( material, 'depthTest' );
+	folder.add( material, 'depthWrite' );
+	// folder.add( material, 'polygonOffset' );
+	// folder.add( material, 'polygonOffsetFactor' );
+	// folder.add( material, 'polygonOffsetUnits' );
+	folder.add( material, 'alphaTest', 0, 1 );
+	// folder.add( material, 'overdraw', 0, 5 );
+	folder.add( material, 'visible' );
+	folder.add( material, 'side', constants.side ).onChange( needsUpdate( material, geometry ) );
+
+}
+
+function guiMeshBasicMaterial ( gui, mesh, material, geometry ) {
+
+	var data = {
+		color : material.color.getHex(),
+		envMaps : envMapKeys,
+		map : textureMapKeys,
+		lightMap : textureMapKeys,
+		specularMap : textureMapKeys,
+		alphaMap : textureMapKeys
+	};
+
+	var folder = gui.addFolder('THREE.MeshBasicMaterial');
+
+	folder.addColor( data, 'color' ).onChange( handleColorChange( material.color ) );
+	folder.add( material, 'wireframe' );
+	folder.add( material, 'wireframeLinewidth', 0, 10 );
+	folder.add( material, 'shading', constants.shading);
+	folder.add( material, 'vertexColors', constants.colors).onChange( needsUpdate( material, geometry ) );
+	folder.add( material, 'fog' );
+
+	folder.add( data, 'envMaps', envMapKeys ).onChange( updateTexture( material, 'envMap', envMaps ) );
+	folder.add( data, 'map', textureMapKeys ).onChange( updateTexture( material, 'map', textureMaps ) );
+	folder.add( data, 'lightMap', textureMapKeys ).onChange( updateTexture( material, 'lightMap', textureMaps ) );
+	folder.add( data, 'specularMap', textureMapKeys ).onChange( updateTexture( material, 'specularMap', textureMaps ) );
+	folder.add( data, 'alphaMap', textureMapKeys ).onChange( updateTexture( material, 'alphaMap', textureMaps ) );
+	folder.add( material, 'morphTargets' ).onChange( updateMorphs( mesh, material ) );
+	folder.add( material, 'combine', constants.combine ).onChange( updateMorphs( mesh, material ) );
+	folder.add( material, 'reflectivity', 0, 1 );
+	folder.add( material, 'refractionRatio', 0, 1 );
+	//folder.add( material, 'skinning' );
+
+}
+
+function guiMeshDepthMaterial ( gui, mesh, material, geometry ) {
+
+	var folder = gui.addFolder('THREE.MeshDepthMaterial');
+
+	folder.add( material, 'wireframe' );
+	folder.add( material, 'wireframeLinewidth', 0, 10 );
+	folder.add( material, 'morphTargets' ).onChange( updateMorphs( mesh, material ) );
+
+}
+
+function guiMeshNormalMaterial ( gui, mesh, material, geometry ) {
+
+	var folder = gui.addFolder('THREE.MeshNormalMaterial');
+
+	folder.add( material, 'shading', constants.shading).onChange( needsUpdate( material, geometry ) );
+	folder.add( material, 'wireframe' );
+	folder.add( material, 'wireframeLinewidth', 0, 10 );
+	folder.add( material, 'morphTargets' ).onChange( updateMorphs( mesh, material ) );
+
+}
+
+function guiLineBasicMaterial ( gui, mesh, material, geometry ) {
+
+	var data = {
+		color : material.color.getHex()
+	};
+
+	var folder = gui.addFolder('THREE.LineBasicMaterial');
+
+	folder.addColor( data, 'color' ).onChange( handleColorChange( material.color ) );
+	folder.add( material, 'linewidth', 0, 10 );
+	folder.add( material, 'linecap', ["butt", "round", "square"] );
+	folder.add( material, 'linejoin', ["round", "bevel", "miter"] );
+	folder.add( material, 'vertexColors', constants.colors).onChange( needsUpdate( material, geometry ) );
+	folder.add( material, 'fog' );
+
+}
+
+function guiMeshLambertMaterial ( gui, mesh, material, geometry ) {
+
+	var data = {
+		color : material.color.getHex(),
+		ambient : material.ambient.getHex(),
+		emissive : material.emissive.getHex(),
+		envMaps : envMapKeys,
+		map : textureMapKeys,
+		lightMap : textureMapKeys,
+		specularMap : textureMapKeys,
+		alphaMap : textureMapKeys
+	};
+
+	var envObj = {};
+
+	var folder = gui.addFolder('THREE.MeshLambertMaterial');
+
+	folder.addColor( data, 'color' ).onChange( handleColorChange( material.color ) );
+	folder.addColor( data, 'ambient' ).onChange( handleColorChange( material.ambient ) );
+	folder.addColor( data, 'emissive' ).onChange( handleColorChange( material.emissive ) );
+
+	folder.add( material, 'shading', constants.shading ).onChange( needsUpdate( material, geometry ) );
+	folder.add( material, 'wireframe' );
+	folder.add( material, 'wireframeLinewidth', 0, 10 );
+	folder.add( material, 'vertexColors', constants.colors ).onChange( needsUpdate( material, geometry ) );
+	folder.add( material, 'fog' );
+
+	folder.add( data, 'envMaps', envMapKeys ).onChange( updateTexture( material, 'envMap', envMaps ) );
+	folder.add( data, 'map', textureMapKeys ).onChange( updateTexture( material, 'map', textureMaps ) );
+	folder.add( data, 'lightMap', textureMapKeys ).onChange( updateTexture( material, 'lightMap', textureMaps ) );
+	folder.add( data, 'specularMap', textureMapKeys ).onChange( updateTexture( material, 'specularMap', textureMaps ) );
+	folder.add( data, 'alphaMap', textureMapKeys ).onChange( updateTexture( material, 'alphaMap', textureMaps ) );
+	folder.add( material, 'morphTargets' ).onChange( updateMorphs( mesh, material ) );
+	folder.add( material, 'combine', constants.combine ).onChange( updateMorphs( mesh, material ) );
+	folder.add( material, 'reflectivity', 0, 1 );
+	folder.add( material, 'refractionRatio', 0, 1 );
+	//folder.add( material, 'skinning' );
+
+}
+
+function guiMeshPhongMaterial ( gui, mesh, material, geometry ) {
+
+	var data = {
+		color : material.color.getHex(),
+		ambient : material.ambient.getHex(),
+		emissive : material.emissive.getHex(),
+		specular : material.specular.getHex(),
+		envMaps : envMapKeys,
+		map : textureMapKeys,
+		lightMap : textureMapKeys,
+		specularMap : textureMapKeys,
+		alphaMap : textureMapKeys
+	};
+
+	var folder = gui.addFolder('THREE.MeshPhongMaterial');
+
+	folder.addColor( data, 'color' ).onChange( handleColorChange( material.color ) );
+	folder.addColor( data, 'ambient' ).onChange( handleColorChange( material.ambient ) );
+	folder.addColor( data, 'emissive' ).onChange( handleColorChange( material.emissive ) );
+	folder.addColor( data, 'specular' ).onChange( handleColorChange( material.specular ) );
+
+	folder.add( material, 'shininess', 0, 100);
+	folder.add( material, 'shading', constants.shading).onChange( needsUpdate( material, geometry ) );
+	folder.add( material, 'wireframe' );
+	folder.add( material, 'wireframeLinewidth', 0, 10 );
+	folder.add( material, 'vertexColors', constants.colors);
+	folder.add( material, 'fog' );
+	folder.add( data, 'envMaps', envMapKeys ).onChange( updateTexture( material, 'envMap', envMaps ) );
+	folder.add( data, 'map', textureMapKeys ).onChange( updateTexture( material, 'map', textureMaps ) );
+	folder.add( data, 'lightMap', textureMapKeys ).onChange( updateTexture( material, 'lightMap', textureMaps ) );
+	folder.add( data, 'specularMap', textureMapKeys ).onChange( updateTexture( material, 'specularMap', textureMaps ) );
+	folder.add( data, 'alphaMap', textureMapKeys ).onChange( updateTexture( material, 'alphaMap', textureMaps ) );
+
+}
+
+function chooseFromHash ( gui, mesh, geometry ) {
+
+	var selectedMaterial = window.location.hash.substring(1) || "MeshBasicMaterial";
+	var material;
+
+	switch (selectedMaterial) {
+
+	case "MeshBasicMaterial" :
+
+		material = new THREE.MeshBasicMaterial({color: 0x2194CE});
+		guiMaterial( gui, mesh, material, geometry );
+		guiMeshBasicMaterial( gui, mesh, material, geometry );
+
+		return material;
+
+		break;
+
+	case "MeshLambertMaterial" :
+
+		material = new THREE.MeshLambertMaterial({color: 0x2194CE});
+		guiMaterial( gui, mesh, material, geometry );
+		guiMeshLambertMaterial( gui, mesh, material, geometry );
+
+		return material;
+
+		break;
+
+	case "MeshPhongMaterial" :
+
+		material = new THREE.MeshPhongMaterial({color: 0x2194CE});
+		guiMaterial( gui, mesh, material, geometry );
+		guiMeshPhongMaterial( gui, mesh, material, geometry );
+
+		return material;
+
+		break;
+
+	case "MeshDepthMaterial" :
+
+		material = new THREE.MeshDepthMaterial({color: 0x2194CE});
+		guiMaterial( gui, mesh, material, geometry );
+		guiMeshDepthMaterial( gui, mesh, material, geometry );
+
+		return material;
+
+		break;
+
+	case "MeshNormalMaterial" :
+
+		material = new THREE.MeshNormalMaterial();
+		guiMaterial( gui, mesh, material, geometry );
+		guiMeshNormalMaterial( gui, mesh, material, geometry );
+
+		return material;
+
+		break;
+
+	case "LineBasicMaterial" :
+
+		material = new THREE.LineBasicMaterial({color: 0x2194CE});
+		guiMaterial( gui, mesh, material, geometry );
+		guiLineBasicMaterial( gui, mesh, material, geometry );
+
+		return material;
+
+		break;
+	}
+
+}

+ 124 - 0
docs/scenes/material-browser.html

@@ -0,0 +1,124 @@
+<!doctype html>
+<html lang="en">
+	<head>
+		<meta charset="utf-8">
+		<title>Three.js Material Browser</title>
+		<style>
+			@font-face {
+				font-family: 'inconsolata';
+				src: url('../files/inconsolata.woff') format('woff');
+				font-weight: normal;
+				font-style: normal;
+			}
+			
+			body {
+				margin:0;
+				font-family: 'inconsolata';
+				font-size: 15px;
+				line-height: 18px;
+				overflow: hidden;
+			}
+			
+			canvas { width: 100%; height: 100% }
+			
+			#newWindow {
+				display: block;
+				position: absolute;
+				bottom: 0.3em;
+				left: 0.5em;
+				color: #fff;
+			}
+		</style>
+	</head>
+	<body>
+		
+		<a id='newWindow' href='./material-browser.html' target='_blank'>Open in New Window</a>
+		
+		<script src="../../build/three.min.js"></script>
+		<script src='../../examples/js/libs/dat.gui.min.js'></script>
+		<script src='js/material.js'></script>
+		
+		<script>
+			
+			document.getElementById('newWindow').href += window.location.hash;
+			
+			var gui = new dat.GUI();
+			var scene = new THREE.Scene();
+			var camera = new THREE.PerspectiveCamera( 75, window.innerWidth/window.innerHeight, 0.1, 50 );
+			camera.position.z = 30;
+			
+			var renderer = new THREE.WebGLRenderer();
+			renderer.setSize( window.innerWidth, window.innerHeight );
+			document.body.appendChild( renderer.domElement );
+
+			var ambientLight = new THREE.AmbientLight( 0x000000 );
+			scene.add( ambientLight );
+
+			var lights = [];
+			lights[0] = new THREE.PointLight( 0xffffff, 1, 0 );
+			lights[1] = new THREE.PointLight( 0xffffff, 1, 0 );
+			lights[2] = new THREE.PointLight( 0xffffff, 1, 0 );
+			
+			lights[0].position.set( 0, 200, 0 );
+			lights[1].position.set( 100, 200, 100 );
+			lights[2].position.set( -100, -200, -100 );
+
+			scene.add( lights[0] );
+			scene.add( lights[1] );
+			scene.add( lights[2] );
+
+			guiScene( gui, scene, camera );
+
+			var geometry = new THREE.TorusKnotGeometry( 10, 3, 100, 16 );
+			var mesh = new THREE.Mesh( geometry );
+			
+			generateVertexColors( geometry );
+			
+			mesh.material = chooseFromHash( gui, mesh, geometry );
+
+			generateMorphTargets( mesh, geometry );
+
+			scene.add( mesh );
+			
+			var prevFog = false;
+			
+			var render = function () {
+				
+				requestAnimationFrame( render );
+
+				var time = Date.now() * 0.001;
+
+				mesh.rotation.x += 0.005;
+				mesh.rotation.y += 0.005;
+				
+				if ( prevFog !== scene.fog ) {
+					
+					mesh.material.needsUpdate = true;
+					prevFog = scene.fog;
+					
+				}
+				
+				if ( mesh.morphTargetInfluences ) {
+					
+					mesh.morphTargetInfluences[ 0 ] = ( 1 + Math.sin( 4 * time ) ) / 2;
+					
+				}
+
+				renderer.render( scene, camera );
+				
+			};
+			
+			window.addEventListener( 'resize', function () {
+				
+				camera.aspect = window.innerWidth / window.innerHeight;
+				camera.updateProjectionMatrix();
+
+				renderer.setSize( window.innerWidth, window.innerHeight );
+				
+			}, false );
+
+			render();
+			
+		</script>
+	</body>
+</html>

+ 12 - 1
editor/css/dark.css

@@ -37,6 +37,15 @@ input.Number {
 		text-shadow: 1px 1px 0px rgba(0,0,0,0.25);
 	}
 
+#script {
+	position: absolute;
+	top: 32px;
+	left: 0px;
+	right: 300px;
+	bottom: 32px;
+	opacity: 0.9;
+}
+
 #player {
 	position: absolute;
 	top: 32px;
@@ -52,6 +61,8 @@ input.Number {
 	background: #111;
 	padding: 0px;
 	margin: 0px;
+	right: 0px;
+	top: 0px;
 }
 
 	#menubar .menu {
@@ -78,7 +89,7 @@ input.Number {
 			display: none;
 			padding: 5px 0px;
 			background: #111;
-			width: 140px;
+			width: 150px;
 		}
 
 		#menubar .menu:hover .options {

+ 12 - 1
editor/css/light.css

@@ -38,6 +38,15 @@ input.Number {
 		text-shadow: 1px 1px 0px rgba(0,0,0,0.25);
 	}
 
+#script {
+	position: absolute;
+	top: 32px;
+	left: 0px;
+	right: 300px;
+	bottom: 32px;
+	opacity: 0.9;
+}
+
 #player {
 	position: absolute;
 	top: 32px;
@@ -53,6 +62,8 @@ input.Number {
 	background: #eee;
 	padding: 0px;
 	margin: 0px;
+	right: 0px;
+	top: 0px;
 }
 
 	#menubar .menu {
@@ -79,7 +90,7 @@ input.Number {
 			display: none;
 			padding: 5px 0px;
 			background: #eee;
-			width: 140px;
+			width: 150px;
 		}
 
 		#menubar .menu:hover .options {

+ 10 - 1
editor/css/main.css

@@ -19,6 +19,7 @@ button {
 }
 
 textarea {
+	tab-size: 4;
 	white-space: pre;
 	word-wrap: normal;
 }
@@ -70,6 +71,14 @@ textarea, input { outline: none; } /* osx */
 		display: none;
 	}
 
+.CodeMirror {
+
+	position: absolute !important;
+	top: 37px;
+	width: 100% !important;
+	height: calc(100% - 37px) !important;
+
+}
 /* scene types */
 
 .type {
@@ -121,4 +130,4 @@ textarea, input { outline: none; } /* osx */
 
 .MeshPhongMaterial {
 	color: #ffaa88;
-}
+}

+ 172 - 0
editor/examples/camera.app.json

@@ -0,0 +1,172 @@
+{
+	"camera": {
+		"metadata": {
+			"version": 4.3,
+			"type": "Object",
+			"generator": "ObjectExporter"
+		},
+		"object": {
+			"uuid": "F0D8434F-4603-415B-8024-792FE97B9600",
+			"type": "PerspectiveCamera",
+			"name": "Camera",
+			"fov": 50,
+			"aspect": 1.2252042007001167,
+			"near": 0.1,
+			"far": 100000,
+			"matrix": [0.9700406789779663,-5.500052080442686e-10,-0.24294254183769226,0,-0.04822639003396034,0.9800989627838135,-0.19256223738193512,0,0.23810774087905884,0.19850945472717285,0.950735867023468,0,159.0158233642578,132.5708465576172,634.9312744140625,1]
+		}
+	},
+	"scene": {
+		"metadata": {
+			"version": 4.3,
+			"type": "Object",
+			"generator": "ObjectExporter"
+		},
+		"geometries": [
+			{
+				"uuid": "D8E200D3-27BC-49F8-A5C5-7384206E70FE",
+				"type": "BoxGeometry",
+				"width": 100,
+				"height": 100,
+				"depth": 100,
+				"widthSegments": 1,
+				"heightSegments": 1,
+				"depthSegments": 1
+			},
+			{
+				"uuid": "25BA32DB-8B02-4ABA-A77C-69868C464A1A",
+				"type": "CylinderGeometry",
+				"radiusTop": 0,
+				"radiusBottom": 40,
+				"height": 75,
+				"radialSegments": 4,
+				"heightSegments": 1,
+				"openEnded": false
+			},
+			{
+				"uuid": "51BB3E54-D2DF-4576-9953-FB8E940588B5",
+				"type": "PlaneGeometry",
+				"width": 1000,
+				"height": 1000,
+				"widthSegments": 1,
+				"heightSegments": 1
+			},
+			{
+				"uuid": "4DECFAB5-6FD1-4D84-9A29-565807B074EA",
+				"type": "IcosahedronGeometry",
+				"radius": 40,
+				"detail": 2
+			}],
+		"materials": [
+			{
+				"uuid": "B5943856-E404-45D9-A427-4774202C2CD0",
+				"type": "MeshPhongMaterial",
+				"color": 37119,
+				"ambient": 16777215,
+				"emissive": 0,
+				"specular": 1118481,
+				"shininess": 30
+			},
+			{
+				"uuid": "3F872310-2067-4BE4-9250-5B3F4E43797E",
+				"type": "MeshPhongMaterial",
+				"color": 15859456,
+				"ambient": 16777215,
+				"emissive": 0,
+				"specular": 1118481,
+				"shininess": 30
+			},
+			{
+				"uuid": "4AE8130E-B6A8-47BC-ACCF-060973C74044",
+				"type": "MeshPhongMaterial",
+				"color": 16777215,
+				"ambient": 16777215,
+				"emissive": 0,
+				"specular": 1118481,
+				"shininess": 30
+			},
+			{
+				"uuid": "E1826901-7922-4584-A25D-6D487E2C9BBD",
+				"type": "MeshPhongMaterial",
+				"color": 16711680,
+				"ambient": 16777215,
+				"emissive": 0,
+				"specular": 1118481,
+				"shininess": 30
+			}],
+		"object": {
+			"uuid": "3741222A-BD8F-401C-A5D2-5A907E891896",
+			"type": "Scene",
+			"name": "Scene",
+			"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],
+			"children": [
+				{
+					"uuid": "60B69C58-4201-43FD-815E-AD2EDFBBD0CE",
+					"type": "PerspectiveCamera",
+					"name": "PerspectiveCamera 1",
+					"fov": 50,
+					"aspect": 1,
+					"near": 100,
+					"far": 10000,
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,100,400,1]
+				},
+				{
+					"uuid": "26DAAD69-725D-43B7-AF9D-990A99DEF8C5",
+					"type": "Mesh",
+					"name": "Box 1",
+					"geometry": "D8E200D3-27BC-49F8-A5C5-7384206E70FE",
+					"material": "B5943856-E404-45D9-A427-4774202C2CD0",
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]
+				},
+				{
+					"uuid": "AAAFF2D6-4725-4AFC-A9FE-26419B11011F",
+					"type": "Mesh",
+					"name": "Cylinder 3",
+					"geometry": "25BA32DB-8B02-4ABA-A77C-69868C464A1A",
+					"material": "3F872310-2067-4BE4-9250-5B3F4E43797E",
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,-130,-15,0,1]
+				},
+				{
+					"uuid": "A460C230-DC88-4A8F-A3FB-AA0FE735F3ED",
+					"type": "Mesh",
+					"name": "Plane 4",
+					"geometry": "51BB3E54-D2DF-4576-9953-FB8E940588B5",
+					"material": "4AE8130E-B6A8-47BC-ACCF-060973C74044",
+					"matrix": [1,0,0,0,0,0.040785059332847595,-0.9991679191589355,0,0,0.9991679191589355,0.040785059332847595,0,0,-50,0,1]
+				},
+				{
+					"uuid": "3412781E-27CC-43C3-A5DB-54C0C8E42ED6",
+					"type": "PointLight",
+					"name": "PointLight 2",
+					"color": 12773063,
+					"intensity": 1,
+					"distance": 0,
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,88.12999725341797,8.3100004196167,125.44999694824219,1]
+				},
+				{
+					"uuid": "E2939A7B-5E40-438A-8C1B-32126FBC6892",
+					"type": "PointLight",
+					"name": "PointLight 1",
+					"color": 9474221,
+					"intensity": 0.75,
+					"distance": 0,
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,-93.86000061035156,127.12999725341797,-114.30000305175781,1]
+				},
+				{
+					"uuid": "B855E267-A266-4098-ACD6-6A1FDE7B88BA",
+					"type": "Mesh",
+					"name": "Icosahedron 1",
+					"geometry": "4DECFAB5-6FD1-4D84-9A29-565807B074EA",
+					"material": "E1826901-7922-4584-A25D-6D487E2C9BBD",
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,130,-10,0,1]
+				}]
+		}
+	},
+	"scripts": {
+		"60B69C58-4201-43FD-815E-AD2EDFBBD0CE": [
+			{
+				"name": "Camera Orbit",
+				"source": "player.setCamera( this );\n\nfunction update( event ) {\n\n\tvar time = event.time * 0.001;\n\n\tthis.position.x = Math.sin( time ) * 400;\n\tthis.position.z = Math.cos( time ) * 400;\n\tthis.lookAt( scene.position );\n\n}"
+			}]
+	}
+}

+ 99 - 0
editor/examples/particles.app.json

@@ -0,0 +1,99 @@
+{
+	"camera": {
+		"metadata": {
+			"version": 4.3,
+			"type": "Object",
+			"generator": "ObjectExporter"
+		},
+		"object": {
+			"uuid": "D722B468-8D40-4CAB-82D6-944D2D5A8D35",
+			"type": "PerspectiveCamera",
+			"name": "Camera",
+			"fov": 50,
+			"aspect": 1.2237762237762237,
+			"near": 0.1,
+			"far": 100000,
+			"matrix": [0.7071067690849304,-2.468905080377226e-9,-0.7071068286895752,0,-0.2357022613286972,0.9428090453147888,-0.235702246427536,0,0.6666666865348816,0.3333333134651184,0.6666666269302368,0,500,250,500,1]
+		}
+	},
+	"scene": {
+		"metadata": {
+			"version": 4.3,
+			"type": "Object",
+			"generator": "ObjectExporter"
+		},
+		"geometries": [
+			{
+				"uuid": "5009F17C-E9D3-4D0E-82A6-2E23159128FB",
+				"type": "PlaneGeometry",
+				"width": 600,
+				"height": 600,
+				"widthSegments": 1,
+				"heightSegments": 1
+			},
+			{
+				"uuid": "8693E7B2-0009-4C4C-94C5-8E031557AEC2",
+				"type": "BoxGeometry",
+				"width": 4,
+				"height": 4,
+				"depth": 4,
+				"widthSegments": 1,
+				"heightSegments": 1,
+				"depthSegments": 1
+			}],
+		"materials": [
+			{
+				"uuid": "6EDB0369-7E11-4B0F-BF98-4BD761846D65",
+				"type": "MeshPhongMaterial",
+				"color": 16777215,
+				"ambient": 16777215,
+				"emissive": 0,
+				"specular": 1118481,
+				"shininess": 30
+			},
+			{
+				"uuid": "D586E672-03FC-4C82-9D6E-CCCF899DDDB1",
+				"type": "MeshBasicMaterial",
+				"color": 16777215
+			}],
+		"object": {
+			"uuid": "3741222A-BD8F-401C-A5D2-5A907E891896",
+			"type": "Scene",
+			"name": "Scene",
+			"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],
+			"children": [
+				{
+					"uuid": "05B57416-1BE5-4A96-BB05-9D9CD112D52B",
+					"type": "Mesh",
+					"name": "Ground",
+					"geometry": "5009F17C-E9D3-4D0E-82A6-2E23159128FB",
+					"material": "6EDB0369-7E11-4B0F-BF98-4BD761846D65",
+					"matrix": [1,0,0,0,0,0.0007962886593304574,-0.9999997019767761,0,0,0.9999997019767761,0.0007962886593304574,0,0,-2,0,1]
+				},
+				{
+					"uuid": "9DFA44C6-C85A-4F2F-9252-E9564C2785C5",
+					"type": "Mesh",
+					"name": "Particle",
+					"geometry": "8693E7B2-0009-4C4C-94C5-8E031557AEC2",
+					"material": "D586E672-03FC-4C82-9D6E-CCCF899DDDB1",
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]
+				},
+				{
+					"uuid": "40E5CDA4-0E39-4265-9293-3E9EC3207F61",
+					"type": "PointLight",
+					"name": "PointLight",
+					"color": 16777215,
+					"intensity": 10,
+					"distance": 0,
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]
+				}]
+		}
+	},
+	"scripts": {
+		"3741222A-BD8F-401C-A5D2-5A907E891896": [
+			{
+				"name": "Particle Fountain",
+				"source": "var original = this.getObjectByName( 'Particle' );\n\nvar particles = [];\n\nfunction update( event ) {\n\n\tif ( particles.length < 200 ) {\n\n\t\tvar velocity = new THREE.Vector3();\n\t\tvelocity.x = Math.random() * 10 - 5;\n\t\tvelocity.y = Math.random() * 10 + 10;\n\t\tvelocity.z = Math.random() * 10 - 5;\n\n\t\tvar particle = original.clone();\n\t\tparticle.userData.velocity = velocity;\n\t\tparticles.push( particle );\n\n\t\tthis.add( particle );\n\n\t}\n\n\tfor ( var i = 0; i < particles.length; i ++ ) {\n\n\t\tvar particle = particles[ i ];\n\n\t\tvar velocity = particle.userData.velocity;\n\n\t\tvelocity.y -= 0.98;\n\n\t\tparticle.position.add( velocity );\n\n\t\tif ( particle.position.y < 0 ) {\n\n\t\t\tparticle.position.y = 0;\n\n\t\t\tvelocity.y = - velocity.y;\n\t\t\tvelocity.multiplyScalar( 0.6 );\n\n\t\t}\n\n\t}\n\n}"
+			}]
+	}
+}

+ 137 - 0
editor/examples/pong.app.json

@@ -0,0 +1,137 @@
+{
+	"camera": {
+		"metadata": {
+			"version": 4.3,
+			"type": "Object",
+			"generator": "ObjectExporter"
+		},
+		"object": {
+			"uuid": "E5C76691-3D55-4E26-862E-24BADC21F4D7",
+			"type": "PerspectiveCamera",
+			"name": "Camera",
+			"fov": 50,
+			"aspect": 1.3291139240506329,
+			"near": 0.1,
+			"far": 100000,
+			"matrix": [0.9522120356559753,4.209433246415983e-9,-0.3054378032684326,0,-0.17742955684661865,0.8139731884002686,-0.553142249584198,0,0.24861818552017212,0.5809023976325989,0.7750750780105591,0,186.46363830566406,435.67681884765625,581.3063354492188,1]
+		}
+	},
+	"scene": {
+		"metadata": {
+			"version": 4.3,
+			"type": "Object",
+			"generator": "ObjectExporter"
+		},
+		"geometries": [
+			{
+				"uuid": "77B20ED1-2871-4B14-A652-8F823B2A817E",
+				"type": "PlaneGeometry",
+				"width": 600,
+				"height": 400,
+				"widthSegments": 1,
+				"heightSegments": 1
+			},
+			{
+				"uuid": "7ADE0D01-A56A-4D33-869A-6C360E096EF7",
+				"type": "BoxGeometry",
+				"width": 10,
+				"height": 10,
+				"depth": 10,
+				"widthSegments": 1,
+				"heightSegments": 1,
+				"depthSegments": 1
+			},
+			{
+				"uuid": "E8C064B6-3454-4739-9E02-3B07B8E70B4C",
+				"type": "BoxGeometry",
+				"width": 20,
+				"height": 20,
+				"depth": 100,
+				"widthSegments": 1,
+				"heightSegments": 1,
+				"depthSegments": 1
+			}],
+		"materials": [
+			{
+				"uuid": "7EDF7C08-6325-418A-BBAB-89341C694730",
+				"type": "MeshPhongMaterial",
+				"color": 16777215,
+				"ambient": 16777215,
+				"emissive": 0,
+				"specular": 16777215,
+				"shininess": 30
+			},
+			{
+				"uuid": "B1CAF098-FE36-45E1-BEBE-8D6AC04821CC",
+				"type": "MeshPhongMaterial",
+				"color": 16711680,
+				"ambient": 16777215,
+				"emissive": 0,
+				"specular": 1118481,
+				"shininess": 30
+			},
+			{
+				"uuid": "FBDBE66D-B613-4741-802D-5AE1DE07DE46",
+				"type": "MeshPhongMaterial",
+				"color": 2752767,
+				"ambient": 16777215,
+				"emissive": 0,
+				"specular": 1118481,
+				"shininess": 30
+			}],
+		"object": {
+			"uuid": "31517222-A9A7-4EAF-B5F6-60751C0BABA3",
+			"type": "Scene",
+			"name": "Scene",
+			"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],
+			"children": [
+				{
+					"uuid": "B47D0BFC-D63A-4CBB-985E-9C4DBDF086E4",
+					"type": "Mesh",
+					"name": "Ground",
+					"geometry": "77B20ED1-2871-4B14-A652-8F823B2A817E",
+					"material": "7EDF7C08-6325-418A-BBAB-89341C694730",
+					"matrix": [1,0,0,0,0,0.0007961748051457107,-0.9999997019767761,0,0,0.9999997019767761,0.0007961748051457107,0,0,-10,0,1]
+				},
+				{
+					"uuid": "CE13E58A-4E8B-4F72-9E2E-7DE57C58F989",
+					"type": "Mesh",
+					"name": "Ball",
+					"geometry": "7ADE0D01-A56A-4D33-869A-6C360E096EF7",
+					"material": "B1CAF098-FE36-45E1-BEBE-8D6AC04821CC",
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]
+				},
+				{
+					"uuid": "2AAEA3AA-EC45-492B-B450-10473D1EC6C5",
+					"type": "Mesh",
+					"name": "Pad 1",
+					"geometry": "E8C064B6-3454-4739-9E02-3B07B8E70B4C",
+					"material": "FBDBE66D-B613-4741-802D-5AE1DE07DE46",
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,-240,0,0,1]
+				},
+				{
+					"uuid": "F1DD46A7-6584-4A37-BC76-852C3911077E",
+					"type": "Mesh",
+					"name": "Pad 2",
+					"geometry": "E8C064B6-3454-4739-9E02-3B07B8E70B4C",
+					"material": "FBDBE66D-B613-4741-802D-5AE1DE07DE46",
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,240,0,0,1]
+				},
+				{
+					"uuid": "C62AAE9F-9E51-46A5-BD2B-71BA804FC0B3",
+					"type": "DirectionalLight",
+					"name": "DirectionalLight 3",
+					"color": 16777215,
+					"intensity": 1,
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,100,200,150,1]
+				}]
+		}
+	},
+	"scripts": {
+		"31517222-A9A7-4EAF-B5F6-60751C0BABA3": [
+			{
+				"name": "Game logic",
+				"source": "var ball = this.getObjectByName( 'Ball' );\n\nvar position = ball.position;\n\nvar velocity = new THREE.Vector3();\n\nvar direction = new THREE.Vector3();\ndirection.x = Math.random() - 0.5;\ndirection.z = Math.random() - 0.5;\ndirection.normalize();\n\nvar pad1 = this.getObjectByName( 'Pad 1' );\nvar pad2 = this.getObjectByName( 'Pad 2' );\n\nvar raycaster = new THREE.Raycaster();\nvar objects = [ pad1, pad2 ];\n\n//\n\nfunction mousemove( event ) {\n\n\tpad1.position.z = ( event.clientX / player.width ) * 300 - 150;\n\tpad2.position.z = - pad1.position.z;\n\n}\n\nfunction update( event ) {\n\n\tif ( position.x < -300 || position.x > 300 ) {\n\t\t\n\t\tdirection.x = - direction.x;\n\t\t\n\t}\n\n\tif ( position.z < -200 || position.z > 200 ) {\n\t\t\n\t\tdirection.z = - direction.z;\n\t\t\n\t}\n\t\n\traycaster.set( position, direction );\n\t\n\tvar intersections = raycaster.intersectObjects( objects );\n\t\n\tif ( intersections.length > 0 ) {\n\n\t\tvar intersection = intersections[ 0 ];\n\t\t\n\t\tif ( intersection.distance < 10 ) {\n\t\t\t\n\t\t\tdirection.reflect( intersection.face.normal );\n\t\t\t\n\t\t}\n\t\t\n\t}\n\n\tposition.add( velocity.copy( direction ).multiplyScalar( 8 ) );\n\n}"
+			}]
+	}
+}

+ 17 - 16
editor/index.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html lang="en">
 	<head>
-		<title>three.js editor</title>
+		<title>three.js / editor</title>
 		<meta charset="utf-8">
 		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
 	</head>
@@ -50,13 +50,19 @@
 		<script src="../examples/js/renderers/SoftwareRenderer.js"></script>
 		<script src="../examples/js/renderers/SVGRenderer.js"></script>
 
+		<link rel="stylesheet" href="js/libs/codemirror/codemirror.css">
+		<link rel="stylesheet" href="js/libs/codemirror/theme/monokai.css">
+		<script src="js/libs/codemirror/codemirror.js"></script>
+		<script src="js/libs/codemirror/mode/javascript.js"></script>
+
+		<script src="js/libs/jszip.min.js"></script>
 		<script src="js/libs/signals.min.js"></script>
 		<script src="js/libs/ui.js"></script>
-		<script src="js/libs/ui.editor.js"></script>
 		<script src="js/libs/ui.three.js"></script>
 
 		<script src="js/libs/app.js"></script>
 		<script src="js/Player.js"></script>
+		<script src="js/Script.js"></script>
 
 		<script src="js/Storage.js"></script>
 
@@ -69,6 +75,7 @@
 		<script src="js/Menubar.Add.js"></script>
 		<script src="js/Menubar.Play.js"></script>
 		<script src="js/Menubar.View.js"></script>
+		<script src="js/Menubar.Examples.js"></script>
 		<script src="js/Menubar.Help.js"></script>
 		<script src="js/Menubar.Status.js"></script>
 		<script src="js/Sidebar.js"></script>
@@ -90,7 +97,6 @@
 		<script src="js/Sidebar.Geometry.TorusKnotGeometry.js"></script>
 		<script src="js/Sidebar.Material.js"></script>
 		<script src="js/Sidebar.Script.js"></script>
-		<script src="js/Sidebar.Script.Editor.js"></script>
 		<script src="js/Toolbar.js"></script>
 		<script src="js/Viewport.js"></script>
 		<script src="js/Viewport.Info.js"></script>
@@ -111,10 +117,11 @@
 			var viewport = new Viewport( editor );
 			document.body.appendChild( viewport.dom );
 
-			/*
+			var script = new Script( editor );
+			document.body.appendChild( script.dom );
+
 			var player = new Player( editor );
 			document.body.appendChild( player.dom );
-			*/
 
 			var toolbar = new Toolbar( editor );
 			document.body.appendChild( toolbar.dom );
@@ -138,10 +145,7 @@
 
 					if ( state !== undefined ) {
 
-						var loader = new THREE.ObjectLoader();
-						var scene = loader.parse( state );
-
-						editor.setScene( scene );
+						editor.fromJSON( state );
 
 					}
 
@@ -160,7 +164,7 @@
 				var timeout;
 
 				var saveState = function ( scene ) {
-				
+
 					if ( editor.config.getKey( 'autosave' ) === false ) {
 
 						return;
@@ -175,7 +179,7 @@
 
 						timeout = setTimeout( function () {
 
-							editor.storage.set( editor.scene.toJSON() );
+							editor.storage.set( editor.toJSON() );
 
 							editor.signals.savingFinished.dispatch();
 
@@ -187,12 +191,14 @@
 
 				var signals = editor.signals;
 
+				signals.editorCleared.add( saveState );
 				signals.geometryChanged.add( saveState );
 				signals.objectAdded.add( saveState );
 				signals.objectChanged.add( saveState );
 				signals.objectRemoved.add( saveState );
 				signals.materialChanged.add( saveState );
 				signals.sceneGraphChanged.add( saveState );
+				signals.scriptChanged.add( saveState );
 
 				var showDialog = function ( content ) {
 
@@ -230,11 +236,6 @@
 					case 8: // prevent browser back
 						event.preventDefault();
 						break;
-					case 46: // delete
-						var parent = editor.selected.parent;
-						editor.removeObject( editor.selected );
-						editor.select( parent );
-						break;
 
 				}
 

+ 126 - 4
editor/js/Editor.js

@@ -8,6 +8,10 @@ var Editor = function () {
 
 	this.signals = {
 
+		// script
+
+		editScript: new SIGNALS.Signal(),
+
 		// player
 
 		startPlayer: new SIGNALS.Signal(),
@@ -22,6 +26,8 @@ var Editor = function () {
 
 		// notifications
 
+		editorCleared: new SIGNALS.Signal(),
+
 		savingStarted: new SIGNALS.Signal(),
 		savingFinished: new SIGNALS.Signal(),
 
@@ -49,6 +55,11 @@ var Editor = function () {
 		helperRemoved: new SIGNALS.Signal(),
 
 		materialChanged: new SIGNALS.Signal(),
+
+		scriptAdded: new SIGNALS.Signal(),
+		scriptChanged: new SIGNALS.Signal(),
+		scriptRemoved: new SIGNALS.Signal(),
+
 		fogTypeChanged: new SIGNALS.Signal(),
 		fogColorChanged: new SIGNALS.Signal(),
 		fogParametersChanged: new SIGNALS.Signal(),
@@ -62,7 +73,9 @@ var Editor = function () {
 	this.storage = new Storage();
 	this.loader = new Loader( this );
 
-	this.camera = new THREE.PerspectiveCamera( 50, 1, 0.1, 100000 );
+	this.camera = new THREE.PerspectiveCamera( 50, 1, 1, 100000 );
+	this.camera.name = 'Camera';
+
 	this.scene = new THREE.Scene();
 	this.scene.name = 'Scene';
 
@@ -72,7 +85,7 @@ var Editor = function () {
 	this.geometries = {};
 	this.materials = {};
 	this.textures = {};
-	// this.scripts = {};
+	this.scripts = {};
 
 	this.selected = null;
 	this.helpers = {};
@@ -89,16 +102,19 @@ Editor.prototype = {
 
 	},
 
+	/*
 	showDialog: function ( value ) {
 
 		this.signals.showDialog.dispatch( value );
 
 	},
+	*/
 
 	//
 
 	setScene: function ( scene ) {
 
+		this.scene.uuid = scene.uuid;
 		this.scene.name = scene.name;
 		this.scene.userData = JSON.parse( JSON.stringify( scene.userData ) );
 
@@ -150,8 +166,6 @@ Editor.prototype = {
 
 		if ( object.parent === undefined ) return; // avoid deleting the camera or scene
 
-		if ( confirm( 'Delete ' + object.name + '?' ) === false ) return;
-
 		var scope = this;
 
 		object.traverse( function ( child ) {
@@ -273,6 +287,38 @@ Editor.prototype = {
 
 	//
 
+	addScript: function ( object, script ) {
+
+		if ( this.scripts[ object.uuid ] === undefined ) {
+
+			this.scripts[ object.uuid ] = [];
+
+		}
+
+		this.scripts[ object.uuid ].push( script );
+
+		this.signals.scriptAdded.dispatch( script );
+
+	},
+
+	removeScript: function ( object, script ) {
+
+		if ( this.scripts[ object.uuid ] === undefined ) return;
+
+		var index = this.scripts[ object.uuid ].indexOf( script );
+
+		if ( index !== - 1 ) {
+
+			this.scripts[ object.uuid ].splice( index, 1 );
+
+		}
+
+		this.signals.scriptRemoved.dispatch( script );
+
+	},
+
+	//
+
 	parent: function ( object, parent ) {
 
 		if ( parent === undefined ) {
@@ -310,6 +356,13 @@ Editor.prototype = {
 
 	selectById: function ( id ) {
 
+		if ( id === this.camera.id ) {
+
+			this.select( this.camera );
+			return;
+
+		}
+
 		this.select( this.scene.getObjectById( id, true ) );
 
 	},
@@ -346,6 +399,75 @@ Editor.prototype = {
 
 		this.focus( this.scene.getObjectById( id, true ) );
 
+	},
+
+	clear: function () {
+
+		this.camera.position.set( 500, 250, 500 );
+		this.camera.lookAt( new THREE.Vector3() );
+
+		var objects = this.scene.children;
+
+		while ( objects.length > 0 ) {
+
+			this.removeObject( objects[ 0 ] );
+
+		}
+
+		this.geometries = {};
+		this.materials = {};
+		this.textures = {};
+		this.scripts = {};
+
+		this.deselect();
+
+		this.signals.editorCleared.dispatch();
+
+	},
+
+	//
+
+	fromJSON: function ( json ) {
+
+		var loader = new THREE.ObjectLoader();
+
+		// backwards
+
+		if ( json.scene === undefined ) {
+
+			var scene = loader.parse( json );
+
+			this.setScene( scene );
+
+			return;
+
+		}
+
+		// TODO: Clean this up somehow
+
+		var camera = loader.parse( json.camera );
+
+		this.camera.position.copy( camera.position );
+		this.camera.rotation.copy( camera.rotation );
+		this.camera.aspect = camera.aspect;
+		this.camera.near = camera.near;
+		this.camera.far = camera.far;
+
+		this.setScene( loader.parse( json.scene ) );
+		this.scripts = json.scripts;
+
+	},
+
+	toJSON: function () {
+
+		return {
+
+			camera: this.camera.toJSON(),
+			scene: this.scene.toJSON(),
+			scripts: this.scripts
+
+		};
+
 	}
 
 }

Some files were not shown because too many files changed in this diff