瀏覽代碼

Merge branch 'dev' into raycaster-docs

Casey Grun 10 年之前
父節點
當前提交
6c16c566d1
共有 100 個文件被更改,包括 2396 次插入1253 次删除
  1. 1 1
      bower.json
  2. 318 138
      build/three.js
  3. 188 186
      build/three.min.js
  4. 1 1
      docs/api/examples/Lut.html
  5. 1 1
      docs/api/extras/ImageUtils.html
  6. 3 3
      docs/api/extras/SceneUtils.html
  7. 4 19
      docs/api/extras/animation/Animation.html
  8. 13 13
      docs/api/extras/cameras/CombinedCamera.html
  9. 14 11
      docs/api/extras/core/Curve.html
  10. 13 10
      docs/api/extras/curves/ClosedSplineCurve3.html
  11. 34 15
      docs/api/extras/curves/CubicBezierCurve.html
  12. 35 16
      docs/api/extras/curves/CubicBezierCurve3.html
  13. 4 4
      docs/api/extras/curves/EllipseCurve.html
  14. 1 1
      docs/api/extras/curves/LineCurve.html
  15. 1 1
      docs/api/extras/curves/LineCurve3.html
  16. 32 14
      docs/api/extras/curves/QuadraticBezierCurve.html
  17. 32 14
      docs/api/extras/curves/QuadraticBezierCurve3.html
  18. 13 12
      docs/api/extras/curves/SplineCurve.html
  19. 16 10
      docs/api/extras/curves/SplineCurve3.html
  20. 2 2
      docs/api/extras/geometries/ExtrudeGeometry.html
  21. 1 1
      docs/api/extras/geometries/ShapeGeometry.html
  22. 3 3
      docs/api/extras/helpers/ArrowHelper.html
  23. 1 1
      docs/api/extras/helpers/AxisHelper.html
  24. 1 1
      docs/api/extras/helpers/BoundingBoxHelper.html
  25. 1 1
      docs/api/extras/helpers/GridHelper.html
  26. 1 1
      docs/api/extras/objects/ImmediateRenderObject.html
  27. 0 72
      docs/api/extras/renderers/plugins/DepthPassPlugin.html
  28. 0 36
      docs/api/extras/shaders/ShaderFlares.html
  29. 84 0
      docs/api/loaders/BabylonLoader.html
  30. 53 17
      docs/api/loaders/BufferGeometryLoader.html
  31. 37 15
      docs/api/loaders/Cache.html
  32. 114 0
      docs/api/loaders/ColladaLoader.html
  33. 53 20
      docs/api/loaders/ImageLoader.html
  34. 117 23
      docs/api/loaders/JSONLoader.html
  35. 21 21
      docs/api/loaders/Loader.html
  36. 34 27
      docs/api/loaders/LoadingManager.html
  37. 56 0
      docs/api/loaders/MTLLoader.html
  38. 50 22
      docs/api/loaders/MaterialLoader.html
  39. 75 0
      docs/api/loaders/OBJLoader.html
  40. 87 0
      docs/api/loaders/OBJMTLLoader.html
  41. 46 16
      docs/api/loaders/ObjectLoader.html
  42. 95 0
      docs/api/loaders/PDBLoader.html
  43. 47 0
      docs/api/loaders/SVGLoader.html
  44. 114 0
      docs/api/loaders/SceneLoader.html
  45. 77 0
      docs/api/loaders/TGALoader.html
  46. 45 58
      docs/api/loaders/TextureLoader.html
  47. 47 15
      docs/api/loaders/XHRLoader.html
  48. 73 0
      docs/api/loaders/glTFLoader.html
  49. 2 2
      docs/api/materials/Material.html
  50. 2 5
      docs/api/materials/MeshLambertMaterial.html
  51. 2 2
      docs/api/materials/MeshPhongMaterial.html
  52. 23 23
      docs/api/materials/ShaderMaterial.html
  53. 1 1
      docs/api/math/Frustum.html
  54. 1 1
      docs/api/math/Ray.html
  55. 10 6
      docs/api/math/Spline.html
  56. 1 1
      docs/api/math/Vector4.html
  57. 3 3
      docs/api/objects/LensFlare.html
  58. 2 2
      docs/api/objects/Mesh.html
  59. 1 1
      docs/api/objects/PointCloud.html
  60. 1 1
      docs/api/objects/SkinnedMesh.html
  61. 1 1
      docs/api/objects/Sprite.html
  62. 15 2
      docs/api/renderers/CanvasRenderer.html
  63. 4 33
      docs/api/renderers/WebGLRenderer.html
  64. 1 13
      docs/api/renderers/webgl/plugins/LensFlarePlugin.html
  65. 1 23
      docs/api/renderers/webgl/plugins/ShadowMapPlugin.html
  66. 2 16
      docs/api/renderers/webgl/plugins/SpritePlugin.html
  67. 18 13
      docs/list.js
  68. 1 1
      editor/index.html
  69. 10 1
      editor/js/Editor.js
  70. 11 20
      editor/js/Menubar.File.js
  71. 14 28
      editor/js/Sidebar.Geometry.js
  72. 2 0
      editor/js/Sidebar.Scene.js
  73. 1 0
      editor/js/libs/ui.editor.js
  74. 15 0
      editor/js/libs/ui.js
  75. 2 0
      editor/js/libs/ui.three.js
  76. 1 2
      examples/canvas_camera_orthographic.html
  77. 1 2
      examples/canvas_camera_orthographic2.html
  78. 1 2
      examples/canvas_interactive_voxelpainter.html
  79. 3 4
      examples/index.html
  80. 1 0
      examples/js/AudioObject.js
  81. 1 0
      examples/js/BlendCharacter.js
  82. 1 1
      examples/js/Detector.js
  83. 1 0
      examples/js/MarchingCubes.js
  84. 1 0
      examples/js/Mirror.js
  85. 4 0
      examples/js/ParametricGeometries.js
  86. 1 0
      examples/js/WaterShader.js
  87. 2 1
      examples/js/cameras/CombinedCamera.js
  88. 6 8
      examples/js/controls/DeviceOrientationControls.js
  89. 1 0
      examples/js/controls/EditorControls.js
  90. 4 10
      examples/js/controls/FirstPersonControls.js
  91. 55 0
      examples/js/controls/MouseControls.js
  92. 2 5
      examples/js/controls/OculusControls.js
  93. 32 15
      examples/js/controls/OrbitControls.js
  94. 1 0
      examples/js/controls/OrthographicTrackballControls.js
  95. 0 122
      examples/js/controls/PointerLockControls.js
  96. 1 0
      examples/js/controls/TrackballControls.js
  97. 7 0
      examples/js/controls/TransformControls.js
  98. 60 59
      examples/js/controls/VRControls.js
  99. 1 0
      examples/js/curves/NURBSCurve.js
  100. 2 1
      examples/js/effects/VREffect.js

+ 1 - 1
bower.json

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

文件差異過大導致無法顯示
+ 318 - 138
build/three.js


文件差異過大導致無法顯示
+ 188 - 186
build/three.min.js


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

@@ -25,7 +25,7 @@
 
 
 		<h3>[name]( colormap, numberOfColors )</h3>
 		<h3>[name]( colormap, numberOfColors )</h3>
                 <div>
                 <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.
                 numberOfColors - optional argument that sets the number of colors used to represent the data array.
 		</div>
 		</div>
 
 

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

@@ -28,7 +28,7 @@
 		<h3>[method:DataTexture generateDataTexture]([page:Number width], [page:Number height], [page:Number color])</h3>
 		<h3>[method:DataTexture generateDataTexture]([page:Number width], [page:Number height], [page:Number color])</h3>
 		<div>
 		<div>
 		width -- The width of the texture. <br />
 		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.
 		color -- The hexadecimal value of the color.
 		</div>
 		</div>
 		<div>
 		<div>

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

@@ -9,7 +9,7 @@
 	<body>
 	<body>
 		<h1>[name]</h1>
 		<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>
 		<h2>Methods</h2>
@@ -25,7 +25,7 @@
 		This is mostly useful for object that need a material and a wireframe implementation.
 		This is mostly useful for object that need a material and a wireframe implementation.
 		</div>
 		</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>
 		<div>
 		child -- The object to add to the parent  <br />
 		child -- The object to add to the parent  <br />
 		scene -- The scene to detach the object on. <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.
 		Attaches the object to the parent without the moving the object in the worldspace.
 		</div>
 		</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>
 		<div>
 		child -- The object to remove from the parent  <br />
 		child -- The object to remove from the parent  <br />
 		scene -- The scene to attach the object on. <br />
 		scene -- The scene to attach the object on. <br />

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

@@ -9,7 +9,7 @@
 	<body>
 	<body>
 		<h1>[name]</h1>
 		<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>
 		<h2>Constructor</h2>
@@ -71,34 +71,19 @@
 		The type to indicate how to interpolate between 2 data points.
 		The type to indicate how to interpolate between 2 data points.
 		</div> 
 		</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>
 		<h2>Methods</h2>
 		
 		
-		<h3>[method:todo play]([page:Number startTime])</h3>
+		<h3>[method:null play]([page:Number startTime])</h3>
 		<div>
 		<div>
 		Starts the animation from a moment startTime in the animation.
 		Starts the animation from a moment startTime in the animation.
 		</div>
 		</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>
 		<div>
 		Stops the animation.
 		Stops the animation.
 		</div>
 		</div>
 
 
-		<h3>[method:todo update]([page:Number deltaTimeMS])</h3>
+		<h3>[method:Boolean update]([page:Number deltaTimeMS])</h3>
 		<div>
 		<div>
 		deltaTimeMS -- The time of the between the previous frame and this frame in miliseconds. 
 		deltaTimeMS -- The time of the between the previous frame and this frame in miliseconds. 
 		</div>
 		</div>

+ 13 - 13
docs/api/extras/cameras/CombinedCamera.html

@@ -101,7 +101,7 @@
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 
-		<h3>[method:todo setFov]([page:Number fov])</h3>
+		<h3>[method:null setFov]([page:Number fov])</h3>
 		<div>
 		<div>
 		fov --  Camera frustum vertical field of view in perspective view.
 		fov --  Camera frustum vertical field of view in perspective view.
 		</div>
 		</div>
@@ -109,7 +109,7 @@
 		sets the camera frustum vertical field of view in perspective view.
 		sets the camera frustum vertical field of view in perspective view.
 		</div>
 		</div>
 
 
-		<h3>[method:todo setZoom]([page:Number zoom])</h3>
+		<h3>[method:null setZoom]([page:Number zoom])</h3>
 		<div>
 		<div>
 		zoom -- The zoom factor.
 		zoom -- The zoom factor.
 		</div>
 		</div>
@@ -117,7 +117,7 @@
 		Sets the zoomfactor.
 		Sets the zoomfactor.
 		</div>
 		</div>
 
 
-		<h3>[method:todo setLens]([page:number focalLength], [page:Number frameHeight])</h3>
+		<h3>[method:null setLens]([page:number focalLength], [page:Number frameHeight])</h3>
 		<div>
 		<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 />
 		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*)
 		frameHeight -- the size of the frame in mm. (default is *35*)
@@ -126,37 +126,37 @@
 		Sets the fov based on lens data.
 		Sets the fov based on lens data.
 		</div>
 		</div>
 
 
-		<h3>[method:todo toFrontView]()</h3>
+		<h3>[method:null toFrontView]()</h3>
 		<div>
 		<div>
 		Sets the camera to view the front of the target.
 		Sets the camera to view the front of the target.
 		</div>
 		</div>
 
 
-		<h3>[method:todo toBackView]()</h3>
+		<h3>[method:null toBackView]()</h3>
 		<div>
 		<div>
 		Sets the camera to view the back of the target.
 		Sets the camera to view the back of the target.
 		</div>
 		</div>
 
 
-		<h3>[method:todo toLeftView]()</h3>
+		<h3>[method:null toLeftView]()</h3>
 		<div>
 		<div>
 		Sets the camera to view the left of the target.
 		Sets the camera to view the left of the target.
 		</div>
 		</div>
 
 
-		<h3>[method:todo toRightView]()</h3>
+		<h3>[method:null toRightView]()</h3>
 		<div>
 		<div>
 		Sets the camera to view the right of the target.
 		Sets the camera to view the right of the target.
 		</div>
 		</div>
 
 
-		<h3>[method:todo toTopView]()</h3>
+		<h3>[method:null toTopView]()</h3>
 		<div>
 		<div>
 		Sets the camera to view the top.
 		Sets the camera to view the top.
 		</div>
 		</div>
 
 
-		<h3>[method:todo toBottomView]()</h3>
+		<h3>[method:null toBottomView]()</h3>
 		<div>
 		<div>
 		Sets the camera to view the bottom.
 		Sets the camera to view the bottom.
 		</div>
 		</div>
 
 
-		<h3>[method:todo setSize]([page:Number width], [page:Number height])</h3>
+		<h3>[method:null setSize]([page:Number width], [page:Number height])</h3>
 		<div>
 		<div>
 		width -- The width of the orthographic view.<br />
 		width -- The width of the orthographic view.<br />
 		height -- The height of the orthographic view.
 		height -- The height of the orthographic view.
@@ -165,17 +165,17 @@
 		Sets the size of the orthographic view.
 		Sets the size of the orthographic view.
 		</div>
 		</div>
 
 
-		<h3>[method:todo toOrthographic]()</h3>
+		<h3>[method:null toOrthographic]()</h3>
 		<div>
 		<div>
 		Change the camera to orthographic view.
 		Change the camera to orthographic view.
 		</div>
 		</div>
 
 
-		<h3>[method:todo toPerspective]()</h3>
+		<h3>[method:null toPerspective]()</h3>
 		<div>
 		<div>
 		Change the camera to Perspective view.
 		Change the camera to Perspective view.
 		</div>
 		</div>
 
 
-		<h3>[method:todo updateProjectionMatrix]()</h3>
+		<h3>[method:null updateProjectionMatrix]()</h3>
 		<div>
 		<div>
 		Updates the ProjectionMatrix.
 		Updates the ProjectionMatrix.
 		</div>
 		</div>

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

@@ -10,7 +10,10 @@
 		<h1>[name]</h1>
 		<h1>[name]</h1>
 
 
 		<div class="desc">An extensible curve object which contains methods for interpolation.</div>
 		<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>
 		<h2>Constructor</h2>
 
 
@@ -23,34 +26,34 @@
 
 
 		<h2>Methods</h2>
 		<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>
 		<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>
 		<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>
 		<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>
 		<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>
 		<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>
 		<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>
 		<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>
 		<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>
 		<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>
 		<div>Returns tangent at equidistant point u on the curve</div>
 
 
 
 

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

@@ -17,24 +17,27 @@
 
 
 <code>
 <code>
 //Create a closed wavey loop
 //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();
 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>
 </code>
 
 
+		<h3>[example:webgl_geometry_extrude_splines geometry / extrude / splines] (choose SampleClosedSpline)</h3>
+			
+
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
 
 
-		<h3>[name]([page:Array points])</h3>
+		<h3>[name]( [page:Array points] )</h3>
 		<div>points – An array of [page:Vector3] points</div>
 		<div>points – An array of [page:Vector3] points</div>
 
 
 
 

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

@@ -11,35 +11,54 @@
 		
 		
 		<h1>[name]</h1>
 		<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>
 		<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>
 		<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>
 		<h2>Methods</h2>
 		
 		
-
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
+		<h3>See [page:Curve] for inherited methods</h3>
 		
 		
 		<h2>Source</h2>
 		<h2>Source</h2>
 
 

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

@@ -11,36 +11,55 @@
 		
 		
 		<h1>[name]</h1>
 		<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>
 		<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>
 		<h2>Source</h2>
 
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 		[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
 	false             // aClockwise
 );
 );
 
 
-var path = new THREE.Path( curve.getPoints(50) );
+var path = new THREE.Path( curve.getPoints( 50 ) );
 var geometry = path.createPointsGeometry( 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 );
 var ellipse = new THREE.Line( geometry, material );
 </code>
 </code>
 
 
 		<h2>Constructor</h2>
 		<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>
 		<div>
 			aX – The X center of the ellipse<br/>
 			aX – The X center of the ellipse<br/>
 			aY – The Y 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>
 		<h2>Constructor</h2>
 
 
 
 
-		<h3>[name]([page:Vector2 v1], [page:Vector2 v2])</h3>
+		<h3>[name]( [page:Vector2 v1], [page:Vector2 v2] )</h3>
 		<div>
 		<div>
 			v1 – The start point<br/>
 			v1 – The start point<br/>
 			v2 - The end point
 			v2 - The end point

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

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

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

@@ -11,36 +11,54 @@
 		
 		
 		<h1>[name]</h1>
 		<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>
 		<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>
 		<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>
 		<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>
 		<h2>Methods</h2>
 		
 		
 
 
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
-		
+		<h3>See [page:Curve] for inherited methods</h3>		
+
 		<h2>Source</h2>
 		<h2>Source</h2>
 
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 		[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>
 		<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>
 		<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>
 		<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>
 		<h2>Methods</h2>
 		
 		
 
 
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
+		<h3>See [page:Curve] for inherited methods</h3>		
 		
 		
 		<h2>Source</h2>
 		<h2>Source</h2>
 
 

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

@@ -16,27 +16,28 @@
 		<h2>Example</h2>
 		<h2>Example</h2>
 
 
 <code>
 <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 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>
 </code>
 
 
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
 
 
-		<h3>[name]([page:Array points])</h3>
+		<h3>[name]( [page:Array points] )</h3>
 		<div>points – An array of [page:Vector2] points</div>
 		<div>points – An array of [page:Vector2] points</div>
 
 
 
 

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

@@ -17,24 +17,30 @@
 
 
 <code>
 <code>
 //Create a closed bent a sine-like wave
 //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();
 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>
 </code>
 
 
+		<h3>[example:webgl_geometry_extrude_splines geometry / extrude / splines ] (choose PipeSpline)</h3>
+
+
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
 
 
-		<h3>[name]([page:Array points])</h3>
+		<h3>[name]( [page:Array points] )</h3>
 		<div>points – An array of [page:Vector3] points</div>
 		<div>points – An array of [page:Vector3] points</div>
 
 
 
 

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

@@ -48,7 +48,7 @@
 
 
 		<h2>Methods</h2>
 		<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>
 		<div>
 			shapes — An Array of shapes to add. <br />
 			shapes — An Array of shapes to add. <br />
 			options — Object that can contain the following parameters.
 			options — Object that can contain the following parameters.
@@ -69,7 +69,7 @@
 	</div>
 	</div>
 		<div>Adds the shapes to the list to extrude.</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>
 		<div>
 			shape — A shape to add. <br />
 			shape — A shape to add. <br />
 			options — Object that can contain the following parameters.
 			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.
 		Adds a list of shapes to the geometry.
 		</div>
 		</div>
 
 
-		<h3>[method:todo addShape]([page:Shape shape], [page:Object options])</h3>
+		<h3>[method:null addShape]([page:Shape shape], [page:Object options])</h3>
 		<div>
 		<div>
 		shape — [page:Shape] <br />
 		shape — [page:Shape] <br />
 		options — See options in constructor
 		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>
 		<div>
 		hex -- The hexadicmal value of the color
 		hex -- The hexadicmal value of the color
 		</div>
 		</div>
@@ -70,7 +70,7 @@
 		Sets the color of the arrowHelper.
 		Sets the color of the arrowHelper.
 		</div>
 		</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>
 		<div>
 		length -- The desired length<br />
 		length -- The desired length<br />
 		headLength -- The length of the head of the arrow<br />
 		headLength -- The length of the head of the arrow<br />
@@ -80,7 +80,7 @@
 		Sets the length of the arrowhelper.
 		Sets the length of the arrowhelper.
 		</div>
 		</div>
 
 
-		<h3>[method:todo setDirection]([page:vector3 dir])</h3>
+		<h3>[method:null setDirection]([page:vector3 dir])</h3>
 		<div>
 		<div>
 		dir -- The desired direction in euler format.
 		dir -- The desired direction in euler format.
 		</div>
 		</div>

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

@@ -26,7 +26,7 @@
 
 
 		<h3>[name]([page:Number size])</h3>
 		<h3>[name]([page:Number size])</h3>
 		<div>
 		<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>
 		<div>
 		<div>
 		Creates an axisHelper with lines of length size.
 		Creates an axisHelper with lines of length size.

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

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

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

@@ -37,7 +37,7 @@
 		
 		
 		<h2>Methods</h2>
 		<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>
 		<div>
 		colorCenterLine -- The color of the centerline. This can be a [page:Color], a hexadecimal value and an CSS-Color name. <br />
 		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.
 		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>
 		<h2>Methods</h2>
 
 
 
 
-		<h3>[method:todo render]([page:Function renderCallback])</h3>
+		<h3>[method:null render]([page:Function renderCallback])</h3>
 		<div>
 		<div>
 		renderCallback -- A function to render the generated object.
 		renderCallback -- A function to render the generated object.
 		</div>
 		</div>

+ 0 - 72
docs/api/extras/renderers/plugins/DepthPassPlugin.html

@@ -1,72 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8" />
-		<script src="../../../../list.js"></script>
-		<script src="../../../../page.js"></script>
-		<link type="text/css" rel="stylesheet" href="../../../../page.css" />
-	</head>
-	<body>
-		<h1>[name]</h1>
-
-		<div class="desc">todo</div>
-
-
-		<h2>Constructor</h2>
-
-
-		<h3>[name]()</h3>
-		<div>
-		todo
-		</div>
-
-
-		<h2>Properties</h2>
-
-
-
-		<h3>[property:boolean enabled]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h3>[property:object renderTarget]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h2>Methods</h2>
-
-
-
-		<h3>[method:todo init]([page:todo renderer])</h3>
-		<div>
-		renderer -- todo
-		</div>
-		<div>
-		todo
-		</div>
-
-		<h3>[method:todo update]([page:todo scene], [page:todo camera])</h3>
-		<div>
-		scene -- todo <br />
-		camera -- todo
-		</div>
-		<div>
-		todo
-		</div>
-
-		<h3>[method:todo render]([page:todo scene], [page:todo camera])</h3>
-		<div>
-		scene -- todo <br />
-		camera -- 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>

+ 0 - 36
docs/api/extras/shaders/ShaderFlares.html

@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8" />
-		<script src="../../../list.js"></script>
-		<script src="../../../page.js"></script>
-		<link type="text/css" rel="stylesheet" href="../../../page.css" />
-	</head>
-	<body>
-		<h1>[name]</h1>
-
-		<div class="desc">
-		Contains the shader code fragments of the lensflare implementations. 
-		These shouldn't be edited.
-		</div>
-
-
-		<h2>Properties</h2>
-
-
-		<h3>[property:object lensFlare]</h3>
-		<div>
-		The object that contains the vertex code and fragment code of the lensflares implementation when there are no vertex textures available. 
-		</div> 
-
-		<h3>[property:object lensFlareVertexTexture]</h3>
-		<div>
-		The object that contains the vertex code and fragment code of the lensflares implementation when there are vertex textures available.
-		</div> 
-
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-	</body>
-</html>

+ 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>
 	<body>
 		<h1>[name]</h1>
 		<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>
 		<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>
 		<h2>Properties</h2>
 
 
-		<h3>todo</h3>
-		<div>
-		todo
-		</div> 
-
 
 
 		<h2>Methods</h2>
 		<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>
 		<div>
-		todo
+		[page:Object json] — The <em>JSON</em> structure to parse.
 		</div>
 		</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>
 		<h2>Source</h2>
 
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 		[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>
 	<body>
 		<h1>[name]</h1>
 		<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>
 		<h2>Constructor</h2>
 
 
-
-		<h3>todo</h3>
-		<div></div>
+		<h3>[name]()</h3>
+		<div>
+		Creates a new [name].
+		</div>
 
 
 
 
 		<h2>Properties</h2>
 		<h2>Properties</h2>
 
 
-		<h3>todo</h3>
+		<h3>[property:Object files]</h3>
 		<div>
 		<div>
-		todo
-		</div> 
+		An [page:Object object] that hold cached values.
+		</div>
 
 
 
 
 		<h2>Methods</h2>
 		<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>
 		<div>
-		todo
+		Remove the cached value associated with the key.
 		</div>
 		</div>
-		
+
+		<h3>[method:null clear]()</h3>
+		<div>
+		Remove all values from the cache.
+		</div>
+
+
 		<h2>Source</h2>
 		<h2>Source</h2>
 
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 		[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>
 	<body>
 		<h1>[name]</h1>
 		<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>
 		<div>
 		Creates a new [name].
 		Creates a new [name].
 		</div>
 		</div>
-		
+
 		<h2>Properties</h2>
 		<h2>Properties</h2>
 
 
-		<h3>[property:string crossOrigin]</h3>
+		<h3>[property:String crossOrigin]</h3>
 		<div>
 		<div>
 		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
 		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
-		</div> 
+		</div>
 
 
 		<h2>Methods</h2>
 		<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>
 		<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>
 		<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>
 		<div>
-        value -- The crossOrigin string.
+		[page:String value] — The crossOrigin string.
 		</div>
 		</div>
 		<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>
 		<h2>Source</h2>
 
 

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

@@ -15,54 +15,148 @@
 
 
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
-
-		<h3>[name]([page:Boolean showStatus])</h3>
+		<h3>[name]( [page:Boolean showStatus] )</h3>
 		<div>
 		<div>
-		showStatus -- todo
+		[page:Boolean showStatus] — Show the status of loading div.
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Creates a new [name].
 		</div>
 		</div>
-		
-		<h2>Properties</h2>
 
 
 
 
+		<h2>Properties</h2>
+
 		<h3>[property:boolean withCredentials]</h3>
 		<h3>[property:boolean withCredentials]</h3>
 		<div>
 		<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>
 		<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>
 		<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>
 		</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>
 		<div>
-		json -- todo <br />
-		texturePath -- todo
+		[page:Array materials] — an array of [page:Material]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Checks if the loaded object needs tangents based on its materials.
 		</div>
 		</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>
 		<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>
 		<div>
 		<div>
-		todo
+		Updates the DOM object with the progress made.
 		</div>
 		</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>
 		<h2>Source</h2>
 
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 		[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>
 		<h2>Constructor</h2>
 
 
 
 
-		<h3>[name]([page:Boolean showStatus])</h3>
+		<h3>[name]( [page:Boolean showStatus] )</h3>
 		<div>
 		<div>
-		showStatus -- Show the status of loading div.
+		[page:Boolean showStatus] — Show the status of loading div.
 		</div>
 		</div>
 		<div>
 		<div>
 		Creates a new [name]. This should be called as base class.
 		Creates a new [name]. This should be called as base class.
@@ -28,10 +28,10 @@
 
 
 		<h3>[property:Boolean showStatus]</h3>
 		<h3>[property:Boolean showStatus]</h3>
 		<div>If true, show loading status in the statusDomElement.</div>
 		<div>If true, show loading status in the statusDomElement.</div>
-		
+
 		<h3>[property:DOMElement statusDomElement]</h3>
 		<h3>[property:DOMElement statusDomElement]</h3>
 		<div>This is the recipient of status messages.</div>
 		<div>This is the recipient of status messages.</div>
-		
+
 		<h3>[property:Function onLoadStart]</h3>
 		<h3>[property:Function onLoadStart]</h3>
 		<div>Will be called when load starts.</div>
 		<div>Will be called when load starts.</div>
 		<div>The default is a function with empty body.</div>
 		<div>The default is a function with empty body.</div>
@@ -39,63 +39,63 @@
 		<h3>[property:Function onLoadProgress]</h3>
 		<h3>[property:Function onLoadProgress]</h3>
 		<div>Will be called while load progresses.</div>
 		<div>Will be called while load progresses.</div>
 		<div>The default is a function with empty body.</div>
 		<div>The default is a function with empty body.</div>
-		
+
 		<h3>[property:Function onLoadComplete]</h3>
 		<h3>[property:Function onLoadComplete]</h3>
 		<div>Will be called when load completes.</div>
 		<div>Will be called when load completes.</div>
 		<div>The default is a function with empty body.</div>
 		<div>The default is a function with empty body.</div>
-		
+
 		<h3>[property:string crossOrigin]</h3>
 		<h3>[property:string crossOrigin]</h3>
 		<div>
 		<div>
 		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
 		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
-		</div> 
+		</div>
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 
-		<h3>[method:Boolean needsTangents]([page:Array materials])</h3>
+		<h3>[method:Boolean needsTangents]( [page:Array materials] )</h3>
 		<div>
 		<div>
-		materials -- an array of [page:Material]
+		[page:Array materials] — an array of [page:Material]
 		</div>
 		</div>
 		<div>
 		<div>
 		Checks if the loaded object needs tangents based on its materials.
 		Checks if the loaded object needs tangents based on its materials.
 		</div>
 		</div>
 
 
-		<h3>[method:todo updateProgress]([page:object progress])</h3>
+		<h3>[method:null updateProgress]( [page:object progress] )</h3>
 		<div>
 		<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>
 		<div>
 		<div>
 		Updates the DOM object with the progress made.
 		Updates the DOM object with the progress made.
 		</div>
 		</div>
 
 
-		<h3>[method:Material createMaterial]([page:object m], [page:string texturePath])</h3>
+		<h3>[method:Material createMaterial]( [page:object m], [page:string texturePath] )</h3>
 		<div>
 		<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>
 		<div>
 		<div>
 		Creates the Material based on the parameters m.
 		Creates the Material based on the parameters m.
 		</div>
 		</div>
 
 
-		<h3>[method:Array initMaterials]([page:Array materials], [page:string texturePath])</h3>
+		<h3>[method:Array initMaterials]( [page:Array materials], [page:string texturePath] )</h3>
 		<div>
 		<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>
 		<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.
 		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>
 		</div>
 
 
-		<h3>[method:todo extractUrlBase]([page:string url])</h3>
+		<h3>[method:String extractUrlBase]( [page:string url] )</h3>
 		<div>
 		<div>
-		url --  The url to extract the base url from.
+		[page:String url] —  The url to extract the base url from.
 		</div>
 		</div>
 		<div>
 		<div>
-		Extract the base from the URL. 
+		Extract the base from the URL.
 		</div>
 		</div>
 
 
 		<h3>[method:DOMElement addStatusElement]()</h3>
 		<h3>[method:DOMElement addStatusElement]()</h3>
 		<div>
 		<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>
 		</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>
 		<div class="desc">Handles and keeps track of loaded and pending data.</div>
 		<code>
 		<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>
 		</code>
 
 
+
 		<h2>Constructor</h2>
 		<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>
 		<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>
 		<div>
 		<div>
 		Creates a [name].
 		Creates a [name].
 		</div>
 		</div>
-		
-		
+
+
 		<h2>Properties</h2>
 		<h2>Properties</h2>
 
 
-		<h3>[property:function onLoad]</h3>
+		<h3>[property:Function onLoad]</h3>
 		<div>
 		<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>
 		<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 />
 		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.)
 		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>
 		<div>
 		The function that needs to be called when an item errors.
 		The function that needs to be called when an item errors.
-		</div> 
-		
-		
+		</div>
+
+
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 
-		<h3>[method:todo itemStart]( [page:String url] )</h3>
+		<h3>[method:null itemStart]( [page:String url] )</h3>
 		<div>
 		<div>
-		url — the url to load
+		[page:String url] — the url to load
 		</div>
 		</div>
 		<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.
 		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>
 		</div>
 
 
-		<h3>[method:todo itemEnd]( [page:String url] )</h3>
+		<h3>[method:null itemEnd]( [page:String url] )</h3>
 		<div>
 		<div>
-		url — the url to load
+		[page:String url] — the loaded url
 		</div>
 		</div>
 		<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.
 		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>
 		</div>
 
 
+
+		<h2>Example</h2>
+
+		[example:webgl_loader_obj]
+
+
 		<h2>Source</h2>
 		<h2>Source</h2>
 
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 		[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>
 	<body>
 		<h1>[name]</h1>
 		<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>
 		<div>
 		Creates a new [name].
 		Creates a new [name].
 		</div>
 		</div>
@@ -25,32 +25,60 @@
 
 
 		<h2>Methods</h2>
 		<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>
 		<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>
 		<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>
 		<div>
-        value -- The crossOrigin string.
+		[page:String value] — The crossOrigin string.
 		</div>
 		</div>
 		<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>
 		<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>
 		<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>
 	<body>
 		<h1>[name]</h1>
 		<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>
 		<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>
 		<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>
 		<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>
 		<div>
-		todo
+		[page:String value] — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
 		</div>
 		</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>
 		<h2>Source</h2>
 
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 		[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>
 		<h1>[name]</h1>
 
 
 		<div class="desc">Class for loading a [page:Texture texture].</div>
 		<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>
 		<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>
 		<div>
 		<div>
-		message — error message
+		Creates a new [name].
 		</div>
 		</div>
-		
+
+
 		<h2>Properties</h2>
 		<h2>Properties</h2>
 
 
-		<h3>[property:todo crossOrigin]</h3>
+		<h3>[property:String crossOrigin]</h3>
 		<div>
 		<div>
 		default — *null*.<br />
 		default — *null*.<br />
 		If set, assigns the *crossOrigin* attribute of the image to the value of *crossOrigin*, prior to starting the load.
 		If set, assigns the *crossOrigin* attribute of the image to the value of *crossOrigin*, prior to starting the load.
 		</div>
 		</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>
 		<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>
 		<div>
 		<div>
-		todo
+		Begin loading from url and pass the loaded [page:Texture texture] to onLoad.
 		</div>
 		</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>
 		<h2>Source</h2>
 
 

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

@@ -7,38 +7,70 @@
 		<link type="text/css" rel="stylesheet" href="../../page.css" />
 		<link type="text/css" rel="stylesheet" href="../../page.css" />
 	</head>
 	</head>
 	<body>
 	<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>
 		<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>
 		<h2>Properties</h2>
 
 
-		<h3>todo</h3>
+		<h3>[property:Cache cache]</h3>
 		<div>
 		<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>
 		<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>
 		<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>
-		
+		<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>
 		<h2>Source</h2>
 
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 		[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>

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

@@ -145,12 +145,12 @@
 		This clones the material in the optional parameter and returns it.
 		This clones the material in the optional parameter and returns it.
 		</div>
 		</div>
 
 
-		<h3>[method:todo dispose]()</h3>
+		<h3>[method:null dispose]()</h3>
 		<div>
 		<div>
 		This disposes the material.
 		This disposes the material.
 		</div>
 		</div>
 
 
-		<h3>[method:todo setValues]([page:object values])</h3>
+		<h3>[method:null setValues]([page:object values])</h3>
 		<div>
 		<div>
 		values -- a container with parameters.
 		values -- a container with parameters.
 		</div>
 		</div>

+ 2 - 5
docs/api/materials/MeshLambertMaterial.html

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

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

@@ -17,9 +17,9 @@
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
 
 
-		<h3>[name]([page:todo parameters])</h3>
+		<h3>[name]([page:Object parameters])</h3>
 		<div>
 		<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>
 		<div>
 		<div>
 		Example:<br>
 		Example:<br>

+ 23 - 23
docs/api/materials/ShaderMaterial.html

@@ -11,13 +11,13 @@
 
 
 		<h1>[name]</h1>
 		<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>
 		<ul>
 			<li>implement an effect not included with any of the built-in [page:Material materials]</li>
 			<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>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>
 			<li>associate custom data with individual vertices ("custom attributes")</li>
 		</ul>
 		</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>
 		</div>
 
 
 		<h3>Example</h3>
 		<h3>Example</h3>
@@ -39,7 +39,7 @@
 		</code>
 		</code>
 
 
 		<h3>Vertex shaders and fragment shaders</h3>
 		<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>
 		<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 *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>
 			<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).
 		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>
 		<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>
 		<code>
 		attributes: {
 		attributes: {
 			vertexOpacity: { type: 'f', value: [] }
 			vertexOpacity: { type: 'f', value: [] }
 		}
 		}
 		</code>
 		</code>
-		Each attribute must have a *type* property and a *value* property. 
+		Each attribute must have a *type* property and a *value* property.
 		<table>
 		<table>
 			<caption><a id="attribute-types">Attribute types</a></caption>
 			<caption><a id="attribute-types">Attribute types</a></caption>
 			<thead>
 			<thead>
@@ -113,7 +113,7 @@
 				</tr>
 				</tr>
 			</tbody>
 			</tbody>
 		</table>
 		</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>
 		<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:
 			<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>
 			<code>
@@ -135,7 +135,7 @@
 			time: { type: "f", value: 1.0 },
 			time: { type: "f", value: 1.0 },
 			resolution: { type: "v2", value: new THREE.Vector2() }
 			resolution: { type: "v2", value: new THREE.Vector2() }
 		}
 		}
-		</code> 
+		</code>
 		Each uniform must have a <a href="#uniform-types">*type*</a> and a *value*:
 		Each uniform must have a <a href="#uniform-types">*type*</a> and a *value*:
 		<table>
 		<table>
 			<caption><a id="uniform-types">Uniform types</a></caption>
 			<caption><a id="uniform-types">Uniform types</a></caption>
@@ -221,7 +221,7 @@
 		{ type: 'f', value: 1.0 }
 		{ type: 'f', value: 1.0 }
 		</code>
 		</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.
 		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>
 		<h3>[property:Object attributes]</h3>
 		<div>
 		<div>
@@ -230,12 +230,12 @@
 		<code>
 		<code>
 		{ type: 'f', value: [1.0, 0.5, 2.0, ...] }
 		{ type: 'f', value: [1.0, 0.5, 2.0, ...] }
 		</code>
 		</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>
 		<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].
 		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>
 		</p>
-		</div> 
+		</div>
 
 
 		<h3>[property:Object defines]</h3>
 		<h3>[property:Object defines]</h3>
 		<div>
 		<div>
@@ -251,49 +251,49 @@
 		#define FOO 15
 		#define FOO 15
 		#define BAR true
 		#define BAR true
 		</code>
 		</code>
-		in the GLSL code. 
-		</div> 
+		in the GLSL code.
+		</div>
 
 
 		<h3>[property:String fragmentShader]</h3>
 		<h3>[property:String fragmentShader]</h3>
 		<div>
 		<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.
 		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> 
+		</div>
 
 
 		<h3>[property:String vertexShader]</h3>
 		<h3>[property:String vertexShader]</h3>
 		<div>
 		<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.
 		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:Boolean lights]</h3>
 		<div>
 		<div>
 		Defines whether this material uses lighting; true to pass uniform data related to lighting to this shader
 		Defines whether this material uses lighting; true to pass uniform data related to lighting to this shader
-		</div> 
+		</div>
 
 
 		<h3>[property:Boolean morphTargets]</h3>
 		<h3>[property:Boolean morphTargets]</h3>
 		<div>
 		<div>
 		Defines whether the material uses morphTargets; true morphTarget attributes to this shader
 		Defines whether the material uses morphTargets; true morphTarget attributes to this shader
-		</div> 
+		</div>
 
 
 		<h3>[property:Boolean morphNormals]</h3>
 		<h3>[property:Boolean morphNormals]</h3>
 		<div>
 		<div>
 		Defines whether the material uses morphNormals; true to pass morphNormal attributes to this shader
 		Defines whether the material uses morphNormals; true to pass morphNormal attributes to this shader
-		</div> 
+		</div>
 
 
 		<h3>[property:Boolean wireframe]</h3>
 		<h3>[property:Boolean wireframe]</h3>
 		<div>
 		<div>
 		Render geometry as wireframe (using GL_LINES instead of GL_TRIANGLES). Default is false (i.e. render as flat polygons).
 		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 vertexColors]</h3>
 		<h3>[property:Number vertexColors]</h3>
 		<div>
 		<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.
 		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>
 		</div>
-		
+
 		<h3>[property:Boolean skinning]</h3>
 		<h3>[property:Boolean skinning]</h3>
 		<div>
 		<div>
 		Define whether the material uses skinning; true to pass skinning attributes to the shader. Default is false.
 		Define whether the material uses skinning; true to pass skinning attributes to the shader. Default is false.
-		</div> 
+		</div>
 
 
 		<h3>[property:Boolean fog]</h3>
 		<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>Define whether the material color is affected by global fog settings; true to pass fog uniforms to the shader. Default is false.</div>
@@ -302,7 +302,7 @@
 		<h3>[property:Number shading]</h3>
 		<h3>[property:Number shading]</h3>
 		<div>
 		<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.
 		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> 
+		</div>
 
 
 		<h3>[property:Number linewidth]</h3>
 		<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>Controls line thickness; only effective if the material is attached to a [page:Line]. Default is 1.</div>
@@ -319,9 +319,9 @@
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 
-		<h3>[method:todo clone]()</h3>
+		<h3>[method:ShaderMaterial clone]()</h3>
 		<div>
 		<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>
 		</div>
 
 
 		<h2>Source</h2>
 		<h2>Source</h2>

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

@@ -39,7 +39,7 @@
 
 
 		<h2>Methods</h2>
 		<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>
 		<h3>[method:Boolean intersectsObject]( [page:Object3D object] )</h3>
 		<div>
 		<div>

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

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

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

@@ -27,30 +27,34 @@
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 
-		<h3>[method:todo initFromArray]( [page:Array a] )</h3>
+		<h3>[method:null initFromArray]( [page:Array a] )</h3>
 		<div>
 		<div>
 		a — array of triplets containing x, y, z coordinates<br />
 		a — array of triplets containing x, y, z coordinates<br />
 		</div>
 		</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>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>
 		</div>
 
 
-		<h3>[method:todo getPoint]( [page:Integer k] )</h3>
+		<h3>[method:Vector3 getPoint]( [page:Integer k] )</h3>
 		<div>
 		<div>
 		k — point index
 		k — point index
 		</div>
 		</div>
 		<div>Return the interpolated point at *k*.</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>Returns an array with triplets of x, y, z coordinates that correspond to the current control points.
 		</div>
 		</div>
 		
 		
-		<h3>[method:todo getLength]( [page:Integer nSubDivisions] )</h3>
+		<h3>[method:Object getLength]( [page:Integer nSubDivisions] )</h3>
 		<div>
 		<div>
 		nSubDivisions — number of subdivisions between control points. Default is *100*.
 		nSubDivisions — number of subdivisions between control points. Default is *100*.
 		</div>
 		</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>
 		<div>
 		samplingCoef — how many intermediate values to use between spline points
 		samplingCoef — how many intermediate values to use between spline points
 		</div>
 		</div>

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

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

+ 3 - 3
docs/api/extras/objects/LensFlare.html → docs/api/objects/LensFlare.html

@@ -2,9 +2,9 @@
 <html lang="en">
 <html lang="en">
 	<head>
 	<head>
 		<meta charset="utf-8" />
 		<meta charset="utf-8" />
-		<script src="../../../list.js"></script>
-		<script src="../../../page.js"></script>
-		<link type="text/css" rel="stylesheet" href="../../../page.css" />
+		<script src="../../list.js"></script>
+		<script src="../../page.js"></script>
+		<link type="text/css" rel="stylesheet" href="../../page.css" />
 	</head>
 	</head>
 	<body>
 	<body>
 		[page:Object3D] &rarr;
 		[page:Object3D] &rarr;

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

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

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

@@ -41,7 +41,7 @@
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 
-		<h3>[method:todo clone]()</h3>
+		<h3>[method:PointCloud clone]()</h3>
 		<div>
 		<div>
 		This creates a clone of the particle system.
 		This creates a clone of the particle system.
 		</div>
 		</div>

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

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

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

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

+ 15 - 2
docs/api/renderers/CanvasRenderer.html

@@ -13,10 +13,23 @@
                   but draws it using the (slower) <a href="http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas/">Canvas 2D Context</a> API.</div>
                   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>
 		<div class="desc">This renderer can be a nice fallback from [page:WebGLRenderer] for simple scenes:</div>
 		<code>
 		<code>
-		if (window.WebGLRenderingContext)
+		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();
 			renderer = new THREE.WebGLRenderer();
-		else
+		} else {
 			renderer = new THREE.CanvasRenderer();
 			renderer = new THREE.CanvasRenderer();
+		}
 		</code>
 		</code>
 		<div class="desc">
 		<div class="desc">
 			Note: both WebGLRenderer and CanvasRenderer are embedded in the web page using an HTML5 &lt;canvas&gt; tag.
 			Note: both WebGLRenderer and CanvasRenderer are embedded in the web page using an HTML5 &lt;canvas&gt; tag.

+ 4 - 33
docs/api/renderers/WebGLRenderer.html

@@ -88,11 +88,6 @@
 		<div>Default is false. If set, use shadow maps in the scene.</div>
 		<div>Default is false. If set, use shadow maps in the scene.</div>
 
 
 
 
-		<h3>[property:Boolean shadowMapAutoUpdate]</h3>
-
-		<div>Default is true. If set, autoupdate the shadowmaps every frame.</div>
-
-
 		<h3>[property:Integer shadowMapType]</h3>
 		<h3>[property:Integer shadowMapType]</h3>
 
 
 		<div>Defines shadow map type (unfiltered, percentage close filtering, percentage close filtering with bilinear filtering in shader)</div>
 		<div>Defines shadow map type (unfiltered, percentage close filtering, percentage close filtering with bilinear filtering in shader)</div>
@@ -129,18 +124,6 @@
 		<div>Default is true. If set, then Cubemaps are scaled, when they are bigger than the maximum size, to make sure that they aren't bigger than the maximum size.</div>
 		<div>Default is true. If set, then Cubemaps are scaled, when they are bigger than the maximum size, to make sure that they aren't bigger than the maximum size.</div>
 
 
 
 
-		<h3>[property:Boolean renderPluginsPre]</h3>
-
-		<div>An array with render plugins to be applied before rendering.</div>
-		<div>Default is an empty array, or [].</div>
-
-
-		<h3>[property:Boolean renderPluginsPost]</h3>
-
-		<div>An array with render plugins to be applied after rendering.</div>
-		<div>Default is an empty array, or [].</div>
-
-
 		<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>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>
@@ -220,26 +203,14 @@
 		<div>Tells the renderer to clear its color, depth or stencil drawing buffer(s).</div>
 		<div>Tells the renderer to clear its color, depth or stencil drawing buffer(s).</div>
 		<div>Arguments default to true.</div>
 		<div>Arguments default to true.</div>
 
 
-		<h3>[method:todo addPostPlugin]( plugin )</h3>
-		<div>Initialises the postprocessing plugin, and adds it to the renderPluginsPost array.</div>
-
-		<h3>[method:todo addPrePlugin]( plugin )</h3>
-		<div>Initialises the preprocessing plugin, and adds it to the renderPluginsPre array.</div>
-
-		<h3>[method:todo updateShadowMap]( [page:Scene scene], [page:Camera camera] )</h3>
-		<div>scene — an instance of [page:Scene]<br />
-		camera — an instance of [page:Camera]</div>
-		<div>Tells the shadow map plugin to update using the passed scene and camera parameters.</div>
-
-
 		<h3>[method:todo renderBufferImmediate]( [page:Object3D object], [page:shaderprogram program], [page:Material shading] )</h3>
 		<h3>[method:todo renderBufferImmediate]( [page:Object3D object], [page:shaderprogram program], [page:Material shading] )</h3>
 		<div>object — an instance of [page:Object3D]]<br />
 		<div>object — an instance of [page:Object3D]]<br />
 		program — an instance of shaderProgram<br />
 		program — an instance of shaderProgram<br />
 		shading — an instance of Material<br />
 		shading — an instance of Material<br />
 		</div>
 		</div>
 		<div>
 		<div>
-        Render an immediate buffer. Gets called by renderImmediateObject.
-        </div>
+		Render an immediate buffer. Gets called by renderImmediateObject.
+		</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:todo renderBufferDirect]( [page:Camera camera], [page:Array lights], [page:Fog fog], [page:Material material], [page:Object geometryGroup], [page:Object3D object] )</h3>
@@ -253,8 +224,8 @@
 		<h3>[method:todo render]( [page:Scene scene], [page:Camera camera], [page:WebGLRenderTarget renderTarget], [page:Boolean forceClear] )</h3>
 		<h3>[method:todo render]( [page:Scene scene], [page:Camera camera], [page:WebGLRenderTarget renderTarget], [page:Boolean forceClear] )</h3>
 		<div>Render a scene using a camera.</div>
 		<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>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>
+		<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:todo renderImmediateObject]( camera, lights, fog, material, object )</h3>
 		<div>Renders an immediate Object using a camera.</div>
 		<div>Renders an immediate Object using a camera.</div>

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

@@ -14,27 +14,15 @@
 
 
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
-
 		<h3>[name]()</h3>
 		<h3>[name]()</h3>
 		<div>
 		<div>
 		Creates a new [name]. 
 		Creates a new [name]. 
 		</div>
 		</div>
 
 
 
 
-
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 
-
-
-		<h3>[method:todo init]([page:WebglRenderer renderer])</h3>
-		<div>
-		renderer -- The WebglRenderer that uses the plugin.
-		</div>
-		<div>
-		Initializes the plugin to work with the renderer. This gets called when the plugin gets added as a plugin to the renderer.
-		</div>
-
-		<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>
 		<div>
 		scene -- The scene to render. <br />
 		scene -- The scene to render. <br />
 		camera -- The camera to render. <br />
 		camera -- The camera to render. <br />

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

@@ -12,11 +12,8 @@
 		<div class="desc">The Webglrenderer plugin class that allows shadowmaps to be rendered in the WebglRenderer. This plugin is automatically loaded in the Webglrenderer.</div>
 		<div class="desc">The Webglrenderer plugin class that allows shadowmaps to be rendered in the WebglRenderer. This plugin is automatically loaded in the Webglrenderer.</div>
 
 
 
 
-
-
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
-
 		<h3>[name]()</h3>
 		<h3>[name]()</h3>
 		<div>
 		<div>
 		Creates a new [name]. 
 		Creates a new [name]. 
@@ -25,26 +22,7 @@
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 
-
-
-		<h3>[method:todo init]([page:WebGLRenderer renderer])</h3>
-		<div>
-		renderer -- The WebglRenderer that uses the plugin.
-		</div>
-		<div>
-		Initializes the plugin to work with the renderer. This gets called when the plugin gets added as a plugin to the renderer.
-		</div>
-
-		<h3>[method:todo update]([page:Scene scene], [page:Camera camera])</h3>
-		<div>
-		scene -- The scene to render. <br />
-		camera -- The camera to render.
-		</div>
-		<div>
-		Updates the textures nessecary for the shadowmaps. This gets called by updateShadowMap in [page:WebGLRenderer].
-		</div>
-
-		<h3>[method:todo render]([page:Scene scene], [page:Camera camera])</h3>
+		<h3>[method:null render]([page:Scene scene], [page:Camera camera])</h3>
 		<div>
 		<div>
 		scene -- The scene to render. <br />
 		scene -- The scene to render. <br />
 		camera -- The camera to render.
 		camera -- The camera to render.

+ 2 - 16
docs/api/extras/renderers/plugins/SpritePlugin.html → docs/api/renderers/webgl/plugins/SpritePlugin.html

@@ -14,32 +14,18 @@
 
 
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
-
 		<h3>[name]()</h3>
 		<h3>[name]()</h3>
 		<div>
 		<div>
 		Creates a new [name]. 
 		Creates a new [name]. 
 		</div>
 		</div>
 
 
 
 
-
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 
-
-
-		<h3>[method:todo init]([page:WebglRenderer renderer])</h3>
-		<div>
-		renderer -- The WebglRenderer that uses the plugin.
-		</div>
-		<div>
-		Initializes the plugin to work with the renderer. This gets called when the plugin gets added as a plugin to the renderer.
-		</div>
-
-		<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])</h3>
 		<div>
 		<div>
 		scene -- The scene to render. <br />
 		scene -- The scene to render. <br />
-		camera -- The camera to render. <br />
-		viewportWidth -- The width of the viewport. <br />
-		viewportHeight -- The height of the viewport.
+		camera -- The camera to render.
 		</div>
 		</div>
 		<div>
 		<div>
 		Renders the sprites defined in the scene. This gets automatically called as post-render function to draw the lensflares.
 		Renders the sprites defined in the scene. This gets automatically called as post-render function to draw the lensflares.

+ 18 - 13
docs/list.js

@@ -46,15 +46,25 @@ var list = {
 
 
 
 
 		"Loaders": [
 		"Loaders": [
+			[ "BabylonLoader", "api/loaders/BabylonLoader" ],
 			[ "BufferGeometryLoader", "api/loaders/BufferGeometryLoader" ],
 			[ "BufferGeometryLoader", "api/loaders/BufferGeometryLoader" ],
 			[ "Cache", "api/loaders/Cache" ],
 			[ "Cache", "api/loaders/Cache" ],
+			[ "ColladaLoader", "api/loaders/ColladaLoader" ],
+			[ "glTFLoader", "api/loaders/glTFLoader" ],
 			[ "ImageLoader", "api/loaders/ImageLoader" ],
 			[ "ImageLoader", "api/loaders/ImageLoader" ],
 			[ "JSONLoader", "api/loaders/JSONLoader" ],
 			[ "JSONLoader", "api/loaders/JSONLoader" ],
 			[ "Loader", "api/loaders/Loader" ],
 			[ "Loader", "api/loaders/Loader" ],
 			[ "LoadingManager", "api/loaders/LoadingManager" ],
 			[ "LoadingManager", "api/loaders/LoadingManager" ],
 			[ "MaterialLoader", "api/loaders/MaterialLoader" ],
 			[ "MaterialLoader", "api/loaders/MaterialLoader" ],
+			[ "MTLLoader", "api/loaders/MTLLoader" ],
+			[ "OBJLoader", "api/loaders/OBJLoader" ],
+			[ "OBJMTLLoader", "api/loaders/OBJMTLLoader" ],
 			[ "ObjectLoader", "api/loaders/ObjectLoader" ],
 			[ "ObjectLoader", "api/loaders/ObjectLoader" ],
+			[ "PDBLoader", "api/loaders/PDBLoader" ],
+			[ "SVGLoader", "api/loaders/SVGLoader" ],
+			[ "SceneLoader", "api/loaders/SceneLoader" ],
 			[ "TextureLoader", "api/loaders/TextureLoader" ],
 			[ "TextureLoader", "api/loaders/TextureLoader" ],
+			[ "TGALoader", "api/loaders/TGALoader" ],
 			[ "XHRLoader", "api/loaders/XHRLoader" ]
 			[ "XHRLoader", "api/loaders/XHRLoader" ]
 		],
 		],
 
 
@@ -98,6 +108,7 @@ var list = {
 
 
 		"Objects": [
 		"Objects": [
 			[ "Bone", "api/objects/Bone" ],
 			[ "Bone", "api/objects/Bone" ],
+			[ "LensFlare", "api/objects/LensFlare" ],
 			[ "Line", "api/objects/Line" ],
 			[ "Line", "api/objects/Line" ],
 			[ "LOD", "api/objects/LOD" ],
 			[ "LOD", "api/objects/LOD" ],
 			[ "Mesh", "api/objects/Mesh" ],
 			[ "Mesh", "api/objects/Mesh" ],
@@ -126,6 +137,12 @@ var list = {
 			[ "WebGLShader", "api/renderers/webgl/WebGLShader" ]
 			[ "WebGLShader", "api/renderers/webgl/WebGLShader" ]
 		],
 		],
 
 
+		"Renderers / WebGL / Plugins": [
+			[ "LensFlarePlugin", "api/renderers/webgl/plugins/LensFlarePlugin" ],
+			[ "ShadowMapPlugin", "api/renderers/webgl/plugins/ShadowMapPlugin" ],
+			[ "SpritePlugin", "api/renderers/webgl/plugins/SpritePlugin" ]
+		],
+
 		"Scenes": [
 		"Scenes": [
 			[ "Fog", "api/scenes/Fog" ],
 			[ "Fog", "api/scenes/Fog" ],
 			[ "FogExp2", "api/scenes/FogExp2" ],
 			[ "FogExp2", "api/scenes/FogExp2" ],
@@ -157,7 +174,7 @@ var list = {
 			[ "CubeCamera", "api/extras/cameras/CubeCamera" ]
 			[ "CubeCamera", "api/extras/cameras/CubeCamera" ]
 		],
 		],
 
 
-		
+
 		"Extras / Core": [
 		"Extras / Core": [
 			[ "Curve", "api/extras/core/Curve" ],
 			[ "Curve", "api/extras/core/Curve" ],
 			[ "CurvePath", "api/extras/core/CurvePath" ],
 			[ "CurvePath", "api/extras/core/CurvePath" ],
@@ -222,21 +239,9 @@ var list = {
 
 
 		"Extras / Objects": [
 		"Extras / Objects": [
 			[ "ImmediateRenderObject", "api/extras/objects/ImmediateRenderObject" ],
 			[ "ImmediateRenderObject", "api/extras/objects/ImmediateRenderObject" ],
-			[ "LensFlare", "api/extras/objects/LensFlare" ],
 			[ "MorphBlendMesh", "api/extras/objects/MorphBlendMesh" ]
 			[ "MorphBlendMesh", "api/extras/objects/MorphBlendMesh" ]
 		],
 		],
 
 
-		"Extras / Renderers / Plugins": [
-			[ "DepthPassPlugin", "api/extras/renderers/plugins/DepthPassPlugin" ],
-			[ "LensFlarePlugin", "api/extras/renderers/plugins/LensFlarePlugin" ],
-			[ "ShadowMapPlugin", "api/extras/renderers/plugins/ShadowMapPlugin" ],
-			[ "SpritePlugin", "api/extras/renderers/plugins/SpritePlugin" ]
-		],
-
-		"Extras / Shaders": [
-			[ "ShaderFlares", "api/extras/shaders/ShaderFlares" ]
-		],
-
 		"Examples" : [
 		"Examples" : [
 			[ "LookupTable", "api/examples/Lut" ]
 			[ "LookupTable", "api/examples/Lut" ]
 
 

+ 1 - 1
editor/index.html

@@ -144,7 +144,7 @@
 				var timeout;
 				var timeout;
 
 
 				var saveState = function ( scene ) {
 				var saveState = function ( scene ) {
-				
+
 					if ( editor.config.getKey( 'autosave' ) === false ) {
 					if ( editor.config.getKey( 'autosave' ) === false ) {
 
 
 						return;
 						return;

+ 10 - 1
editor/js/Editor.js

@@ -63,6 +63,8 @@ var Editor = function () {
 	this.loader = new Loader( this );
 	this.loader = new Loader( this );
 
 
 	this.camera = new THREE.PerspectiveCamera( 50, 1, 0.1, 100000 );
 	this.camera = new THREE.PerspectiveCamera( 50, 1, 0.1, 100000 );
+	this.camera.name = 'Camera';
+
 	this.scene = new THREE.Scene();
 	this.scene = new THREE.Scene();
 	this.scene.name = 'Scene';
 	this.scene.name = 'Scene';
 
 
@@ -72,7 +74,7 @@ var Editor = function () {
 	this.geometries = {};
 	this.geometries = {};
 	this.materials = {};
 	this.materials = {};
 	this.textures = {};
 	this.textures = {};
-	this.scripts = {};
+	// this.scripts = {};
 
 
 	this.selected = null;
 	this.selected = null;
 	this.helpers = {};
 	this.helpers = {};
@@ -310,6 +312,13 @@ Editor.prototype = {
 
 
 	selectById: function ( id ) {
 	selectById: function ( id ) {
 
 
+		if ( id === this.camera.id ) {
+
+			this.select( this.camera );
+			return;
+
+		}
+
 		this.select( this.scene.getObjectById( id, true ) );
 		this.select( this.scene.getObjectById( id, true ) );
 
 
 	},
 	},

+ 11 - 20
editor/js/Menubar.File.js

@@ -160,18 +160,9 @@ Menubar.File = function ( editor ) {
 
 
 		}
 		}
 
 
-		var geometry = object.geometry;
-
-		if ( geometry === undefined ) {
-
-			alert( 'The selected object doesn\'t have geometry.' );
-			return;
-
-		}
-
 		var exporter = new THREE.OBJExporter();
 		var exporter = new THREE.OBJExporter();
 
 
-		exportString( exporter.parse( geometry ) );
+		exportString( exporter.parse( object ) );
 
 
 	} );
 	} );
 	options.add( option );
 	options.add( option );
@@ -194,33 +185,33 @@ Menubar.File = function ( editor ) {
 
 
 	options.add( new UI.HorizontalRule() );
 	options.add( new UI.HorizontalRule() );
 
 
-	/*
-
-	// Test
+	// Publish
 
 
 	var option = new UI.Panel();
 	var option = new UI.Panel();
 	option.setClass( 'option' );
 	option.setClass( 'option' );
-	option.setTextContent( 'Test' );
+	option.setTextContent( 'Publish' );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var text = new UI.Text( 'blah' );
-		editor.showDialog( text );
+		alert( 'Not yet...' );
 
 
 	} );
 	} );
 	options.add( option );
 	options.add( option );
-	*/
 
 
-	// Publish
+	/*
+	// Test
 
 
 	var option = new UI.Panel();
 	var option = new UI.Panel();
 	option.setClass( 'option' );
 	option.setClass( 'option' );
-	option.setTextContent( 'Publish' );
+	option.setTextContent( 'Test' );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		alert( 'Not yet...' );
+		var text = new UI.Text( 'blah' );
+		editor.showDialog( text );
 
 
 	} );
 	} );
 	options.add( option );
 	options.add( option );
+	*/
+
 
 
 
 
 	//
 	//

+ 14 - 28
editor/js/Sidebar.Geometry.js

@@ -61,7 +61,8 @@ Sidebar.Geometry = function ( editor ) {
 
 
 	// parameters
 	// parameters
 
 
-	var parameters;
+	var parameters = new UI.Panel();
+	container.add( parameters );
 
 
 
 
 	//
 	//
@@ -83,60 +84,44 @@ Sidebar.Geometry = function ( editor ) {
 
 
 			//
 			//
 
 
-			if ( parameters !== undefined ) {
-
-				container.remove( parameters );
-				parameters = undefined;
-
-			}
+			parameters.clear();
 
 
 			if ( geometry instanceof THREE.BoxGeometry ) {
 			if ( geometry instanceof THREE.BoxGeometry ) {
 
 
-				parameters = new Sidebar.Geometry.BoxGeometry( signals, object );
-				container.add( parameters );
+				parameters.add( new Sidebar.Geometry.BoxGeometry( signals, object ) );
 
 
 			} else if ( geometry instanceof THREE.CircleGeometry ) {
 			} else if ( geometry instanceof THREE.CircleGeometry ) {
 
 
-				parameters = new Sidebar.Geometry.CircleGeometry( signals, object );
-				container.add( parameters );
+				parameters.add( new Sidebar.Geometry.CircleGeometry( signals, object ) );
 
 
 			} else if ( geometry instanceof THREE.CylinderGeometry ) {
 			} else if ( geometry instanceof THREE.CylinderGeometry ) {
 
 
-				parameters = new Sidebar.Geometry.CylinderGeometry( signals, object );
-				container.add( parameters );
+				parameters.add( new Sidebar.Geometry.CylinderGeometry( signals, object ) );
 
 
 			} else if ( geometry instanceof THREE.SphereGeometry ) {
 			} else if ( geometry instanceof THREE.SphereGeometry ) {
 
 
-				parameters = new Sidebar.Geometry.SphereGeometry( signals, object );
-				container.add( parameters );
+				parameters.add( new Sidebar.Geometry.SphereGeometry( signals, object ) );
 
 
 			} else if ( geometry instanceof THREE.IcosahedronGeometry ) {
 			} else if ( geometry instanceof THREE.IcosahedronGeometry ) {
 
 
-				parameters = new Sidebar.Geometry.IcosahedronGeometry( signals, object );
-				container.add( parameters );
+				parameters.add( new Sidebar.Geometry.IcosahedronGeometry( signals, object ) );
 
 
 			} else if ( geometry instanceof THREE.PlaneGeometry ) {
 			} else if ( geometry instanceof THREE.PlaneGeometry ) {
 
 
-				parameters = new Sidebar.Geometry.PlaneGeometry( signals, object );
-				container.add( parameters );
+				parameters.add( new Sidebar.Geometry.PlaneGeometry( signals, object ) );
 
 
 			} else if ( geometry instanceof THREE.TorusGeometry ) {
 			} else if ( geometry instanceof THREE.TorusGeometry ) {
 
 
-				parameters = new Sidebar.Geometry.TorusGeometry( signals, object );
-				container.add( parameters );
+				parameters.add( new Sidebar.Geometry.TorusGeometry( signals, object ) );
 
 
 			} else if ( geometry instanceof THREE.TorusKnotGeometry ) {
 			} else if ( geometry instanceof THREE.TorusKnotGeometry ) {
 
 
-				parameters = new Sidebar.Geometry.TorusKnotGeometry( signals, object );
-				container.add( parameters );
-
-			} else {
-
-				parameters = new Sidebar.Geometry.Modifiers( signals, object );
-				container.add( parameters );
+				parameters.add( new Sidebar.Geometry.TorusKnotGeometry( signals, object ) );
 
 
 			}
 			}
 
 
+			parameters.add( new Sidebar.Geometry.Modifiers( signals, object ) );
+
 		} else {
 		} else {
 
 
 			container.setDisplay( 'none' );
 			container.setDisplay( 'none' );
@@ -146,6 +131,7 @@ Sidebar.Geometry = function ( editor ) {
 	}
 	}
 
 
 	signals.objectSelected.add( build );
 	signals.objectSelected.add( build );
+	signals.geometryChanged.add( build );
 
 
 	return container;
 	return container;
 
 

+ 2 - 0
editor/js/Sidebar.Scene.js

@@ -128,10 +128,12 @@ Sidebar.Scene = function ( editor ) {
 
 
 	var refreshUI = function () {
 	var refreshUI = function () {
 
 
+		var camera = editor.camera;
 		var scene = editor.scene;
 		var scene = editor.scene;
 
 
 		var options = [];
 		var options = [];
 
 
+		options.push( { value: camera.id, html: '<span class="type ' + camera.type + '"></span> ' + camera.name } );
 		options.push( { value: scene.id, html: '<span class="type ' + scene.type + '"></span> ' + scene.name } );
 		options.push( { value: scene.id, html: '<span class="type ' + scene.type + '"></span> ' + scene.name } );
 
 
 		( function addObjects( objects, pad ) {
 		( function addObjects( objects, pad ) {

+ 1 - 0
editor/js/libs/ui.editor.js

@@ -30,6 +30,7 @@ UI.CodeEditor = function ( mode ) {
 };
 };
 
 
 UI.CodeEditor.prototype = Object.create( UI.Element.prototype );
 UI.CodeEditor.prototype = Object.create( UI.Element.prototype );
+UI.CodeEditor.prototype.constructor = UI.CodeEditor;
 
 
 UI.CodeEditor.prototype.setWidth = function ( value ) {
 UI.CodeEditor.prototype.setWidth = function ( value ) {
 
 

+ 15 - 0
editor/js/libs/ui.js

@@ -105,6 +105,7 @@ UI.Panel = function () {
 };
 };
 
 
 UI.Panel.prototype = Object.create( UI.Element.prototype );
 UI.Panel.prototype = Object.create( UI.Element.prototype );
+UI.Panel.prototype.constructor = UI.Panel;
 
 
 UI.Panel.prototype.add = function () {
 UI.Panel.prototype.add = function () {
 
 
@@ -194,6 +195,7 @@ UI.CollapsiblePanel = function () {
 };
 };
 
 
 UI.CollapsiblePanel.prototype = Object.create( UI.Panel.prototype );
 UI.CollapsiblePanel.prototype = Object.create( UI.Panel.prototype );
+UI.CollapsiblePanel.prototype.constructor = UI.CollapsiblePanel;
 
 
 UI.CollapsiblePanel.prototype.addStatic = function () {
 UI.CollapsiblePanel.prototype.addStatic = function () {
 
 
@@ -303,6 +305,7 @@ UI.Text = function ( text ) {
 };
 };
 
 
 UI.Text.prototype = Object.create( UI.Element.prototype );
 UI.Text.prototype = Object.create( UI.Element.prototype );
+UI.Text.prototype.constructor = UI.Text;
 
 
 UI.Text.prototype.setValue = function ( value ) {
 UI.Text.prototype.setValue = function ( value ) {
 
 
@@ -343,6 +346,7 @@ UI.Input = function () {
 };
 };
 
 
 UI.Input.prototype = Object.create( UI.Element.prototype );
 UI.Input.prototype = Object.create( UI.Element.prototype );
+UI.Input.prototype.constructor = UI.Input;
 
 
 UI.Input.prototype.getValue = function () {
 UI.Input.prototype.getValue = function () {
 
 
@@ -398,6 +402,7 @@ UI.TextArea = function () {
 };
 };
 
 
 UI.TextArea.prototype = Object.create( UI.Element.prototype );
 UI.TextArea.prototype = Object.create( UI.Element.prototype );
+UI.TextArea.prototype.constructor = UI.TextArea;
 
 
 UI.TextArea.prototype.getValue = function () {
 UI.TextArea.prototype.getValue = function () {
 
 
@@ -436,6 +441,7 @@ UI.Select = function () {
 };
 };
 
 
 UI.Select.prototype = Object.create( UI.Element.prototype );
 UI.Select.prototype = Object.create( UI.Element.prototype );
+UI.Select.prototype.constructor = UI.Select;
 
 
 UI.Select.prototype.setMultiple = function ( boolean ) {
 UI.Select.prototype.setMultiple = function ( boolean ) {
 
 
@@ -552,6 +558,7 @@ UI.FancySelect = function () {
 };
 };
 
 
 UI.FancySelect.prototype = Object.create( UI.Element.prototype );
 UI.FancySelect.prototype = Object.create( UI.Element.prototype );
+UI.FancySelect.prototype.constructor = UI.FancySelect;
 
 
 UI.FancySelect.prototype.setOptions = function ( options ) {
 UI.FancySelect.prototype.setOptions = function ( options ) {
 
 
@@ -662,6 +669,7 @@ UI.Checkbox = function ( boolean ) {
 };
 };
 
 
 UI.Checkbox.prototype = Object.create( UI.Element.prototype );
 UI.Checkbox.prototype = Object.create( UI.Element.prototype );
+UI.Checkbox.prototype.constructor = UI.Checkbox;
 
 
 UI.Checkbox.prototype.getValue = function () {
 UI.Checkbox.prototype.getValue = function () {
 
 
@@ -712,6 +720,7 @@ UI.Color = function () {
 };
 };
 
 
 UI.Color.prototype = Object.create( UI.Element.prototype );
 UI.Color.prototype = Object.create( UI.Element.prototype );
+UI.Color.prototype.constructor = UI.Color;
 
 
 UI.Color.prototype.getValue = function () {
 UI.Color.prototype.getValue = function () {
 
 
@@ -871,6 +880,7 @@ UI.Number = function ( number ) {
 };
 };
 
 
 UI.Number.prototype = Object.create( UI.Element.prototype );
 UI.Number.prototype = Object.create( UI.Element.prototype );
+UI.Number.prototype.constructor = UI.Number;
 
 
 UI.Number.prototype.getValue = function () {
 UI.Number.prototype.getValue = function () {
 
 
@@ -1034,6 +1044,7 @@ UI.Integer = function ( number ) {
 };
 };
 
 
 UI.Integer.prototype = Object.create( UI.Element.prototype );
 UI.Integer.prototype = Object.create( UI.Element.prototype );
+UI.Integer.prototype.constructor = UI.Integer;
 
 
 UI.Integer.prototype.getValue = function () {
 UI.Integer.prototype.getValue = function () {
 
 
@@ -1079,6 +1090,7 @@ UI.Break = function () {
 };
 };
 
 
 UI.Break.prototype = Object.create( UI.Element.prototype );
 UI.Break.prototype = Object.create( UI.Element.prototype );
+UI.Break.prototype.constructor = UI.Break;
 
 
 
 
 // HorizontalRule
 // HorizontalRule
@@ -1097,6 +1109,7 @@ UI.HorizontalRule = function () {
 };
 };
 
 
 UI.HorizontalRule.prototype = Object.create( UI.Element.prototype );
 UI.HorizontalRule.prototype = Object.create( UI.Element.prototype );
+UI.HorizontalRule.prototype.constructor = UI.HorizontalRule;
 
 
 
 
 // Button
 // Button
@@ -1118,6 +1131,7 @@ UI.Button = function ( value ) {
 };
 };
 
 
 UI.Button.prototype = Object.create( UI.Element.prototype );
 UI.Button.prototype = Object.create( UI.Element.prototype );
+UI.Button.prototype.constructor = UI.Button;
 
 
 UI.Button.prototype.setLabel = function ( value ) {
 UI.Button.prototype.setLabel = function ( value ) {
 
 
@@ -1164,6 +1178,7 @@ UI.Dialog = function ( value ) {
 };
 };
 
 
 UI.Dialog.prototype = Object.create( UI.Panel.prototype );
 UI.Dialog.prototype = Object.create( UI.Panel.prototype );
+UI.Dialog.prototype.constructor = UI.Dialog;
 
 
 UI.Dialog.prototype.showModal = function () {
 UI.Dialog.prototype.showModal = function () {
 
 

+ 2 - 0
editor/js/libs/ui.three.js

@@ -83,6 +83,7 @@ UI.Texture = function () {
 };
 };
 
 
 UI.Texture.prototype = Object.create( UI.Element.prototype );
 UI.Texture.prototype = Object.create( UI.Element.prototype );
+UI.Texture.prototype.constructor = UI.Texture;
 
 
 UI.Texture.prototype.getValue = function () {
 UI.Texture.prototype.getValue = function () {
 
 
@@ -217,6 +218,7 @@ UI.CubeTexture = function () {
 };
 };
 
 
 UI.CubeTexture.prototype = Object.create( UI.Element.prototype );
 UI.CubeTexture.prototype = Object.create( UI.Element.prototype );
+UI.CubeTexture.prototype.constructor = UI.CubeTexture;
 
 
 UI.CubeTexture.prototype.getValue = function () {
 UI.CubeTexture.prototype.getValue = function () {
 
 

+ 1 - 2
examples/canvas_camera_orthographic.html

@@ -68,8 +68,7 @@
 
 
 				var material = new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } );
 				var material = new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } );
 
 
-				var line = new THREE.Line( geometry, material );
-				line.type = THREE.LinePieces;
+				var line = new THREE.Line( geometry, material, THREE.LinePieces );
 				scene.add( line );
 				scene.add( line );
 
 
 				// Cubes
 				// Cubes

+ 1 - 2
examples/canvas_camera_orthographic2.html

@@ -137,8 +137,7 @@
 
 
 				var material = new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } );
 				var material = new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } );
 
 
-				var line = new THREE.Line( geometry, material );
-				line.type = THREE.LinePieces;
+				var line = new THREE.Line( geometry, material, THREE.LinePieces );
 				scene.add( line );
 				scene.add( line );
 
 
 				// Cubes
 				// Cubes

+ 1 - 2
examples/canvas_interactive_voxelpainter.html

@@ -73,8 +73,7 @@
 
 
 				var material = new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } );
 				var material = new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } );
 
 
-				var line = new THREE.Line( geometry, material );
-				line.type = THREE.LinePieces;
+				var line = new THREE.Line( geometry, material, THREE.LinePieces );
 				scene.add( line );
 				scene.add( line );
 
 
 				//
 				//

+ 3 - 4
examples/index.html

@@ -136,7 +136,6 @@
 				"webgl_geometry_extrude_shapes",
 				"webgl_geometry_extrude_shapes",
 				"webgl_geometry_extrude_shapes2",
 				"webgl_geometry_extrude_shapes2",
 				"webgl_geometry_extrude_splines",
 				"webgl_geometry_extrude_splines",
-				"webgl_geometry_extrude_uvs2",
 				"webgl_geometry_hierarchy",
 				"webgl_geometry_hierarchy",
 				"webgl_geometry_hierarchy2",
 				"webgl_geometry_hierarchy2",
 				"webgl_geometry_large_mesh",
 				"webgl_geometry_large_mesh",
@@ -145,11 +144,9 @@
 				"webgl_geometry_normals",
 				"webgl_geometry_normals",
 				"webgl_geometry_nurbs",
 				"webgl_geometry_nurbs",
 				"webgl_geometry_shapes",
 				"webgl_geometry_shapes",
-				"webgl_geometry_subdivision",
 				"webgl_geometry_terrain",
 				"webgl_geometry_terrain",
 				"webgl_geometry_terrain_fog",
 				"webgl_geometry_terrain_fog",
 				"webgl_geometry_terrain_raycast",
 				"webgl_geometry_terrain_raycast",
-				"webgl_geometry_tessellation",
 				"webgl_geometry_text",
 				"webgl_geometry_text",
 				"webgl_geometry_text2",
 				"webgl_geometry_text2",
 				"webgl_gpgpu_birds",
 				"webgl_gpgpu_birds",
@@ -176,6 +173,7 @@
 				"webgl_lines_splines",
 				"webgl_lines_splines",
 				"webgl_loader_assimp2json",
 				"webgl_loader_assimp2json",
 				"webgl_loader_awd",
 				"webgl_loader_awd",
+				"webgl_loader_babylon",
 				"webgl_loader_collada",
 				"webgl_loader_collada",
 				"webgl_loader_collada_keyframe",
 				"webgl_loader_collada_keyframe",
 				"webgl_loader_collada_skinning",
 				"webgl_loader_collada_skinning",
@@ -228,6 +226,8 @@
 				"webgl_materials_video",
 				"webgl_materials_video",
 				"webgl_materials_wireframe",
 				"webgl_materials_wireframe",
 				"webgl_mirror",
 				"webgl_mirror",
+				"webgl_modifier_subdivision",
+				"webgl_modifier_tessellation",
 				"webgl_morphnormals",
 				"webgl_morphnormals",
 				"webgl_morphtargets",
 				"webgl_morphtargets",
 				"webgl_morphtargets_horse",
 				"webgl_morphtargets_horse",
@@ -252,7 +252,6 @@
 				"webgl_performance_doublesided",
 				"webgl_performance_doublesided",
 				"webgl_performance_static",
 				"webgl_performance_static",
 				"webgl_postprocessing",
 				"webgl_postprocessing",
-				"webgl_postprocessing2",
 				"webgl_postprocessing_advanced",
 				"webgl_postprocessing_advanced",
 				"webgl_postprocessing_dof",
 				"webgl_postprocessing_dof",
 				"webgl_postprocessing_dof2",
 				"webgl_postprocessing_dof2",

+ 1 - 0
examples/js/AudioObject.js

@@ -163,6 +163,7 @@ THREE.AudioObject = function ( url, volume, playbackRate, loop ) {
 };
 };
 
 
 THREE.AudioObject.prototype = Object.create( THREE.Object3D.prototype );
 THREE.AudioObject.prototype = Object.create( THREE.Object3D.prototype );
+THREE.AudioObject.prototype.constructor = THREE.AudioObject;
 
 
 THREE.AudioObject.prototype.context = null;
 THREE.AudioObject.prototype.context = null;
 THREE.AudioObject.prototype.type = null;
 THREE.AudioObject.prototype.type = null;

+ 1 - 0
examples/js/BlendCharacter.js

@@ -249,6 +249,7 @@ THREE.BlendCharacter = function () {
 
 
 
 
 THREE.BlendCharacter.prototype = Object.create( THREE.SkinnedMesh.prototype );
 THREE.BlendCharacter.prototype = Object.create( THREE.SkinnedMesh.prototype );
+THREE.BlendCharacter.prototype.constructor = THREE.BlendCharacter;
 
 
 THREE.BlendCharacter.prototype.getForward = function() {
 THREE.BlendCharacter.prototype.getForward = function() {
 
 

+ 1 - 1
examples/js/Detector.js

@@ -6,7 +6,7 @@
 var Detector = {
 var Detector = {
 
 
 	canvas: !! window.CanvasRenderingContext2D,
 	canvas: !! window.CanvasRenderingContext2D,
-	webgl: ( function () { try { var canvas = document.createElement( 'canvas' ); return !! window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ); } catch( e ) { return false; } } )(),
+	webgl: ( function () { try { var canvas = document.createElement( 'canvas' ); return !! ( window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ) ); } catch( e ) { return false; } } )(),
 	workers: !! window.Worker,
 	workers: !! window.Worker,
 	fileapi: window.File && window.FileReader && window.FileList && window.Blob,
 	fileapi: window.File && window.FileReader && window.FileList && window.Blob,
 
 

+ 1 - 0
examples/js/MarchingCubes.js

@@ -751,6 +751,7 @@ THREE.MarchingCubes = function ( resolution, material, enableUvs, enableColors )
 };
 };
 
 
 THREE.MarchingCubes.prototype = Object.create( THREE.ImmediateRenderObject.prototype );
 THREE.MarchingCubes.prototype = Object.create( THREE.ImmediateRenderObject.prototype );
+THREE.MarchingCubes.prototype.constructor = THREE.MarchingCubes;
 
 
 
 
 /////////////////////////////////////
 /////////////////////////////////////

+ 1 - 0
examples/js/Mirror.js

@@ -142,6 +142,7 @@ THREE.Mirror = function ( renderer, camera, options ) {
 };
 };
 
 
 THREE.Mirror.prototype = Object.create( THREE.Object3D.prototype );
 THREE.Mirror.prototype = Object.create( THREE.Object3D.prototype );
+THREE.Mirror.prototype.constructor = THREE.Mirror;
 
 
 THREE.Mirror.prototype.renderWithMirror = function ( otherMirror ) {
 THREE.Mirror.prototype.renderWithMirror = function ( otherMirror ) {
 
 

+ 4 - 0
examples/js/ParametricGeometries.js

@@ -150,6 +150,7 @@ THREE.ParametricGeometries.TubeGeometry = function(path, segments, radius, segme
 };
 };
 
 
 THREE.ParametricGeometries.TubeGeometry.prototype = Object.create( THREE.Geometry.prototype );
 THREE.ParametricGeometries.TubeGeometry.prototype = Object.create( THREE.Geometry.prototype );
+THREE.ParametricGeometries.TubeGeometry.prototype.constructor = THREE.ParametricGeometries.TubeGeometry;
 
 
 
 
  /*********************************************
  /*********************************************
@@ -200,6 +201,7 @@ THREE.ParametricGeometries.TorusKnotGeometry = function ( radius, tube, segments
 };
 };
 
 
 THREE.ParametricGeometries.TorusKnotGeometry.prototype = Object.create( THREE.Geometry.prototype );
 THREE.ParametricGeometries.TorusKnotGeometry.prototype = Object.create( THREE.Geometry.prototype );
+THREE.ParametricGeometries.TorusKnotGeometry.prototype.constructor = THREE.ParametricGeometries.TorusKnotGeometry;
 
 
 
 
  /*********************************************
  /*********************************************
@@ -226,6 +228,7 @@ THREE.ParametricGeometries.SphereGeometry = function(size, u, v) {
 };
 };
 
 
 THREE.ParametricGeometries.SphereGeometry.prototype = Object.create( THREE.Geometry.prototype );
 THREE.ParametricGeometries.SphereGeometry.prototype = Object.create( THREE.Geometry.prototype );
+THREE.ParametricGeometries.SphereGeometry.prototype.constructor = THREE.ParametricGeometries.SphereGeometry;
 
 
 
 
  /*********************************************
  /*********************************************
@@ -250,3 +253,4 @@ THREE.ParametricGeometries.PlaneGeometry = function(width, depth, segmentsWidth,
 };
 };
 
 
 THREE.ParametricGeometries.PlaneGeometry.prototype = Object.create( THREE.Geometry.prototype );
 THREE.ParametricGeometries.PlaneGeometry.prototype = Object.create( THREE.Geometry.prototype );
+THREE.ParametricGeometries.PlaneGeometry.prototype.constructor = THREE.ParametricGeometries.PlaneGeometry;

+ 1 - 0
examples/js/WaterShader.js

@@ -185,6 +185,7 @@ THREE.Water = function ( renderer, camera, scene, options ) {
 };
 };
 
 
 THREE.Water.prototype = Object.create( THREE.Mirror.prototype );
 THREE.Water.prototype = Object.create( THREE.Mirror.prototype );
+THREE.Water.prototype.constructor = THREE.Water;
 
 
 
 
 THREE.Water.prototype.updateTextureMatrix = function () {
 THREE.Water.prototype.updateTextureMatrix = function () {

+ 2 - 1
examples/js/cameras/CombinedCamera.js

@@ -34,6 +34,7 @@ THREE.CombinedCamera = function ( width, height, fov, near, far, orthoNear, orth
 };
 };
 
 
 THREE.CombinedCamera.prototype = Object.create( THREE.Camera.prototype );
 THREE.CombinedCamera.prototype = Object.create( THREE.Camera.prototype );
+THREE.CombinedCamera.prototype.constructor = THREE.CombinedCamera;
 
 
 THREE.CombinedCamera.prototype.toPerspective = function () {
 THREE.CombinedCamera.prototype.toPerspective = function () {
 
 
@@ -66,7 +67,7 @@ THREE.CombinedCamera.prototype.toOrthographic = function () {
 
 
 	var hyperfocus = ( near + far ) / 2;
 	var hyperfocus = ( near + far ) / 2;
 
 
-	var halfHeight = Math.tan( fov / 2 ) * hyperfocus;
+	var halfHeight = Math.tan( fov * Math.PI / 180 / 2 ) * hyperfocus;
 	var planeHeight = 2 * halfHeight;
 	var planeHeight = 2 * halfHeight;
 	var planeWidth = planeHeight * aspect;
 	var planeWidth = planeHeight * aspect;
 	var halfWidth = planeWidth / 2;
 	var halfWidth = planeWidth / 2;

+ 6 - 8
examples/js/controls/DeviceOrientationControls.js

@@ -10,13 +10,11 @@ THREE.DeviceOrientationControls = function ( object ) {
 	var scope = this;
 	var scope = this;
 
 
 	this.object = object;
 	this.object = object;
-
 	this.object.rotation.reorder( "YXZ" );
 	this.object.rotation.reorder( "YXZ" );
 
 
-	this.freeze = true;
+	this.enabled = true;
 
 
 	this.deviceOrientation = {};
 	this.deviceOrientation = {};
-
 	this.screenOrientation = 0;
 	this.screenOrientation = 0;
 
 
 	var onDeviceOrientationChangeEvent = function ( event ) {
 	var onDeviceOrientationChangeEvent = function ( event ) {
@@ -64,24 +62,24 @@ THREE.DeviceOrientationControls = function ( object ) {
 		window.addEventListener( 'orientationchange', onScreenOrientationChangeEvent, false );
 		window.addEventListener( 'orientationchange', onScreenOrientationChangeEvent, false );
 		window.addEventListener( 'deviceorientation', onDeviceOrientationChangeEvent, false );
 		window.addEventListener( 'deviceorientation', onDeviceOrientationChangeEvent, false );
 
 
-		scope.freeze = false;
+		scope.enabled = true;
 
 
 	};
 	};
 
 
 	this.disconnect = function() {
 	this.disconnect = function() {
 
 
-		scope.freeze = true;
-
 		window.removeEventListener( 'orientationchange', onScreenOrientationChangeEvent, false );
 		window.removeEventListener( 'orientationchange', onScreenOrientationChangeEvent, false );
 		window.removeEventListener( 'deviceorientation', onDeviceOrientationChangeEvent, false );
 		window.removeEventListener( 'deviceorientation', onDeviceOrientationChangeEvent, false );
 
 
+		scope.enabled = false;
+
 	};
 	};
 
 
 	this.update = function () {
 	this.update = function () {
 
 
-		if ( scope.freeze ) return;
+		if ( scope.enabled === false ) return;
 
 
-		var alpha  = scope.deviceOrientation.gamma ? THREE.Math.degToRad( scope.deviceOrientation.alpha ) : 0; // Z
+		var alpha  = scope.deviceOrientation.alpha ? THREE.Math.degToRad( scope.deviceOrientation.alpha ) : 0; // Z
 		var beta   = scope.deviceOrientation.beta  ? THREE.Math.degToRad( scope.deviceOrientation.beta  ) : 0; // X'
 		var beta   = scope.deviceOrientation.beta  ? THREE.Math.degToRad( scope.deviceOrientation.beta  ) : 0; // X'
 		var gamma  = scope.deviceOrientation.gamma ? THREE.Math.degToRad( scope.deviceOrientation.gamma ) : 0; // Y''
 		var gamma  = scope.deviceOrientation.gamma ? THREE.Math.degToRad( scope.deviceOrientation.gamma ) : 0; // Y''
 		var orient = scope.screenOrientation       ? THREE.Math.degToRad( scope.screenOrientation       ) : 0; // O
 		var orient = scope.screenOrientation       ? THREE.Math.degToRad( scope.screenOrientation       ) : 0; // O

+ 1 - 0
examples/js/controls/EditorControls.js

@@ -299,3 +299,4 @@ THREE.EditorControls = function ( object, domElement ) {
 };
 };
 
 
 THREE.EditorControls.prototype = Object.create( THREE.EventDispatcher.prototype );
 THREE.EditorControls.prototype = Object.create( THREE.EventDispatcher.prototype );
+THREE.EditorControls.prototype.constructor = THREE.EditorControls;

+ 4 - 10
examples/js/controls/FirstPersonControls.js

@@ -11,12 +11,13 @@ THREE.FirstPersonControls = function ( object, domElement ) {
 
 
 	this.domElement = ( domElement !== undefined ) ? domElement : document;
 	this.domElement = ( domElement !== undefined ) ? domElement : document;
 
 
+	this.enabled = true;
+
 	this.movementSpeed = 1.0;
 	this.movementSpeed = 1.0;
 	this.lookSpeed = 0.005;
 	this.lookSpeed = 0.005;
 
 
 	this.lookVertical = true;
 	this.lookVertical = true;
 	this.autoForward = false;
 	this.autoForward = false;
-	// this.invertVertical = false;
 
 
 	this.activeLook = true;
 	this.activeLook = true;
 
 
@@ -43,7 +44,6 @@ THREE.FirstPersonControls = function ( object, domElement ) {
 	this.moveBackward = false;
 	this.moveBackward = false;
 	this.moveLeft = false;
 	this.moveLeft = false;
 	this.moveRight = false;
 	this.moveRight = false;
-	this.freeze = false;
 
 
 	this.mouseDragOn = false;
 	this.mouseDragOn = false;
 
 
@@ -157,8 +157,6 @@ THREE.FirstPersonControls = function ( object, domElement ) {
 			case 82: /*R*/ this.moveUp = true; break;
 			case 82: /*R*/ this.moveUp = true; break;
 			case 70: /*F*/ this.moveDown = true; break;
 			case 70: /*F*/ this.moveDown = true; break;
 
 
-			case 81: /*Q*/ this.freeze = !this.freeze; break;
-
 		}
 		}
 
 
 	};
 	};
@@ -188,11 +186,7 @@ THREE.FirstPersonControls = function ( object, domElement ) {
 
 
 	this.update = function( delta ) {
 	this.update = function( delta ) {
 
 
-		if ( this.freeze ) {
-
-			return;
-
-		}
+		if ( this.enabled === false ) return;
 
 
 		if ( this.heightSpeed ) {
 		if ( this.heightSpeed ) {
 
 
@@ -265,7 +259,7 @@ THREE.FirstPersonControls = function ( object, domElement ) {
 	this.domElement.addEventListener( 'mousemove', bind( this, this.onMouseMove ), false );
 	this.domElement.addEventListener( 'mousemove', bind( this, this.onMouseMove ), false );
 	this.domElement.addEventListener( 'mousedown', bind( this, this.onMouseDown ), false );
 	this.domElement.addEventListener( 'mousedown', bind( this, this.onMouseDown ), false );
 	this.domElement.addEventListener( 'mouseup', bind( this, this.onMouseUp ), false );
 	this.domElement.addEventListener( 'mouseup', bind( this, this.onMouseUp ), false );
-	
+
 	window.addEventListener( 'keydown', bind( this, this.onKeyDown ), false );
 	window.addEventListener( 'keydown', bind( this, this.onKeyDown ), false );
 	window.addEventListener( 'keyup', bind( this, this.onKeyUp ), false );
 	window.addEventListener( 'keyup', bind( this, this.onKeyUp ), false );
 
 

+ 55 - 0
examples/js/controls/MouseControls.js

@@ -0,0 +1,55 @@
+/**
+ * @author dmarcos / http://github.com/dmarcos
+ *
+ * This controls allow to change the orientation of the camera using the mouse
+ */
+
+THREE.MouseControls = function ( object ) {
+
+  var scope = this;
+  var PI_2 = Math.PI / 2;
+  var mouseQuat = {
+    x: new THREE.Quaternion(),
+    y: new THREE.Quaternion()
+  };
+  var object = object;
+  var xVector = new THREE.Vector3( 1, 0, 0 );
+  var yVector = new THREE.Vector3( 0, 1, 0 );
+
+  var onMouseMove = function ( event ) {
+
+    if ( scope.enabled === false ) return;
+
+    var orientation = scope.orientation;
+
+    var movementX = event.movementX || event.mozMovementX || event.webkitMovementX || 0;
+    var movementY = event.movementY || event.mozMovementY || event.webkitMovementY || 0;
+
+    orientation.y += movementX * 0.0025;
+    orientation.x += movementY * 0.0025;
+
+    orientation.x = Math.max( - PI_2, Math.min( PI_2, orientation.x ) );
+
+  };
+
+  this.enabled = true;
+
+  this.orientation = {
+    x: 0,
+    y: 0,
+  };
+
+  this.update = function() {
+
+    if ( this.enabled === false ) return;
+
+    mouseQuat.x.setFromAxisAngle( xVector, this.orientation.x );
+    mouseQuat.y.setFromAxisAngle( yVector, this.orientation.y );
+    object.quaternion.copy(mouseQuat.y).multiply(mouseQuat.x)
+    return;
+
+  };
+
+  document.addEventListener( 'mousemove', onMouseMove, false );
+
+};

+ 2 - 5
examples/js/controls/OculusControls.js

@@ -11,8 +11,8 @@ THREE.OculusControls = function ( object ) {
 	this.object = object;
 	this.object = object;
 	this.target = new THREE.Vector3( 0, 0, 0 );
 	this.target = new THREE.Vector3( 0, 0, 0 );
 
 
+	this.enabled = true;
 	this.headquat = new THREE.Quaternion();
 	this.headquat = new THREE.Quaternion();
-	this.freeze = false;
 
 
 	this.loadAjaxJSON = function ( url, callback ) {
 	this.loadAjaxJSON = function ( url, callback ) {
 		var xhr = new XMLHttpRequest();
 		var xhr = new XMLHttpRequest();
@@ -45,10 +45,7 @@ THREE.OculusControls = function ( object ) {
 	}
 	}
 
 
 	this.update = function( delta ) {
 	this.update = function( delta ) {
-		if ( this.freeze ) {
-			return;
-		}
-
+		if ( this.enabled === false ) return;
 		this.object.quaternion.multiply(this.headquat);
 		this.object.quaternion.multiply(this.headquat);
 	};
 	};
 
 

+ 32 - 15
examples/js/controls/OrbitControls.js

@@ -100,6 +100,8 @@ THREE.OrbitControls = function ( object, domElement ) {
 	var dollyEnd = new THREE.Vector2();
 	var dollyEnd = new THREE.Vector2();
 	var dollyDelta = new THREE.Vector2();
 	var dollyDelta = new THREE.Vector2();
 
 
+	var theta;
+	var phi;
 	var phiDelta = 0;
 	var phiDelta = 0;
 	var thetaDelta = 0;
 	var thetaDelta = 0;
 	var scale = 1;
 	var scale = 1;
@@ -160,7 +162,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 		// get X column of matrix
 		// get X column of matrix
 		panOffset.set( te[ 0 ], te[ 1 ], te[ 2 ] );
 		panOffset.set( te[ 0 ], te[ 1 ], te[ 2 ] );
 		panOffset.multiplyScalar( - distance );
 		panOffset.multiplyScalar( - distance );
-		
+
 		pan.add( panOffset );
 		pan.add( panOffset );
 
 
 	};
 	};
@@ -173,11 +175,11 @@ THREE.OrbitControls = function ( object, domElement ) {
 		// get Y column of matrix
 		// get Y column of matrix
 		panOffset.set( te[ 4 ], te[ 5 ], te[ 6 ] );
 		panOffset.set( te[ 4 ], te[ 5 ], te[ 6 ] );
 		panOffset.multiplyScalar( distance );
 		panOffset.multiplyScalar( distance );
-		
+
 		pan.add( panOffset );
 		pan.add( panOffset );
 
 
 	};
 	};
-	
+
 	// pass in x,y of change desired in pixel space,
 	// pass in x,y of change desired in pixel space,
 	// right and down are positive
 	// right and down are positive
 	this.pan = function ( deltaX, deltaY ) {
 	this.pan = function ( deltaX, deltaY ) {
@@ -248,11 +250,11 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 
 		// angle from z-axis around y-axis
 		// angle from z-axis around y-axis
 
 
-		var theta = Math.atan2( offset.x, offset.z );
+		theta = Math.atan2( offset.x, offset.z );
 
 
 		// angle from y-axis
 		// angle from y-axis
 
 
-		var phi = Math.atan2( Math.sqrt( offset.x * offset.x + offset.z * offset.z ), offset.y );
+		phi = Math.atan2( Math.sqrt( offset.x * offset.x + offset.z * offset.z ), offset.y );
 
 
 		if ( this.autoRotate ) {
 		if ( this.autoRotate ) {
 
 
@@ -276,7 +278,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 
 		// restrict radius to be between desired limits
 		// restrict radius to be between desired limits
 		radius = Math.max( this.minDistance, Math.min( this.maxDistance, radius ) );
 		radius = Math.max( this.minDistance, Math.min( this.maxDistance, radius ) );
-		
+
 		// move target to panned location
 		// move target to panned location
 		this.target.add( pan );
 		this.target.add( pan );
 
 
@@ -324,6 +326,18 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 
 	};
 	};
 
 
+	this.getPolarAngle = function () {
+
+		return phi;
+
+	};
+
+	this.getAzimuthalAngle = function () {
+
+		return theta
+
+	};
+
 	function getAutoRotationAngle() {
 	function getAutoRotationAngle() {
 
 
 		return 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed;
 		return 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed;
@@ -364,9 +378,11 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 
 		}
 		}
 
 
-		document.addEventListener( 'mousemove', onMouseMove, false );
-		document.addEventListener( 'mouseup', onMouseUp, false );
-		scope.dispatchEvent( startEvent );
+		if ( state !== STATE.NONE ) {
+			document.addEventListener( 'mousemove', onMouseMove, false );
+			document.addEventListener( 'mouseup', onMouseUp, false );
+			scope.dispatchEvent( startEvent );
+		}
 
 
 	}
 	}
 
 
@@ -418,14 +434,14 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 
 			panEnd.set( event.clientX, event.clientY );
 			panEnd.set( event.clientX, event.clientY );
 			panDelta.subVectors( panEnd, panStart );
 			panDelta.subVectors( panEnd, panStart );
-			
+
 			scope.pan( panDelta.x, panDelta.y );
 			scope.pan( panDelta.x, panDelta.y );
 
 
 			panStart.copy( panEnd );
 			panStart.copy( panEnd );
 
 
 		}
 		}
 
 
-		scope.update();
+		if ( state !== STATE.NONE ) scope.update();
 
 
 	}
 	}
 
 
@@ -442,7 +458,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 
 	function onMouseWheel( event ) {
 	function onMouseWheel( event ) {
 
 
-		if ( scope.enabled === false || scope.noZoom === true ) return;
+		if ( scope.enabled === false || scope.noZoom === true || state !== STATE.NONE ) return;
 
 
 		event.preventDefault();
 		event.preventDefault();
 		event.stopPropagation();
 		event.stopPropagation();
@@ -478,7 +494,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 	function onKeyDown( event ) {
 	function onKeyDown( event ) {
 
 
 		if ( scope.enabled === false || scope.noKeys === true || scope.noPan === true ) return;
 		if ( scope.enabled === false || scope.noKeys === true || scope.noPan === true ) return;
-		
+
 		switch ( event.keyCode ) {
 		switch ( event.keyCode ) {
 
 
 			case scope.keys.UP:
 			case scope.keys.UP:
@@ -547,7 +563,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 
 		}
 		}
 
 
-		scope.dispatchEvent( startEvent );
+		if ( state !== STATE.NONE ) scope.dispatchEvent( startEvent );
 
 
 	}
 	}
 
 
@@ -614,7 +630,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 
 				panEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
 				panEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
 				panDelta.subVectors( panEnd, panStart );
 				panDelta.subVectors( panEnd, panStart );
-				
+
 				scope.pan( panDelta.x, panDelta.y );
 				scope.pan( panDelta.x, panDelta.y );
 
 
 				panStart.copy( panEnd );
 				panStart.copy( panEnd );
@@ -656,3 +672,4 @@ THREE.OrbitControls = function ( object, domElement ) {
 };
 };
 
 
 THREE.OrbitControls.prototype = Object.create( THREE.EventDispatcher.prototype );
 THREE.OrbitControls.prototype = Object.create( THREE.EventDispatcher.prototype );
+THREE.OrbitControls.prototype.constructor = THREE.OrbitControls;

+ 1 - 0
examples/js/controls/OrthographicTrackballControls.js

@@ -533,3 +533,4 @@ THREE.OrthographicTrackballControls = function ( object, domElement ) {
 };
 };
 
 
 THREE.OrthographicTrackballControls.prototype = Object.create( THREE.EventDispatcher.prototype );
 THREE.OrthographicTrackballControls.prototype = Object.create( THREE.EventDispatcher.prototype );
+THREE.OrthographicTrackballControls.prototype.constructor = THREE.OrthographicTrackballControls;

+ 0 - 122
examples/js/controls/PointerLockControls.js

@@ -15,18 +15,6 @@ THREE.PointerLockControls = function ( camera ) {
 	yawObject.position.y = 10;
 	yawObject.position.y = 10;
 	yawObject.add( pitchObject );
 	yawObject.add( pitchObject );
 
 
-	var moveForward = false;
-	var moveBackward = false;
-	var moveLeft = false;
-	var moveRight = false;
-
-	var isOnObject = false;
-	var canJump = false;
-
-	var prevTime = performance.now();
-
-	var velocity = new THREE.Vector3();
-
 	var PI_2 = Math.PI / 2;
 	var PI_2 = Math.PI / 2;
 
 
 	var onMouseMove = function ( event ) {
 	var onMouseMove = function ( event ) {
@@ -43,69 +31,7 @@ THREE.PointerLockControls = function ( camera ) {
 
 
 	};
 	};
 
 
-	var onKeyDown = function ( event ) {
-
-		switch ( event.keyCode ) {
-
-			case 38: // up
-			case 87: // w
-				moveForward = true;
-				break;
-
-			case 37: // left
-			case 65: // a
-				moveLeft = true; break;
-
-			case 40: // down
-			case 83: // s
-				moveBackward = true;
-				break;
-
-			case 39: // right
-			case 68: // d
-				moveRight = true;
-				break;
-
-			case 32: // space
-				if ( canJump === true ) velocity.y += 350;
-				canJump = false;
-				break;
-
-		}
-
-	};
-
-	var onKeyUp = function ( event ) {
-
-		switch( event.keyCode ) {
-
-			case 38: // up
-			case 87: // w
-				moveForward = false;
-				break;
-
-			case 37: // left
-			case 65: // a
-				moveLeft = false;
-				break;
-
-			case 40: // down
-			case 83: // s
-				moveBackward = false;
-				break;
-
-			case 39: // right
-			case 68: // d
-				moveRight = false;
-				break;
-
-		}
-
-	};
-
 	document.addEventListener( 'mousemove', onMouseMove, false );
 	document.addEventListener( 'mousemove', onMouseMove, false );
-	document.addEventListener( 'keydown', onKeyDown, false );
-	document.addEventListener( 'keyup', onKeyUp, false );
 
 
 	this.enabled = false;
 	this.enabled = false;
 
 
@@ -115,13 +41,6 @@ THREE.PointerLockControls = function ( camera ) {
 
 
 	};
 	};
 
 
-	this.isOnObject = function ( boolean ) {
-
-		isOnObject = boolean;
-		canJump = boolean;
-
-	};
-
 	this.getDirection = function() {
 	this.getDirection = function() {
 
 
 		// assumes the camera itself is not rotated
 		// assumes the camera itself is not rotated
@@ -141,45 +60,4 @@ THREE.PointerLockControls = function ( camera ) {
 
 
 	}();
 	}();
 
 
-	this.update = function () {
-
-		if ( scope.enabled === false ) return;
-
-		var time = performance.now();
-		var delta = ( time - prevTime ) / 1000;
-
-		velocity.x -= velocity.x * 10.0 * delta;
-		velocity.z -= velocity.z * 10.0 * delta;
-
-		velocity.y -= 9.8 * 100.0 * delta; // 100.0 = mass
-
-		if ( moveForward ) velocity.z -= 400.0 * delta;
-		if ( moveBackward ) velocity.z += 400.0 * delta;
-
-		if ( moveLeft ) velocity.x -= 400.0 * delta;
-		if ( moveRight ) velocity.x += 400.0 * delta;
-
-		if ( isOnObject === true ) {
-
-			velocity.y = Math.max( 0, velocity.y );
-
-		}
-
-		yawObject.translateX( velocity.x * delta );
-		yawObject.translateY( velocity.y * delta ); 
-		yawObject.translateZ( velocity.z * delta );
-
-		if ( yawObject.position.y < 10 ) {
-
-			velocity.y = 0;
-			yawObject.position.y = 10;
-
-			canJump = true;
-
-		}
-
-		prevTime = time;
-
-	};
-
 };
 };

+ 1 - 0
examples/js/controls/TrackballControls.js

@@ -609,3 +609,4 @@ THREE.TrackballControls = function ( object, domElement ) {
 };
 };
 
 
 THREE.TrackballControls.prototype = Object.create( THREE.EventDispatcher.prototype );
 THREE.TrackballControls.prototype = Object.create( THREE.EventDispatcher.prototype );
+THREE.TrackballControls.prototype.constructor = THREE.TrackballControls;

+ 7 - 0
examples/js/controls/TransformControls.js

@@ -40,6 +40,7 @@
 	};
 	};
 
 
 	GizmoMaterial.prototype = Object.create( THREE.MeshBasicMaterial.prototype );
 	GizmoMaterial.prototype = Object.create( THREE.MeshBasicMaterial.prototype );
+	GizmoMaterial.prototype.constructor = GizmoMaterial;
 
 
 	var GizmoLineMaterial = function ( parameters ) {
 	var GizmoLineMaterial = function ( parameters ) {
 
 
@@ -74,6 +75,7 @@
 	};
 	};
 
 
 	GizmoLineMaterial.prototype = Object.create( THREE.LineBasicMaterial.prototype );
 	GizmoLineMaterial.prototype = Object.create( THREE.LineBasicMaterial.prototype );
+	GizmoLineMaterial.prototype.constructor = GizmoLineMaterial;
 
 
 	THREE.TransformGizmo = function () {
 	THREE.TransformGizmo = function () {
 
 
@@ -194,6 +196,7 @@
 	};
 	};
 
 
 	THREE.TransformGizmo.prototype = Object.create( THREE.Object3D.prototype );
 	THREE.TransformGizmo.prototype = Object.create( THREE.Object3D.prototype );
+	THREE.TransformGizmo.prototype.constructor = THREE.TransformGizmo;
 
 
 	THREE.TransformGizmo.prototype.update = function ( rotation, eye ) {
 	THREE.TransformGizmo.prototype.update = function ( rotation, eye ) {
 
 
@@ -320,6 +323,7 @@
 	};
 	};
 
 
 	THREE.TransformGizmoTranslate.prototype = Object.create( THREE.TransformGizmo.prototype );
 	THREE.TransformGizmoTranslate.prototype = Object.create( THREE.TransformGizmo.prototype );
+	THREE.TransformGizmoTranslate.prototype.constructor = THREE.TransformGizmoTranslate;
 
 
 	THREE.TransformGizmoRotate = function () {
 	THREE.TransformGizmoRotate = function () {
 
 
@@ -446,6 +450,7 @@
 	};
 	};
 
 
 	THREE.TransformGizmoRotate.prototype = Object.create( THREE.TransformGizmo.prototype );
 	THREE.TransformGizmoRotate.prototype = Object.create( THREE.TransformGizmo.prototype );
+	THREE.TransformGizmoRotate.prototype.constructor = THREE.TransformGizmoRotate;
 
 
 	THREE.TransformGizmoScale = function () {
 	THREE.TransformGizmoScale = function () {
 
 
@@ -532,6 +537,7 @@
 	};
 	};
 
 
 	THREE.TransformGizmoScale.prototype = Object.create( THREE.TransformGizmo.prototype );
 	THREE.TransformGizmoScale.prototype = Object.create( THREE.TransformGizmo.prototype );
+	THREE.TransformGizmoScale.prototype.constructor = THREE.TransformGizmoScale;
 
 
 	THREE.TransformControls = function ( camera, domElement ) {
 	THREE.TransformControls = function ( camera, domElement ) {
 
 
@@ -989,5 +995,6 @@
 	};
 	};
 
 
 	THREE.TransformControls.prototype = Object.create( THREE.Object3D.prototype );
 	THREE.TransformControls.prototype = Object.create( THREE.Object3D.prototype );
+	THREE.TransformControls.prototype.constructor = THREE.TransformControls;
 
 
 }());
 }());

+ 60 - 59
examples/js/controls/VRControls.js

@@ -1,77 +1,78 @@
 /**
 /**
  * @author dmarcos / https://github.com/dmarcos
  * @author dmarcos / https://github.com/dmarcos
+ * @author mrdoob / http://mrdoob.com
  */
  */
 
 
-THREE.VRControls = function ( camera, done ) {
+THREE.VRControls = function ( object, callback ) {
 
 
-	this._camera = camera;
+	var scope = this;
+
+	var vrInput;
+
+	var onVRDevices = function ( devices ) {
+
+		for ( var i = 0; i < devices.length; i ++ ) {
+
+			var device = devices[ i ];
+
+			if ( device instanceof PositionSensorVRDevice ) {
+
+				vrInput = devices[ i ];
+				return; // We keep the first we encounter
 
 
-	this._init = function () {
-		var self = this;
-		if ( !navigator.mozGetVRDevices && !navigator.getVRDevices ) {
-			if ( done ) {
-				done("Your browser is not VR Ready");
 			}
 			}
-			return;
-		}
-		if ( navigator.getVRDevices ) {
-			navigator.getVRDevices().then( gotVRDevices );
-		} else {
-			navigator.mozGetVRDevices( gotVRDevices );
+
 		}
 		}
-		function gotVRDevices( devices ) {
-			var vrInput;
-			var error;
-			for ( var i = 0; i < devices.length; ++i ) {
-				if ( devices[i] instanceof PositionSensorVRDevice ) {
-					vrInput = devices[i]
-					self._vrInput = vrInput;
-					break; // We keep the first we encounter
-				}
-			}
-			if ( done ) {
-				if ( !vrInput ) {
-				 error = 'HMD not available';
-				}
-				done( error );
-			}
+
+		if ( callback !== undefined ) {
+
+			callback( 'HMD not available' );
+
 		}
 		}
+
 	};
 	};
 
 
-	this._init();
+	if ( navigator.getVRDevices !== undefined ) {
+
+		navigator.getVRDevices().then( onVRDevices );
+
+	} else if ( callback !== undefined ) {
+
+		callback( 'Your browser is not VR Ready' );
+
+	}
+
+	// the Rift SDK returns the position in meters
+	// this scale factor allows the user to define how meters
+	// are converted to scene units.
+	this.scale = 1;
+
+	this.update = function () {
+
+		if ( vrInput === undefined ) return;
+
+		var state = vrInput.getState();
+
+		if ( state.orientation !== null ) {
+
+			object.quaternion.copy( state.orientation );
 
 
-	this.update = function() {
-		var camera = this._camera;
-		var quat;
-		var vrState = this.getVRState();
-		if ( !vrState ) {
-			return;
 		}
 		}
-		// Applies head rotation from sensors data.
-		if ( camera ) {
-			camera.quaternion.fromArray( vrState.hmd.rotation );
+
+		if ( state.position !== null ) {
+
+			object.position.copy( state.position ).multiplyScalar( scope.scale );
+
 		}
 		}
+
 	};
 	};
 
 
-	this.getVRState = function() {
-		var vrInput = this._vrInput;
-		var orientation;
-		var vrState;
-		if ( !vrInput ) {
-			return null;
-		}
-		orientation	= vrInput.getState().orientation;
-		vrState = {
-			hmd : {
-				rotation : [
-					orientation.x,
-					orientation.y,
-					orientation.z,
-					orientation.w
-				]
-			}
-		};
-		return vrState;
+	this.zeroSensor = function () {
+
+		if ( vrInput === undefined ) return;
+
+		vrInput.zeroSensor();
+
 	};
 	};
 
 
-};
+};

+ 1 - 0
examples/js/curves/NURBSCurve.js

@@ -27,6 +27,7 @@ THREE.NURBSCurve = function ( degree, knots /* array of reals */, controlPoints
 
 
 
 
 THREE.NURBSCurve.prototype = Object.create( THREE.Curve.prototype );
 THREE.NURBSCurve.prototype = Object.create( THREE.Curve.prototype );
+THREE.NURBSCurve.prototype.constructor = THREE.NURBSCurve;
 
 
 
 
 THREE.NURBSCurve.prototype.getPoint = function ( t ) {
 THREE.NURBSCurve.prototype.getPoint = function ( t ) {

+ 2 - 1
examples/js/effects/VREffect.js

@@ -69,7 +69,6 @@ THREE.VREffect = function ( renderer, done ) {
 	this.render = function ( scene, camera ) {
 	this.render = function ( scene, camera ) {
 		var renderer = this._renderer;
 		var renderer = this._renderer;
 		var vrHMD = this._vrHMD;
 		var vrHMD = this._vrHMD;
-		renderer.enableScissorTest( false );
 		// VR render mode if HMD is available
 		// VR render mode if HMD is available
 		if ( vrHMD ) {
 		if ( vrHMD ) {
 			this.renderStereo.apply( this, arguments );
 			this.renderStereo.apply( this, arguments );
@@ -114,6 +113,8 @@ THREE.VREffect = function ( renderer, done ) {
 		renderer.setScissor( eyeDivisionLine, 0, eyeDivisionLine, rendererHeight );
 		renderer.setScissor( eyeDivisionLine, 0, eyeDivisionLine, rendererHeight );
 		renderer.render( scene, cameraRight );
 		renderer.render( scene, cameraRight );
 
 
+		renderer.enableScissorTest( false );
+
 	};
 	};
 
 
 	this.setSize = function( width, height ) {
 	this.setSize = function( width, height ) {

部分文件因文件數量過多而無法顯示