Mr.doob 8 years ago
parent
commit
cf22507278
100 changed files with 1955 additions and 1839 deletions
  1. 27 100
      build/three.js
  2. 336 340
      build/three.min.js
  3. 27 100
      build/three.module.js
  4. 2 2
      docs/api/Polyfills.html
  5. 2 2
      docs/api/animation/AnimationUtils.html
  6. 24 21
      docs/api/cameras/Camera.html
  7. 12 2
      docs/api/cameras/OrthographicCamera.html
  8. 12 2
      docs/api/cameras/PerspectiveCamera.html
  9. 1 1
      docs/api/constants/Core.html
  10. 0 13
      docs/api/constants/Materials.html
  11. 0 39
      docs/api/constants/Textures.html
  12. 26 3
      docs/api/core/Object3D.html
  13. 1 1
      docs/api/core/bufferAttributeTypes/BufferAttributeTypes.html
  14. 49 17
      docs/api/deprecated/DeprecatedList.html
  15. 1 1
      docs/api/extras/CurveUtils.html
  16. 1 1
      docs/api/extras/core/ShapePath.html
  17. 0 66
      docs/api/extras/curves/SplineCurve3.html
  18. 1 2
      docs/api/extras/helpers/CameraHelper.html
  19. 1 1
      docs/api/geometries/BoxBufferGeometry.html
  20. 1 1
      docs/api/geometries/CircleBufferGeometry.html
  21. 1 1
      docs/api/geometries/ConeBufferGeometry.html
  22. 1 1
      docs/api/geometries/CylinderBufferGeometry.html
  23. 1 1
      docs/api/geometries/DodecahedronBufferGeometry.html
  24. 1 1
      docs/api/geometries/IcosahedronBufferGeometry.html
  25. 1 1
      docs/api/geometries/LatheBufferGeometry.html
  26. 1 1
      docs/api/geometries/OctahedronBufferGeometry.html
  27. 1 1
      docs/api/geometries/ParametricBufferGeometry.html
  28. 1 1
      docs/api/geometries/PlaneBufferGeometry.html
  29. 1 1
      docs/api/geometries/PolyhedronBufferGeometry.html
  30. 1 1
      docs/api/geometries/RingBufferGeometry.html
  31. 1 1
      docs/api/geometries/ShapeBufferGeometry.html
  32. 1 1
      docs/api/geometries/SphereBufferGeometry.html
  33. 1 1
      docs/api/geometries/TetrahedronBufferGeometry.html
  34. 138 137
      docs/api/geometries/TextGeometry.html
  35. 1 1
      docs/api/geometries/TorusBufferGeometry.html
  36. 1 1
      docs/api/geometries/TorusKnotBufferGeometry.html
  37. 12 13
      docs/api/geometries/TubeBufferGeometry.html
  38. 11 12
      docs/api/geometries/TubeGeometry.html
  39. 1 2
      docs/api/lights/DirectionalLight.html
  40. 2 1
      docs/api/lights/PointLight.html
  41. 157 0
      docs/api/lights/RectAreaLight.html
  42. 71 7
      docs/api/lights/shadows/DirectionalLightShadow.html
  43. 83 17
      docs/api/lights/shadows/LightShadow.html
  44. 54 0
      docs/api/lights/shadows/RectAreaLightShadow.html
  45. 64 5
      docs/api/lights/shadows/SpotLightShadow.html
  46. 0 62
      docs/api/loaders/BinaryTextureLoader.html
  47. 47 2
      docs/api/loaders/DataTextureLoader.html
  48. 2 2
      docs/api/loaders/managers/DefaultLoadingManager.html
  49. 3 3
      docs/api/loaders/managers/LoadingManager.html
  50. 1 1
      docs/api/materials/LineBasicMaterial.html
  51. 1 1
      docs/api/materials/LineDashedMaterial.html
  52. 1 1
      docs/api/materials/Material.html
  53. 1 1
      docs/api/materials/MeshStandardMaterial.html
  54. 7 7
      docs/api/materials/MultiMaterial.html
  55. 2 2
      docs/api/materials/PointsMaterial.html
  56. 1 1
      docs/api/math/Color.html
  57. 21 6
      docs/api/math/Euler.html
  58. 2 12
      docs/api/math/Matrix3.html
  59. 11 34
      docs/api/math/Matrix4.html
  60. 0 101
      docs/api/math/Spline.html
  61. 3 4
      docs/api/math/Vector2.html
  62. 4 25
      docs/api/math/Vector3.html
  63. 3 4
      docs/api/math/Vector4.html
  64. 2 2
      docs/api/objects/Line.html
  65. 2 2
      docs/api/objects/LineSegments.html
  66. 1 1
      docs/api/objects/Mesh.html
  67. 2 2
      docs/api/renderers/WebGLRenderTarget.html
  68. 2 2
      docs/api/renderers/WebGLRenderTargetCube.html
  69. 3 3
      docs/api/textures/Texture.html
  70. 1 1
      docs/examples/Lut.html
  71. 1 1
      docs/examples/renderers/CanvasRenderer.html
  72. 17 15
      docs/list.js
  73. 72 37
      docs/manual/introduction/Creating-text.html
  74. 15 13
      docs/manual/introduction/Detecting-WebGL-and-browser-compatibility.html
  75. 42 35
      docs/manual/introduction/Drawing-lines.html
  76. 1 1
      docs/manual/introduction/FAQ.html
  77. 178 101
      docs/manual/introduction/How-to-run-thing-locally.html
  78. 219 102
      docs/manual/introduction/How-to-update-things.html
  79. 62 41
      docs/manual/introduction/Useful-links.html
  80. 1 1
      docs/page.js
  81. 16 14
      docs/scenes/js/geometry.js
  82. 1 2
      editor/examples/arkanoid.app.json
  83. 1 2
      editor/examples/camera.app.json
  84. 1 2
      editor/examples/particles.app.json
  85. 0 1
      editor/examples/pong.app.json
  86. 1 1
      editor/index.html
  87. 1 4
      editor/js/Config.js
  88. 0 1
      editor/js/Editor.js
  89. 3 3
      editor/js/Loader.js
  90. 14 4
      editor/js/Menubar.File.js
  91. 3 2
      editor/js/Script.js
  92. 3 8
      editor/js/Sidebar.Animation.js
  93. 0 14
      editor/js/Sidebar.Project.js
  94. 3 3
      editor/js/Viewport.js
  95. 8 3
      editor/js/commands/SetScriptValueCommand.js
  96. 0 2
      editor/js/libs/app.js
  97. 28 36
      editor/js/libs/app/index.html
  98. 8 58
      editor/js/libs/tern-threejs/threejs.js
  99. 0 125
      editor/js/libs/ui.js
  100. 1 1
      examples/canvas_lines_dashed.html

File diff suppressed because it is too large
+ 27 - 100
build/three.js


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


File diff suppressed because it is too large
+ 27 - 100
build/three.module.js


+ 2 - 2
docs/api/Polyfills.html

@@ -11,7 +11,7 @@
 
 		<h1>Polyfills</h1>
 
-		<div class="desc">Three includes polyfills for the following functions and constants.</div>
+		<div class="desc">Three.js includes polyfills for the following functions and constants.</div>
 
 		<h3>[page:Number.EPSILON Number.EPSILON]</h3>
 		<div>
@@ -41,6 +41,6 @@
 
 		<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/polyfills.js src/polyfills.js]
 	</body>
 </html>

+ 2 - 2
docs/api/animation/AnimationUtils.html

@@ -18,12 +18,12 @@
 
     <h3>[method:Array arraySlice]( array, from, to )</h3>
     <div>
-    Convert an array to a specific type.
+    This is the same as  Array.prototype.slice, but also works on typed arrays.
     </div>
 
     <h3>[method:Array convertArray]( array, type, forceClone )</h3>
     <div>
-    This is the same as  Array.prototype.slice, but also works on typed arrays.
+    Convert an array to a specific type.
     </div>
 
     <h3>[method:Boolean isTypedArray]( object )</h3>

+ 24 - 21
docs/api/cameras/Camera.html

@@ -12,7 +12,9 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">Abstract base class for cameras. This class should always be inherited when you build a new camera.</div>
+		<div class="desc">
+			Abstract base class for cameras. This class should always be inherited when you build a new camera.
+		</div>
 
 
 		<h2>Constructor</h2>
@@ -20,9 +22,8 @@
 
 		<h3>[name]()</h3>
 		<div>
-			This constructor sets the following properties to the correct type:
-			[page:Camera.matrixWorldInverse matrixWorldInverse] and [page:Camera.projectionMatrix projectionMatrix].
-
+			Creates a new [name]. Note that this class is not intended to be called directly;
+			you probably want a [page:PerspectiveCamera] or [page:OrthographicCamera] instead.
 		</div>
 
 
@@ -36,6 +37,15 @@
 			You should not change this, as it used internally by the renderer for optimisation.
 		</div>
 
+		<h3>[property:Layers layers]</h3>
+		<div>
+		The [page:Layers layers] that the camera is a member of. This is an inherited
+		property from [page:Object3D].<br /><br />
+
+		Objects must share at least one layer with the camera to be seen
+		when the camera's viewpoint is rendered.
+		</div>
+
 		<h3>[property:Matrix4 matrixWorldInverse]</h3>
 		<div>
 			This is the inverse of matrixWorld. MatrixWorld contains the Matrix which has
@@ -45,17 +55,19 @@
 		<h3>[property:Matrix4 projectionMatrix]</h3>
 		<div>This is the matrix which contains the projection.</div>
 
-		<h3>[property:Layers layers]</h3>
-		<div>
-		The [page:Layers layers] that the camera is a member of. This is an inherited
-		property from [page:Object3D].<br /><br />
 
-		Objects must share at least one layer with the camera to be seen
-		when the camera's viewpoint is rendered.
+		<h2>Methods</h2>
+		<div>See the base [page:Object3D] class for common methods.</div>
+
+		<h3>[method:Camera clone]( )</h3>
+		<div>
+			Return a new camera with the same properties as this one.
 		</div>
 
-		<h2>Methods</h2>
-		<div>See the base [page:Objct3D] class for common methods.</div>
+		<h3>[method:Camera copy]( [page:Camera source] )</h3>
+		<div>
+		Copy the properties from the source camera into this one.
+		</div>
 
 		<h3>[method:Vector3 getWorldDirection]( [page:Vector3 optionalTarget] )</h3>
 		<div>
@@ -64,7 +76,6 @@
 		from the camera's position to the [page:Vector3 optionalTarget].
 		</div>
 
-
 		<h3>[method:null lookAt]( [page:Vector3 target] )</h3>
 		<div>
 		target — position in 3D space for the camera to point towards<br /><br />
@@ -73,14 +84,6 @@
 		the parent of this camera is the scene or at position (0,0,0).
 		</div>
 
-		<h3>[method:Camera clone]( [page:Camera camera] )</h3>
-		<div>
-		camera — camera to clone<br /><br />
-
-		Returns a clone of camera.
-		</div>
-
-
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 12 - 2
docs/api/cameras/OrthographicCamera.html

@@ -64,7 +64,11 @@ scene.add( camera );</code>
 		<div>Camera frustum bottom plane.</div>
 
 		<h3>[property:Float far]</h3>
-		<div>Camera frustum far plane. Default is *2000*.</div>
+		<div>
+		Camera frustum far plane. Default is *2000*.<br /><br />
+
+		The valid range is between the current value of the [page:.near near] plane and infinity.
+		</div>
 
 		<h3>[property:Boolean isOrthographicCamera]</h3>
 		<div>
@@ -77,7 +81,13 @@ scene.add( camera );</code>
 		<div>Camera frustum left plane.</div>
 
 		<h3>[property:Float near]</h3>
-		<div>Camera frustum near plane. Default is *0.1*.</div>
+		<div>
+			Camera frustum near plane. Default is *0.1*.<br /><br />
+
+			The valid range is between 0 and the current value of the [page:.far far] plane.
+			Note that, unlike for the [page:PerspectiveCamera], *0* is a valid value for an
+			OrthographicCamera's near plane.
+		</div>
 
 		<h3>[property:Float right]</h3>
 		<div>Camera frustum right plane.</div>

+ 12 - 2
docs/api/cameras/PerspectiveCamera.html

@@ -54,7 +54,11 @@ scene.add( camera );</code>
 		<div>Camera frustum aspect ratio, usually the canvas width / canvas height. Default is *1* (square canvas).</div>
 
 		<h3>[property:Float far]</h3>
-		<div>Camera frustum far plane. Default is *2000*.</div>
+		<div>
+			Camera frustum far plane. Default is *2000*.<br /><br />
+
+			The valid range is between the current value of the [page:.near near] plane and infinity.
+		</div>
 
 		<h3>[property:Float filmGauge]</h3>
 		<div>Film size used for the larger axis. Default is 35 (millimeters). This parameter does not influence the projection matrix unless .filmOffset is set to a nonzero value.</div>
@@ -80,7 +84,13 @@ scene.add( camera );</code>
 
 
 		<h3>[property:Float near]</h3>
-		<div>Camera frustum near plane. Default is *0.1*.</div>
+		<div>
+			Camera frustum near plane. Default is *0.1*.<br /><br />
+
+			The valid range is greater than 0 and less than the current value of the [page:.far far] plane.
+			Note that, unlike for the [page:OrthographicCamera], *0* is <em>not</em> a valid value
+			for a PerspectiveCamera's near plane.
+		</div>
 
 		<h3>[property:Object view]</h3>
 		<div>

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

@@ -17,7 +17,7 @@
 		</code>
 
 		<div id="rev">
-			The current Three.js [link:https://github.com/mrdoob/three.js/releases revision number].
+			The current three.js [link:https://github.com/mrdoob/three.js/releases revision number].
 		</div>
 
     <h2>Mouse Buttons</h2>

+ 0 - 13
docs/api/constants/Materials.html

@@ -61,19 +61,6 @@
 		THREE.CustomBlending
 		</code>
 
-		<div>
-			These can also be accessed using:
-		</div>
-		
-		<code>
-		THREE.BlendingMode.NoBlending
-		THREE.BlendingMode.NormalBlending
-		THREE.BlendingMode.AdditiveBlending
-		THREE.BlendingMode.SubtractiveBlending
-		THREE.BlendingMode.MultiplyBlending
-		THREE.BlendingMode.CustomBlending
-		</code>
-
 
 		<div>
 		These control the source and destination blending equations for the material's RGB and Alpha sent to the WebGLRenderer for use by WebGL.<br />

+ 0 - 39
docs/api/constants/Textures.html

@@ -21,19 +21,6 @@
 		THREE.CubeUVReflectionMapping
 		THREE.CubeUVRefractionMapping
 		</code>
-		<div>
-			These can also be accessed using:
-		</div>
-		<code>
-		THREE.TextureMappingUVMapping
-		THREE.TextureMapping.CubeReflectionMapping
-		THREE.TextureMapping.CubeRefractionMapping
-		THREE.TextureMapping.EquirectangularReflectionMapping
-		THREE.TextureMapping.EquirectangularRefractionMapping
-		THREE.TextureMapping.SphericalReflectionMapping
-		THREE.TextureMapping.CubeUVReflectionMapping
-		THREE.TextureMapping.CubeUVRefractionMapping
-		</code>
 
 		<div>
 		These define the texture's mapping mode.<br />
@@ -60,14 +47,6 @@
 		THREE.ClampToEdgeWrapping
 		THREE.MirroredRepeatWrapping
 		</code>
-		<div>
-			These can also be accessed using:
-		</div>
-		<code>
-		THREE.TextureWrapping.RepeatWrapping
-		THREE.TextureWrapping.ClampToEdgeWrapping
-		THREE.TextureWrapping.MirroredRepeatWrapping
-		</code>
 		<div>
 		These define the texture's [page:Texture.wrapS wrapS] and [page:Texture.wrapT wrapT] properties,
 		which define horizontal and vertical texture wrapping.<br /><br />
@@ -85,13 +64,6 @@
 		THREE.NearestFilter
 		THREE.LinearFilter
 		</code>
-		<div>
-			These can also be accessed using:
-		</div>
-		<code>
-		THREE.TextureFilter.NearestFilter
-		THREE.TextureFilter.LinearFilter
-		</code>
 
 		<div>
 		For use with a texture's [page:Texture.magFilter magFilter]	property,
@@ -116,17 +88,6 @@
 		THREE.LinearMipMapNearestFilter
 		THREE.LinearMipMapLinearFilter
 		</code>
-		<div>
-			These can also be accessed using:
-		</div>
-		<code>
-		THREE.TextureFilter.NearestFilter
-		THREE.TextureFilter.NearestMipMapNearestFilter
-		THREE.TextureFilter.NearestMipMapLinearFilter
-		THREE.TextureFilter.LinearFilter
-		THREE.TextureFilter.LinearMipMapNearestFilter
-		THREE.TextureFilter.LinearMipMapLinearFilter
-		</code>
 
 		<div>
 		For use with a texture's [page:Texture.minFilter minFilter]	property, these define

+ 26 - 3
docs/api/core/Object3D.html

@@ -11,7 +11,7 @@
 		<h1>[name]</h1>
 
 		<div class="desc">
-			This is the base class for most objects in Three and provides a set of properties and methods
+			This is the base class for most objects in three.js and provides a set of properties and methods
 			for manipulating objects in 3D space.<br /><br />
 
 			Note that this can be used for grouping objects via the [page:.add]( object ) method
@@ -64,7 +64,7 @@
 		<h3>[property:Boolean matrixAutoUpdate]</h3>
 		<div>
 		When this is set, it calculates the matrix of position, (rotation or quaternion) and
-		scale every frame and also recalculates the matrixWorld property. Default is *true*.
+		scale every frame and also recalculates the matrixWorld property. Default is [page:Object3D.DefaultMatrixAutoUpdate] (true).
 		</div>
 
 		<h3>[property:Matrix4 matrixWorld]</h3>
@@ -132,7 +132,10 @@
 		</div>
 
 		<h3>[property:Vector3 up]</h3>
-		<div>Up direction. Default is [page:Vector3]( 0, 1, 0 ).</div>
+		<div>
+		This is used by the [page:.lookAt lookAt] method, for example, to determine the orientation of the result.<br />
+		Default is [page:Object3D.DefaultUp] - that is, ( 0, 1, 0 ).
+		</div>
 
 		<h3>[property:object userData]</h3>
 		<div>
@@ -152,7 +155,27 @@
 
 
 
+		<h2>Static Properties</h2>
+		<div>
+			Static properties and methods are defined per class rather than per instance of that class.
+			This means that changing [page:Object3D.DefaultUp] or [page:Object3D.DefaultMatrixAutoUpdate]
+			will change the values of [page:.up up] and [page:.matrixAutoUpdate matrixAutoUpdate] for
+			<em>every</em>	instance of Object3D (or derived classes)	created after the change has
+			been made (already created Object3Ds will not be affected).
+		</div>
+
+		<h3>[property:Vector3 DefaultUp]</h3>
+		<div>
+			The default [page:.up up] direction for objects, also used as the default position for [page:DirectionalLight],
+			[page:HemisphereLight] and [page:Spotlight] (which creates lights shining from the top down).<br />
+			Set to (0, 1, 0) by default.
+		</div>
+
+		<h3>[property:Vector3 DefaultMatrixAutoUpdate]</h3>
+		<div>
+			The default setting for [page.matrixAutoUpdate matrixAutoUpdate] for newly created Object3Ds.<br />
 
+		</div>
 
 
 		<h2>Methods</h2>

+ 1 - 1
docs/api/core/bufferAttributeTypes/BufferAttributeTypes.html

@@ -13,7 +13,7 @@
 		<h1>BufferAttribute Types</h1>
 
 		<div class="desc">
-		There are nine types of [page:BufferAttribute] available in Three. These correspond to the JavaScript
+		There are nine types of [page:BufferAttribute] available in three.js. These correspond to the JavaScript
 		[link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Syntax Typed Arrays].
 		</div>
 

+ 49 - 17
docs/api/deprecated/DeprecatedList.html

@@ -11,7 +11,7 @@
 		<h1>Deprecated API List</h1>
 
 		<div>
-			As Three.js has a rapidly evolving interface, you may come across examples that
+			As three.js has a rapidly evolving interface, you may come across examples that
 			suggest the use of API elements that are no longer part of the core.<br /><br />
 
 			Below is a list of such elements, along with info regarding their replacements.
@@ -34,6 +34,8 @@
 		<h3>[page:AudioAnalyser]</h3>
 		<div>AudioAnalyser.getData() has been renamed to [page:AudioAnalyser.getFrequencyData]().</div>
 
+		<h3>[page:BinaryTextureLoader]</h3>
+		<div>BinaryTextureLoader has been renamed to [page:DataTextureLoader].</div>
 
 
 
@@ -117,7 +119,7 @@
 		<h2>Core</h2>
 
 		<h3>[page:EventDispatcher]</h3>
-		<div>EventDispatcher.apply has been has been removed. Inherit or Object.assign the prototype to mix-in instead.</div>
+		<div>EventDispatcher.apply has been removed. Inherit or Object.assign the prototype to mix-in instead.</div>
 
 		<h3>[page:Raycaster]</h3>
 		<div>Raycaster.params.PointCloud has been renamed to [page:Raycaster.params.Points].</div>
@@ -125,9 +127,9 @@
 
 		<h3>[page:Uniform]</h3>
 		<div>
-			Uniform.dynamic has been has been removed. Use object.onBeforeRender() instead.<br /><br />
+			Uniform.dynamic has been removed. Use object.onBeforeRender() instead.<br /><br />
 
-			Uniform.onUpdate has been has been removed. Use object.onBeforeRender() instead.
+			Uniform.onUpdate has been removed. Use object.onBeforeRender() instead.
 		</div>
 
 
@@ -140,6 +142,8 @@
 		<h3>[page:ClosedSplineCurve3]</h3>
 		<div>ClosedSplineCurve3 has been deprecated. Use [page:CatmullRomCurve3] instead.</div>
 
+		<h3>[page:SplineCurve3]</h3>
+		<div>SplineCurve3 has been deprecated. Use [page:CatmullRomCurve3] instead.</div>
 
 
 
@@ -297,12 +301,16 @@
 
 			Matrix3.multiplyVector3 has been removed. Use vector.applyMatrix3( matrix ) instead.<br /><br />
 
-			Matrix3.multiplyVector3Array has been renamed to [page:Matrix3.applyToVector3Array]( array ).
+			Matrix3.multiplyVector3Array has been renamed to [page:Matrix3.applyToVector3Array]( array ).<br /><br />
+
+			Matrix3.applyToBuffer has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.<br /><br />
+
+			Matrix3.applyToVector3Array has been removed.
 		<div>
 
 		<h3>[page:Matrix4]</h3>
 		<div>
-			Matrix4.flattenToArrayOffset is deprecated. Use [page:Matrix4.toArray]() instead.<br /><br />
+			Matrix4.flattenToArrayOffset() is deprecated. Use [page:Matrix4.toArray]() instead.<br /><br />
 
 			Matrix4.extractPosition() has been renamed to [page:Matrix4.copyPosition]( matrix ).<br /><br />
 
@@ -310,24 +318,29 @@
 
 			Matrix4.setRotationFromQuaternion() has been renamed to [page:Matrix4.makeRotationFromQuaternion]( quaternion ).<br /><br />
 
-			Matrix4.multiplyVector3 has been has been removed. Use vector.applyMatrix4( matrix )
-			or vector.applyProjection( matrix ) instead.<br /><br />
+			Matrix4.multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.<br /><br />
+
+			Matrix4.multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.<br /><br />
+
+			Matrix4.multiplyVector3Array() has been renamed to [page:Matrix4.applyToVector3Array] ( array ).<br /><br />
 
-			Matrix4.multiplyVector4 has been removed. Use vector.applyMatrix4( matrix ) instead.<br /><br />
+			Matrix4.rotateAxis() has been removed. Use [page:Matrix4.transformDirection]( matrix ) instead.<br /><br />
 
-			Matrix4.multiplyVector3Array has been renamed to [page:Matrix4.applyToVector3Array] (array ).<br /><br />
+			Matrix4.crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.<br /><br />
 
-			Matrix4.rotateAxis has been removed. Use [page:Matrix4.transformDirection]( matrix ) instead.<br /><br />
+			Matrix4.rotateX() has been removed.<br /><br />
 
-			Matrix4.crossVector has been removed. Use vector.applyMatrix4( matrix ) instead.<br /><br />
+			Matrix4.rotateY() has been removed.<br /><br />
 
-			Matrix4.rotateX has been removed.<br /><br />
+			Matrix4.rotateZ() has been removed.<br /><br />
 
-			Matrix4.rotateY has been removed.<br /><br />
+			Matrix4.rotateByAxis() has been removed.<br /><br />
 
-			Matrix4.rotateZ has been removed.<br /><br />
+			Matrix4.applyToBuffer() has been removed. Use matrix.applyToBufferAttribute() instead.<br /><br />
 
-			Matrix4.rotateByAxis has been removed.
+			Matrix4.applyToVector3Array() has been removed.<br /><br />
+
+			Matrix4.makeFrustum() has been removed. Use [page:Matrix4.makePerspective]( left, right, top, bottom, near, far ) instead.
 		</div>
 
 
@@ -343,6 +356,10 @@
 			Ray.isIntersectionSphere has been renamed to [page:Ray.intersectsSphere].
 		</div>
 
+		<h3>[page:Vector2]</h3>
+		<div>
+			Vector2.fromAttribute() has been renamed to [page:Vector2.fromBufferAttribute]().
+		</div>
 
 		<h3>[page:Vector3]</h3>
 		<div>
@@ -354,12 +371,24 @@
 
 			Vector3.getScaleFromMatrix() has been renamed to [page:Vector3.setFromMatrixScale]().<br /><br />
 
-			Vector3.getColumnFromMatrix() has been renamed to [page:Vector3.setFromMatrixColumn]().
+			Vector3.getColumnFromMatrix() has been renamed to [page:Vector3.setFromMatrixColumn]().<br /><br />
+
+			Vector3.applyProjection() has been removed. Use [page:Vector3.applyMatrix4]() instead.<br /><br />
+
+			Vector3.fromAttribute() has been renamed to [page:Vector3.fromBufferAttribute]().
+		</div>
+
+		<h3>[page:Vector4]</h3>
+		<div>
+			Vector4.fromAttribute() has been renamed to [page:Vector4.fromBufferAttribute]().
 		</div>
 
 		<h3>[page:Vertex]</h3>
 		<div>Vertex has been removed. Use [page:Vector3] instead.</div>
 
+		<h3>[page:Spline]</h3>
+		<div>Spline has been removed. Use [page:CatmullRomCurve3] instead.</div>
+
 
 
 
@@ -556,6 +585,9 @@
 		</div>
 
 
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/Three.Legacy.js src/Three.Legacy.js]
 
 
 		</body>

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

@@ -25,7 +25,7 @@
 		t -- interpolation weight. <br />
 		p0, p1, p2, p4 -- the points defining the spline curve.<br /><br />
 
-		Used internally by [page:SplineCurve SplineCurve] and [page:SplineCurve3 SplineCurve3].
+		Used internally by [page:SplineCurve SplineCurve].
 		</div>
 
 		<h3>[method:Number tangentQuadraticBezier]( t, p0, p1, p2 )</h3>

+ 1 - 1
docs/api/extras/core/ShapePath.html

@@ -86,6 +86,6 @@
 
 		<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/extras/core/Path.js src/extras/core/Path.js]
 	</body>
 </html>

+ 0 - 66
docs/api/extras/curves/SplineCurve3.html

@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8" />
-		<base href="../../../" />
-		<script src="list.js"></script>
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		[page:Curve] &rarr;
-
-		<h1>[name]</h1>
-
-		<div class="desc">
-			Create a smooth 3d spline curve from a series of points. Internally this uses
-		[page:CurveUtils.interpolate] to create the curve.<br /><br />
-
-		Note that this will be deprecated. Please use a [page:CatmullRomCurve3] instead.
-
-	</div>
-
-		<h2>Example</h2>
-
-		<div>[example:webgl_geometry_extrude_splines geometry / extrude / splines ] (choose PipeSpline)</div>
-
-		<code>
-//Create a closed bent a sine-like wave
-var curve = new THREE.SplineCurve3( [
-	new THREE.Vector3( -10, 0, 10 ),
-	new THREE.Vector3( -5, 5, 5 ),
-	new THREE.Vector3( 0, 0, 0 ),
-	new THREE.Vector3( 5, -5, 5 ),
-	new THREE.Vector3( 10, 0, 10 )
-] );
-
-var geometry = new THREE.Geometry();
-geometry.vertices = curve.getPoints( 50 );
-
-var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
-
-//Create the final object to add to the scene
-var splineObject = new THREE.Line( geometry, material );
-	</code>
-
-
-
-
-		<h2>Constructor</h2>
-
-
-		<h3>[name]( [page:Array points] )</h3>
-		<div>points – An array of [page:Vector3] points that define the curve.</div>
-
-
-		<h2>Properties</h2>
-
-		<h3>[property:Array points]</h3>
-
-		<h2>Methods</h2>
-
-		<h3>See [page:Curve] for inherited methods</h3>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-	</body>
-</html>

+ 1 - 2
docs/api/extras/helpers/CameraHelper.html

@@ -24,8 +24,7 @@
 
 		<code>
 var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
-
-var helper = new THREE.CameraHelper( cameraPerspective );
+var helper = new THREE.CameraHelper( camera );
 scene.add( helper );
 		</code>
 

+ 1 - 1
docs/api/geometries/BoxBufferGeometry.html

@@ -67,6 +67,6 @@
 
 		<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/geometries/BoxGeometry.js src/geometries/BoxGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/CircleBufferGeometry.html

@@ -53,6 +53,6 @@
 
 		<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/geometries/CircleGeometry.js src/geometries/CircleGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/ConeBufferGeometry.html

@@ -61,6 +61,6 @@
 
 		<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/geometries/ConeGeometry.js src/geometries/ConeGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/CylinderBufferGeometry.html

@@ -62,6 +62,6 @@
 
 		<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/geometries/CylinderGeometry.js src/geometries/CylinderGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/DodecahedronBufferGeometry.html

@@ -49,6 +49,6 @@
 
 		<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/geometries/DodecahedronGeometry.js src/geometries/DodecahedronGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/IcosahedronBufferGeometry.html

@@ -48,6 +48,6 @@
 
 		<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/geometries/IcosahedronGeometry.js src/geometries/IcosahedronGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/LatheBufferGeometry.html

@@ -60,6 +60,6 @@
 
 		<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/geometries/LatheGeometry.js src/geometries/LatheGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/OctahedronBufferGeometry.html

@@ -48,6 +48,6 @@
 
 		<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/geometries/OctahedronGeometry.js src/geometries/OctahedronGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/ParametricBufferGeometry.html

@@ -55,6 +55,6 @@
 
 		<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/geometries/ParametricGeometry.js src/geometries/ParametricGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/PlaneBufferGeometry.html

@@ -58,6 +58,6 @@
 
 		<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/geometries/PlaneGeometry.js src/geometries/PlaneGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/PolyhedronBufferGeometry.html

@@ -59,6 +59,6 @@ var geometry = new THREE.PolyhedronBufferGeometry( verticesOfCube, indicesOfFace
 
 		<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/geometries/PolyhedronGeometry.js src/geometries/PolyhedronGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/RingBufferGeometry.html

@@ -54,6 +54,6 @@
 
 		<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/geometries/RingGeometry.js src/geometries/RingGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/ShapeBufferGeometry.html

@@ -66,6 +66,6 @@
 
 		<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/geometries/ShapeGeometry.js src/geometries/ShapeGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/SphereBufferGeometry.html

@@ -66,6 +66,6 @@
 
 		<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/geometries/SphereGeometry.js src/geometries/SphereGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/TetrahedronBufferGeometry.html

@@ -49,6 +49,6 @@
 
 		<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/geometries/TetrahedronGeometry.js src/geometries/TetrahedronGeometry.js]
 	</body>
 </html>

+ 138 - 137
docs/api/geometries/TextGeometry.html

@@ -1,138 +1,139 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
+<!DOCTYPE html>
+<html lang="en">
+	<head>
 		<meta charset="utf-8" />
-		<base href="../../" />
-		<script src="list.js"></script>
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		[page:ExtrudeGeometry] &rarr;
-
-		<h1>[name]</h1>
-
-		<div class="desc">This object creates a 3D object of text as a single object.</div>
-
-		<iframe id="scene" src="scenes/geometry-browser.html#TextGeometry"></iframe>
-
-		<script>
-
-		// iOS iframe auto-resize workaround
-
-		if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
-
-			var scene = document.getElementById( 'scene' );
-
-			scene.style.width = getComputedStyle( scene ).width;
-			scene.style.height = getComputedStyle( scene ).height;
-			scene.setAttribute( 'scrolling', 'no' );
-
-		}
-
-		</script>
-
-		<h2>Example</h2>
-
-		<div>
-		[example:webgl_geometry_text geometry / text ]<br/>
-		[example:webgl_geometry_text2 geometry / text2 ]
-		</div>
-
-		<h2>Constructor</h2>
-
-		<h3>[name]([page:String text], [page:Object parameters])</h3>
-		<div>
-		text — The text that needs to be shown. <br />
-		parameters — Object that can contains the following parameters.
-		<ul>
-			<li>font — THREE.Font.</li>
-			<li>size — Float. Size of the text.</li>
-			<li>height — Float. Thickness to extrude text.  Default is 50.</li>
-			<li>curveSegments — Integer. Number of points on the curves. Default is 12.</li>
-			<li>bevelEnabled — Boolean. Turn on bevel. Default is False.</li>
-			<li>bevelThickness — Float. How deep into text bevel goes. Default is 10.</li>
-			<li>bevelSize — Float. How far from text outline is bevel. Default is 8.</li>
-		</ul>
-		</div>
-
-		<h2>Available Fonts</h2>
-
-		<div>
-		TextGeometry uses <a href='http://gero3.github.io/facetype.js/' target="_top">typeface.json</a> generated fonts.
-		Some existing fonts can be found located in <b>/examples/fonts</b> and must be included in the page.
-		</div>
-		<table>
-			<tr>
-				<th>Font</th>
-				<th>Weight</th>
-				<th>Style</th>
-				<th>File Path</th>
-			</tr>
-			<tr>
-				<td>helvetiker</td>
-				<td>normal</td>
-				<td>normal</td>
-				<td>/examples/fonts/helvetiker_regular.typeface.json</td>
-			</tr>
-			<tr>
-				<td>helvetiker</td>
-				<td>bold</td>
-				<td>normal</td>
-				<td>/examples/fonts/helvetiker_bold.typeface.json</td>
-			</tr>
-			<tr>
-				<td>optimer</td>
-				<td>normal</td>
-				<td>normal</td>
-				<td>/examples/fonts/optimer_regular.typeface.json</td>
-			</tr>
-			<tr>
-				<td>optimer</td>
-				<td>bold</td>
-				<td>normal</td>
-				<td>/examples/fonts/optimer_bold.typeface.json</td>
-			</tr>
-			<tr>
-				<td>gentilis</td>
-				<td>normal</td>
-				<td>normal</td>
-				<td>/examples/fonts/gentilis_regular.typeface.json</td>
-			</tr>
-			<tr>
-				<td>gentilis</td>
-				<td>bold</td>
-				<td>normal</td>
-				<td>/examples/fonts/gentilis_bold.typeface.json</td>
-			</tr>
-			<tr>
-				<td>droid sans</td>
-				<td>normal</td>
-				<td>normal</td>
-				<td>/examples/fonts/droid/droid_sans_regular.typeface.json</td>
-			</tr>
-			<tr>
-				<td>droid sans</td>
-				<td>bold</td>
-				<td>normal</td>
-				<td>/examples/fonts/droid/droid_sans_bold.typeface.json</td>
-			</tr>
-			<tr>
-				<td>droid serif</td>
-				<td>normal</td>
-				<td>normal</td>
-				<td>/examples/fonts/droid/droid_serif_regular.typeface.json</td>
-			</tr>
-			<tr>
-				<td>droid serif</td>
-				<td>bold</td>
-				<td>normal</td>
-				<td>/examples/fonts/droid/droid_serif_bold.typeface.json</td>
-			</tr>
-		</table>
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-	</body>
-</html>
+		<base href="../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body>
+		[page:ExtrudeGeometry] &rarr;
+
+		<h1>[name]</h1>
+
+		<div class="desc">This object creates a 3D object of text as a single object.</div>
+
+		<iframe id="scene" src="scenes/geometry-browser.html#TextGeometry"></iframe>
+
+		<script>
+
+		// iOS iframe auto-resize workaround
+
+		if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
+
+			var scene = document.getElementById( 'scene' );
+
+			scene.style.width = getComputedStyle( scene ).width;
+			scene.style.height = getComputedStyle( scene ).height;
+			scene.setAttribute( 'scrolling', 'no' );
+
+		}
+
+		</script>
+
+		<h2>Example</h2>
+
+		<div>
+		[example:webgl_geometry_text geometry / text ]<br/>
+		[example:webgl_geometry_text2 geometry / text2 ]
+		</div>
+
+		<h2>Constructor</h2>
+
+		<h3>[name]([page:String text], [page:Object parameters])</h3>
+		<div>
+		text — The text that needs to be shown. <br />
+		parameters — Object that can contains the following parameters.
+		<ul>
+			<li>font — THREE.Font.</li>
+			<li>size — Float. Size of the text.</li>
+			<li>height — Float. Thickness to extrude text.  Default is 50.</li>
+			<li>curveSegments — Integer. Number of points on the curves. Default is 12.</li>
+			<li>bevelEnabled — Boolean. Turn on bevel. Default is False.</li>
+			<li>bevelThickness — Float. How deep into text bevel goes. Default is 10.</li>
+			<li>bevelSize — Float. How far from text outline is bevel. Default is 8.</li>
+			<li>bevelSegments — Integer. Number of bevel segments. Default is 3.</li>
+		</ul>
+		</div>
+
+		<h2>Available Fonts</h2>
+
+		<div>
+		TextGeometry uses <a href='http://gero3.github.io/facetype.js/' target="_top">typeface.json</a> generated fonts.
+		Some existing fonts can be found located in <b>/examples/fonts</b> and must be included in the page.
+		</div>
+		<table>
+			<tr>
+				<th>Font</th>
+				<th>Weight</th>
+				<th>Style</th>
+				<th>File Path</th>
+			</tr>
+			<tr>
+				<td>helvetiker</td>
+				<td>normal</td>
+				<td>normal</td>
+				<td>/examples/fonts/helvetiker_regular.typeface.json</td>
+			</tr>
+			<tr>
+				<td>helvetiker</td>
+				<td>bold</td>
+				<td>normal</td>
+				<td>/examples/fonts/helvetiker_bold.typeface.json</td>
+			</tr>
+			<tr>
+				<td>optimer</td>
+				<td>normal</td>
+				<td>normal</td>
+				<td>/examples/fonts/optimer_regular.typeface.json</td>
+			</tr>
+			<tr>
+				<td>optimer</td>
+				<td>bold</td>
+				<td>normal</td>
+				<td>/examples/fonts/optimer_bold.typeface.json</td>
+			</tr>
+			<tr>
+				<td>gentilis</td>
+				<td>normal</td>
+				<td>normal</td>
+				<td>/examples/fonts/gentilis_regular.typeface.json</td>
+			</tr>
+			<tr>
+				<td>gentilis</td>
+				<td>bold</td>
+				<td>normal</td>
+				<td>/examples/fonts/gentilis_bold.typeface.json</td>
+			</tr>
+			<tr>
+				<td>droid sans</td>
+				<td>normal</td>
+				<td>normal</td>
+				<td>/examples/fonts/droid/droid_sans_regular.typeface.json</td>
+			</tr>
+			<tr>
+				<td>droid sans</td>
+				<td>bold</td>
+				<td>normal</td>
+				<td>/examples/fonts/droid/droid_sans_bold.typeface.json</td>
+			</tr>
+			<tr>
+				<td>droid serif</td>
+				<td>normal</td>
+				<td>normal</td>
+				<td>/examples/fonts/droid/droid_serif_regular.typeface.json</td>
+			</tr>
+			<tr>
+				<td>droid serif</td>
+				<td>bold</td>
+				<td>normal</td>
+				<td>/examples/fonts/droid/droid_serif_bold.typeface.json</td>
+			</tr>
+		</table>
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 1 - 1
docs/api/geometries/TorusBufferGeometry.html

@@ -59,6 +59,6 @@
 
 		<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/geometries/TorusGeometry.js src/geometries/TorusGeometry.js]
 	</body>
 </html>

+ 1 - 1
docs/api/geometries/TorusKnotBufferGeometry.html

@@ -62,6 +62,6 @@
 
 		<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/geometries/TorusKnotGeometry.js src/geometries/TorusKnotGeometry.js]
 	</body>
 </html>

+ 12 - 13
docs/api/geometries/TubeBufferGeometry.html

@@ -35,25 +35,24 @@
 		<h2>Example</h2>
 
 		<code>
-		var CustomSinCurve = THREE.Curve.create(
+		function CustomSinCurve( scale ){
 
-			function ( scale ) { //custom curve constructor
+			this.scale = ( scale === undefined ) ? 1 : scale;
 
-				this.scale = ( scale === undefined ) ? 1 : scale;
-
-			},
+		}
 
-			function ( t ) { //getPoint: t is between 0-1
+		CustomSinCurve.prototype = Object.create( THREE.Curve.prototype );
+		CustomSinCurve.prototype.constructor = CustomSinCurve;
 
-				var tx = t * 3 - 1.5;
-				var ty = Math.sin( 2 * Math.PI * t );
-				var tz = 0;
+		CustomSinCurve.prototype.getPoint = function ( t ) {
 
-				return new THREE.Vector3( tx, ty, tz ).multiplyScalar( this.scale );
+			var tx = t * 3 - 1.5;
+			var ty = Math.sin( 2 * Math.PI * t );
+			var tz = 0;
 
-			}
+			return new THREE.Vector3( tx, ty, tz ).multiplyScalar( this.scale );
 
-		);
+		};
 
 		var path = new CustomSinCurve( 10 );
 		var geometry = new THREE.TubeBufferGeometry( path, 20, 2, 8, false );
@@ -99,6 +98,6 @@
 
 		<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/geometries/TubeGeometry.js src/geometries/TubeGeometry.js]
 	</body>
 </html>

+ 11 - 12
docs/api/geometries/TubeGeometry.html

@@ -35,25 +35,24 @@
 		<h2>Example</h2>
 
 		<code>
-		var CustomSinCurve = THREE.Curve.create(
+		function CustomSinCurve( scale ){
 
-			function ( scale ) { //custom curve constructor
+			this.scale = ( scale === undefined ) ? 1 : scale;
 
-				this.scale = ( scale === undefined ) ? 1 : scale;
-
-			},
+		}
 
-			function ( t ) { //getPoint: t is between 0-1
+		CustomSinCurve.prototype = Object.create( THREE.Curve.prototype );
+		CustomSinCurve.prototype.constructor = CustomSinCurve;
 
-				var tx = t * 3 - 1.5;
-				var ty = Math.sin( 2 * Math.PI * t );
-				var tz = 0;
+		CustomSinCurve.prototype.getPoint = function ( t ) {
 
-				return new THREE.Vector3( tx, ty, tz ).multiplyScalar( this.scale );
+			var tx = t * 3 - 1.5;
+			var ty = Math.sin( 2 * Math.PI * t );
+			var tz = 0;
 
-			}
+			return new THREE.Vector3( tx, ty, tz ).multiplyScalar( this.scale );
 
-		);
+		};
 
 		var path = new CustomSinCurve( 10 );
 		var geometry = new THREE.TubeGeometry( path, 20, 2, 8, false );

+ 1 - 2
docs/api/lights/DirectionalLight.html

@@ -24,7 +24,7 @@
 		<h2>A Note about Position, Target and rotation</h2>
 		<div>
 			A common point of confusion for directional lights is that setting the rotation has no effect.
-			This is because Three's DirectionalLight is the equivalent to what is often called a 'Target
+			This is because three.js's DirectionalLight is the equivalent to what is often called a 'Target
 			Direct Light' in other applications.<br /><br />
 
 			This means that its direction is calculated as pointing
@@ -54,7 +54,6 @@
 		<code>
 // White directional light at half intensity shining from the top.
 var directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 );
-directionalLight.position.set( 0, 1, 0 );
 scene.add( directionalLight );
 	</code>
 

+ 2 - 1
docs/api/lights/PointLight.html

@@ -95,7 +95,8 @@ scene.add( light );
 
 		<h3>[property:LightShadow shadow]</h3>
 		<div>
-			A [page:LightShadow] used to calculate shadows for this light.<br />
+			A [page:LightShadow] used to calculate shadows for this light.<br /><br />
+
 			 The lightShadow's [page:LightShadow.camera camera]
 			is set to a  [page:PerspectiveCamera] with [page:PerspectiveCamera.fov fov] of 90,
 			[page:PerspectiveCamera.aspect aspect] of 1, [page:PerspectiveCamera.near near]

+ 157 - 0
docs/api/lights/RectAreaLight.html

@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body>
+		[page:Object3D] &rarr; [page:Light] &rarr;
+
+		<h1>[name]</h1>
+
+		<div class="desc">
+			This light gets emitted uniformly across the face a rectangular plane. This can be
+			used to simulate things like bright windows or strip lighting.<br /><br />
+
+			This light can cast shadows - see the [page:RectAreaLightShadow] page for details.<br /><br />
+
+			<em>NOTE:</em> this class is currently under active development and is probably not
+			production ready yet (as of r83). Check back in a month or two! And feel free to try it out in the meantime.
+		</div>
+
+
+
+
+		<h2>Examples</h2>
+
+		<div>
+			[example:webgl_lights_arealight WebGL / arealight ]<br />
+			[example:webgl_lights_rectarealight WebGL / rectarealight ]
+
+			<code>
+var width = 2;
+var height = 10;
+var rectLight = new THREE.RectAreaLight( 0xffffff, undefined,  width, height );
+rectLight.matrixAutoUpdate = true;
+rectLight.intensity = 70.0;
+rectLight.position.set( 5, 5, 0 );
+rectLightHelper = new THREE.RectAreaLightHelper( rectLight );
+rectLight.add( rectLightHelper );
+
+scene.add(rectLight)
+			</code>
+		</div>
+
+
+
+
+
+		<h2>Constructor</h2>
+
+
+		<h3>[name]( [page:Integer color], [page:Float intensity], [page:Float distance], [page:Radians angle], [page:Float penumbra], [page:Float decay] )</h3>
+		<div>
+			[page:Integer color] - (optional) hexadecimal color of the light. Default is 0xffffff (white).<br />
+			[page:Float intensity] - (optional) numeric value of the light's strength/intensity. Default is 1.<br /><br />
+			[page:Float width] - (optional) width of the light. Default is 10.<br />
+			[page:Float height] - (optional) height of the light. Default is 10.
+
+			Creates a new [name].
+		</div>
+
+		<h2>Properties</h2>
+		<div>
+			See the base [page:Light Light] class for common properties.
+		</div>
+
+
+		<h3>[property:Boolean castShadow]</h3>
+		<div>
+			If set to *true* light will cast dynamic shadows. *Warning*: This is expensive and
+			requires tweaking to get shadows looking right. See the [page:RectAreaLightShadow] for details.
+			The default is *false*.<br /><br />
+
+			<em>Note:</em> this is not yet implemented for this light type! (r83)
+		</div>
+
+		<h3>[property:Float decay]</h3>
+		<div>
+			The amount the light dims along the distance of the light.<br />
+			In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode, decay = 2 leads to
+			physically realistic light falloff. The default is *1*.<br /><br />
+
+			<em>Note:</em> this is not yet implemented for this light type! (r83)
+		</div>
+
+		<h3>[property:Float distance]</h3>
+		<div>
+			If non-zero, light will attenuate linearly from maximum intensity at the light's
+			position down to zero at this distance from the light. Default is *0.0*.<br /><br />
+
+			<em>Note:</em> this is not yet implemented for this light type! (r83)
+		</div>
+
+		<h3>[property:Boolean isRectAreaLight]</h3>
+		<div>
+			Used to check whether this or derived classes are spot lights. Default is *true*.<br /><br />
+
+			You should not change this, as it used internally for optimisation.
+		</div>
+
+		<h3>[property:Vector3 position]</h3>
+		<div>
+			This is set equal to [page:Object3D.DefaultUp] (0, 1, 0), so that the light shines from the top down.
+		</div>
+
+		<h3>[property:RectAreaLightShadow shadow]</h3>
+		<div>
+			A [page:RectAreaLightShadow] used to calculate shadows for this light.<br /><br />
+
+			<em>Note:</em> this is not yet implemented for this light type! (r83)
+		</div>
+
+
+		<h3>[property:Object3D target]</h3>
+		<div>
+			The RectAreaLight points from its [page:.position position] to target.position. The default
+			position of the target is *(0, 0, 0)*.<br />
+
+			*Note*: For the the target's position to be changed to anything other than the default,
+			it must be added to the [page:Scene scene] using
+			<code>
+				scene.add( light.target );
+			</code>
+
+			This is so that the target's [page:Object3D.matrixWorld matrixWorld] gets automatically
+			updated each frame.<br /><br />
+
+			It is also possible to set the target to be another object in the scene (anything with a
+			[page:Object3D.position position] property), like so:
+			<code>
+var targetObject = new THREE.Object3D();
+scene.add(targetObject);
+
+light.target = targetObject;
+			</code>
+			The RectAreaLight will now track the target object.
+		</div>
+
+
+		<h2>Methods</h2>
+		<div>
+			See the base [page:Light Light] class for common methods.
+		</div>
+
+
+		<h3>[method:RectAreaLight copy]( [page:RectAreaLight source] )</h3>
+		<div>
+		Copies value of all the properties from the [page:RectAreaLight source] to this
+		RectAreaLight.
+		</div>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 71 - 7
docs/api/lights/shadows/DirectionalLightShadow.html

@@ -12,22 +12,86 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">TODO</div>
+		<div class="desc">
+			This used internally by [page:DirectionalLight DirectionalLights] for calculating shadows.<br /><br />
 
-		<h2>Constructor</h2>
+			Unlike the other shadow classes, this uses an [page:OrthographicCamera] to calculate the shadows,
+			rather than a [page:PerspectiveCamera]. This is because light rays from a [page:DirectionalLight]
+			are parallel.
+		</div>
+
+		<h2>Example</h2>
+		<div>
+			<code>
+//Create a WebGLRenderer and turn on shadows in the renderer
+var renderer = new THREE.WebGLRenderer();
+renderer.shadowMap.enabled = true;
+renderer.shadowMap.type = THREE.PCFSoftShadowMap; // default THREE.PCFShadowMap
+
+//Create a DirectionalLight and turn on shadows for the light
+var light = new THREE.DirectionalLight( 0xffffff, 1, 100 );
+light.position.set( 0, 1, 0 ); 			//default; light shining from top
+light.castShadow = true;            // default false
+scene.add( light );
+
+//Set up shadow properties for the light
+light.shadow.mapSize.width = 512;  // default
+light.shadow.mapSize.height = 512; // default
+light.shadow.camera.near = 0.5;       // default
+light.shadow.camera.far = 500      // default
+
+//Create a sphere that cast shadows (but does not receive them)
+var sphereGeometry = new THREE.SphereBufferGeometry( 5, 32, 32 );
+var sphereMaterial = new THREE.MeshStandardMaterial( { color: 0xff0000 } );
+var sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );
+sphere.castShadow = true; //default is false
+sphere.receiveShadow = false; //default
+scene.add( sphere );
+
+//Create a plane that receives shadows (but does not cast them)
+var planeGeometry = new THREE.PlaneBufferGeometry( 20, 20, 32, 32 );
+var planeMaterial = new THREE.MeshStandardMaterial( { color: 0x00ff00 } )
+var plane = new THREE.Mesh( planeGeometry, planeMaterial );
+plane.receiveShadow = true;
+scene.add( plane );
 
-		The constructor creates an [page:OrthographicCamera OrthographicCamera] to manage the shadow's view of the world.
+//Create a helper for the shadow camera (optional)
+var helper = new THREE.CameraHelper( light.shadow.camera );
+scene.add( helper );
+			</code>
+		</div>
+
+		<h2>Constructor</h2>
+		<h3>[name]( )</h3>
+		<div>
+			Creates a new [name]. This is not intended to be called directly - it is called
+			internally by [page:DirectionalLight].
+		</div>
 
 		<h2>Properties</h2>
+		<div>
+			See the base [page:LightShadow LightShadow] class for common properties.
+		</div>
 
-		See the base [page:LightShadow LightShadow] class for common properties.
+		<h3>[property:Camera camera]</h3>
+		<div>
+			The light's view of the world. This is used to generate a depth map of the scene; objects behind
+			other objects from the light's perspective will be in shadow.<br /><br />
 
-		<h2>Methods</h2>
+			The default is an [page:OrthographicCamera] with [page:OrthographicCamera.left left] and
+			[page:OrthographicCamera.bottom bottom] set to -5,  [page:OrthographicCamera.right right]
+			and  [page:OrthographicCamera.top top] set to 5, the [page:OrthographicCamera.near near]
+			clipping plane at 0.5 and the [page:OrthographicCamera.far far] clipping plane at 500.
+		</div>
 
-		See the base [page:LightShadow LightShadow] class for common methods.
+
+		<h2>Methods</h2>
+		<div>
+			See the base [page:LightShadow LightShadow] class for common methods.
+		</div>
 
 		<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/lights/[name].js src/lights/[name].js]
 	</body>
 </html>

+ 83 - 17
docs/api/lights/shadows/LightShadow.html

@@ -11,65 +11,131 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">TODO</div>
+		<div class="desc">
+			This used internally by [page:PointLight PointLights] for calculating shadows, and also serves as
+			a base class for the other shadow classes.
+		</div>
 
-		<h2>Constructor</h2>
 
+		<h2>Example</h2>
+		<div>
+			<code>
+//Create a WebGLRenderer and turn on shadows in the renderer
+var renderer = new THREE.WebGLRenderer();
+renderer.shadowMap.enabled = true;
+renderer.shadowMap.type = THREE.PCFSoftShadowMap; // default THREE.PCFShadowMap
+
+//Create a PointLight and turn on shadows for the light
+var light = new THREE.PointLight( 0xffffff, 1, 100 );
+light.position.set( 0, 10, 0 );
+light.castShadow = true;            // default false
+scene.add( light );
+
+//Set up shadow properties for the light
+light.shadow.mapSize.width = 512;  // default
+light.shadow.mapSize.height = 512; // default
+light.shadow.camera.near = 0.5;       // default
+light.shadow.camera.far = 500      // default
+
+//Create a sphere that cast shadows (but does not receive them)
+var sphereGeometry = new THREE.SphereBufferGeometry( 5, 32, 32 );
+var sphereMaterial = new THREE.MeshStandardMaterial( { color: 0xff0000 } );
+var sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );
+sphere.castShadow = true; //default is false
+sphere.receiveShadow = false; //default
+scene.add( sphere );
+
+//Create a plane that receives shadows (but does not cast them)
+var planeGeometry = new THREE.PlaneBufferGeometry( 20, 20, 32, 32 );
+var planeMaterial = new THREE.MeshStandardMaterial( { color: 0x00ff00 } )
+var plane = new THREE.Mesh( planeGeometry, planeMaterial );
+plane.receiveShadow = true;
+scene.add( plane );
+
+//Create a helper for the shadow camera (optional)
+var helper = new THREE.CameraHelper( light.shadow.camera );
+scene.add( helper );
+			</code>
+		</div>
+
+		<h2>Constructor</h2>
 
 		<h3>[name]( [page:Camera camera] )</h3>
 		<div>
-		[page:Camera camera] — The shadow's view of the world.
+		[page:Camera camera] - the light's view of the world.<br /><br />
+
+		Create a new [name]. This is not intended to be called directly - it is called
+		internally by [page:PointLight] or used as a base class by other light shadows.
 		</div>
 
 		<h2>Properties</h2>
 
 		<h3>[property:Camera camera]</h3>
 		<div>
-			The shadow's view of the world.
+			The light's view of the world. This is used to generate a depth map of the scene; objects behind
+			other objects from the light's perspective will be in shadow.
 		</div>
 
 		<h3>[property:Float bias]</h3>
 		<div>
 			Shadow map bias, how much to add or subtract from the normalized depth when deciding whether a surface is in shadow.<br />
-			Default — *0*.
+			The default is 0. Very tiny adjustments here (in the order of 0.0001) may help reduce artefacts in shadows
 		</div>
 
-		<h3>[property:Float radius]</h3>
+		<h3>[property:WebGLRenderTarget map]</h3>
 		<div>
-			TODO<br />
-			Default - *0*.
+			The depth map generated using the internal camera; a location beyond a pixel's depth is
+			in shadow. Computed internally during rendering.
 		</div>
 
+
 		<h3>[property:Vector2 mapSize]</h3>
 		<div>
-			The width and height of the shadow map stored in a [page:Vector2 Vector2].<br />
-			Default — *( 512, 512 )*.
+			A [Page:Vector2] defining the width and height of the shadow map.<br /><br />
+
+			Higher values give better quality shadows at the cost of computation time. Values must be
+			powers of 2, up to the [page:WebGLRenderer.capabilities].maxTextureSize for a given device,
+			although the width and height don't have to be the same (so, for example, (512, 1024) is valid).
+			The default is *( 512, 512 )*.
 		</div>
 
-		<h3>[property:WebGLRenderTarget map]</h3>
+
+		<h3>[property:Matrix4 matrix]</h3>
 		<div>
-			The depth map generated using the internal camera; a location beyond a pixel's depth is in shadow. Computed internally during rendering.
+			Model to shadow camera space, to compute location and depth in shadow map. Stored
+			in a [page:Matrix4 Matrix4]. This is computed internally during rendering.
 		</div>
 
-		<h3>[property:Matrix4 matrix]</h3>
+		<h3>[property:Float radius]</h3>
 		<div>
-			Model to shadow camera space, to compute location and depth in shadow map. Stored in a [page:Matrix4 Matrix4]. Computed internally during rendering.
+			Setting this this to values greater than 1 will blur the edges of the shadow.<br />
+
+			High values will cause unwanted banding effects in the shadows - a greater [page:.mapSize mapSize]
+			will allow for a higher value to be used here before these effects become visible.<br /><br />
+
+			Note that this has no effect if the [page:WebGLRenderer.shadowMap.type] is set to [page:Renderer BasicShadowMap].
 		</div>
 
 
 		<h2>Methods</h2>
 		<h3>[method:LightShadow copy]( [page:LightShadow source] )</h3>
 		<div>
-		Copies value of *source* to this LightShadow object.
+		Copies value of all the properties from the [page:LightShadow source] to this
+		SpotLight.
 		</div>
 
 		<h3>[method:LightShadow clone]()</h3>
 		<div>
-		It returns a clone of LightShadow.
+		Creates a new LightShadow with the same properties as this one.
+		</div>
+
+		<h3>[method:Object toJSON]()</h3>
+		<div>
+		Serialize this LightShadow.
 		</div>
 
 		<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/lights/[name].js src/lights/[name].js]
 	</body>
 </html>

+ 54 - 0
docs/api/lights/shadows/RectAreaLightShadow.html

@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../../" />
+		<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">
+			<em>Note: this is currently being developed and does nothing at the moment (r83).
+				Check back in a while!</em><br /><br />
+
+			This used internally by [page:RectAreaLight RectAreaLight] for calculating shadows.
+		</div>
+
+
+		<!--
+		<h2>Example</h2>
+		<div>
+			<code>
+			</code>
+		</div>
+	-->
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( [page:Camera camera] )</h3>
+		<div>
+		[page:Camera camera] - the light's view of the world.<br /><br />
+
+		Create a new [name]. This is not intended to be called directly - it is called
+		internally by [page:RectAreaLight].
+		</div>
+
+		<h2>Properties</h2>
+		<div>
+			See the base [page:LightShadow] class for common properties.
+		</div>
+
+		<h2>Methods</h2>
+		<div>
+			See the base [page:LightShadow] class for common methods.
+		</div>
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/lights/[name].js src/lights/[name].js]
+	</body>
+</html>

+ 64 - 5
docs/api/lights/shadows/SpotLightShadow.html

@@ -12,27 +12,86 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">TODO</div>
+		<div class="desc">
+			This used internally by [page:SpotLight SpotLights] for calculating shadows.
+		</div>
+
+		<h2>Example</h2>
+		<div>
+			<code>
+//Create a WebGLRenderer and turn on shadows in the renderer
+var renderer = new THREE.WebGLRenderer();
+renderer.shadowMap.enabled = true;
+renderer.shadowMap.type = THREE.PCFSoftShadowMap; // default THREE.PCFShadowMap
+
+//Create a SpotLight and turn on shadows for the light
+var light = new THREE.SpotLight( 0xffffff );
+light.castShadow = true;            // default false
+scene.add( light );
+
+//Set up shadow properties for the light
+light.shadow.mapSize.width = 512;  // default
+light.shadow.mapSize.height = 512; // default
+light.shadow.camera.near = 0.5;       // default
+light.shadow.camera.far = 500      // default
+
+//Create a sphere that cast shadows (but does not receive them)
+var sphereGeometry = new THREE.SphereBufferGeometry( 5, 32, 32 );
+var sphereMaterial = new THREE.MeshStandardMaterial( { color: 0xff0000 } );
+var sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );
+sphere.castShadow = true; //default is false
+sphere.receiveShadow = false; //default
+scene.add( sphere );
+
+//Create a plane that receives shadows (but does not cast them)
+var planeGeometry = new THREE.PlaneBufferGeometry( 20, 20, 32, 32 );
+var planeMaterial = new THREE.MeshStandardMaterial( { color: 0x00ff00 } )
+var plane = new THREE.Mesh( planeGeometry, planeMaterial );
+plane.receiveShadow = true;
+scene.add( plane );
+
+//Create a helper for the shadow camera (optional)
+var helper = new THREE.CameraHelper( light.shadow.camera );
+scene.add( helper );
+			</code>
+		</div>
+
 
 		<h2>Constructor</h2>
 
 		The constructor creates a [page:PerspectiveCamera PerspectiveCamera] to manage the shadow's view of the world.
 
 		<h2>Properties</h2>
-
 		See the base [page:LightShadow LightShadow] class for common properties.
 
-		<h2>Methods</h2>
 
+	 <h3>[property:Camera camera]</h3>
+	 <div>
+		 The light's view of the world. This is used to generate a depth map of the scene; objects behind
+		 other objects from the light's perspective will be in shadow.<br /><br />
+
+		 The default is a  [page:PerspectiveCamera] with [page:PerspectiveCamera.fov fov] of 90,
+	  [page:PerspectiveCamera.aspect aspect] of 1, [page:PerspectiveCamera.near near]
+		clipping plane at 0.5 and	[page:PerspectiveCamera.far far] clipping plane at 500.
+	 </div>
+
+	 <h3>[property:Boolean isSpotLightShadow]</h3>
+	 <div>
+		 Used to check whether this or derived classes are spot light shadows. Default is *true*.<br /><br />
+
+		 You should not change this, as it used internally for optimisation.
+	 </div>
+
+		<h2>Methods</h2>
 		See the base [page:LightShadow LightShadow] class for common methods.
 
 		<h3>[method:SpotLightShadow update]( [page:SpotLight light] )</h3>
 		<div>
-		Updates the internal perspective camera.
+		Updates the internal perspective [page:.camera camera] based on the passed in [page:SpotLight light].
 		</div>
 
 		<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/lights/[name].js src/lights/[name].js]
 	</body>
 </html>

+ 0 - 62
docs/api/loaders/BinaryTextureLoader.html

@@ -1,62 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8" />
-		<base href="../../" />
-		<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">
-		Abstract base class to load generic binary textures formats (rgbe, hdr, ...).
-		This uses the [page:FileLoader] internally for loading files.
-		</div>
-
-		<h2>Examples</h2>
-
-		<div>
-			See the [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/RGBELoader.js RGBELoader]
-			for an example of a derived class.
-		</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].<br /><br />
-
-		Creates a new [name].
-		</div>
-
-
-		<h2>Properties</h2>
-
-		<h3>[property:LoadingManager manager]</h3>
-		<div>
-		The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
-		</div>
-
-
-		<h2>Methods</h2>
-
-		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
-		<div>
-		[page:String url] — the path or URL to the file. This can also be a
-			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
-		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded texture.<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 texture to onLoad.
-		</div>
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-	</body>
-</html>

+ 47 - 2
docs/api/loaders/DataTextureLoader.html

@@ -10,9 +10,54 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">This is an alias for the [page:BinaryTextureLoader BinaryTextureLoader].
-			See that page for details.
+		<div class="desc">
+		Abstract base class to load generic binary textures formats (rgbe, hdr, ...).
+		This uses the [page:FileLoader] internally for loading files, and creates a new
+		[page:DataTexture].
 		</div>
 
+		<h2>Examples</h2>
+
+		<div>
+			See the [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/RGBELoader.js RGBELoader]
+			for an example of a derived class.
+		</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].<br /><br />
+
+		Creates a new [name].
+		</div>
+
+
+		<h2>Properties</h2>
+
+		<h3>[property:LoadingManager manager]</h3>
+		<div>
+		The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
+		</div>
+
+
+		<h2>Methods</h2>
+
+		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
+		<div>
+		[page:String url] — the path or URL to the file. This can also be a
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
+		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded texture.<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 texture to onLoad.
+		</div>
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 	</body>
 </html>

+ 2 - 2
docs/api/loaders/DefaultLoadingManager.html → docs/api/loaders/managers/DefaultLoadingManager.html

@@ -2,7 +2,7 @@
 <html lang="en">
 	<head>
 		<meta charset="utf-8" />
-		<base href="../../" />
+		<base href="../../../" />
 		<script src="list.js"></script>
 		<script src="page.js"></script>
 		<link type="text/css" rel="stylesheet" href="page.css" />
@@ -70,6 +70,6 @@ THREE.DefaultLoadingManager.onError = function ( url ) {
 
 		<h2>Source</h2>
 
-		[link:https://github.com/mrdoob/three.js/blob/master/src/loaders/loadingManager.js loadingManager.js]
+		[link:https://github.com/mrdoob/three.js/blob/master/src/loaders/LoadingManager.js src/loaders/LoadingManager.js]
 	</body>
 </html>

+ 3 - 3
docs/api/loaders/LoadingManager.html → docs/api/loaders/managers/LoadingManager.html

@@ -1,8 +1,8 @@
 <!DOCTYPE html>
 <html lang="en">
 	<head>
-		<meta charset="utf-8" />
-		<base href="../../" />
+		<meta charset="utf-8" />
+		<base href="../../../" />
 		<script src="list.js"></script>
 		<script src="page.js"></script>
 		<link type="text/css" rel="stylesheet" href="page.css" />
@@ -150,6 +150,6 @@
 
 		<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/loaders/LoadingManager.js src/loaders/LoadingManager.js]
 	</body>
 </html>

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

@@ -38,7 +38,7 @@
 		<code>
 var material = new THREE.LineBasicMaterial( {
 	color: 0xffffff,
-	lineWidth: 1,
+	linewidth: 1,
 	linecap: 'round', //ignored by WebGLRenderer
 	linejoin:  'round' //ignored by WebGLRenderer
 } );

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

@@ -24,7 +24,7 @@
 		<code>
 var material = new THREE.LineDashedMaterial( {
 	color: 0xffffff,
-	lineWidth: 1,
+	linewidth: 1,
 	scale: 1,
 	dashSize: 3,
 	gapSize: 1,

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

@@ -256,7 +256,7 @@
 		<h3>[method:null toJSON]( [page:object meta] )</h3>
 		<div>
 		meta -- object containing metadata such as textures or images for the material.<br />
-		Convert the material to Three JSON format.
+		Convert the material to three.js JSON format.
 		</div>
 
 		<h3>[method:null update]()</h3>

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

@@ -48,7 +48,7 @@
 				</li>
 			</ul>
 
-			Technical details of the approach used in Three (and most other PBR systems) can be found is this
+			Technical details of the approach used in three.js (and most other PBR systems) can be found is this
 			[link:https://disney-animation.s3.amazonaws.com/library/s2012_pbs_disney_brdf_notes_v2.pdf paper from Disney] (pdf),
 			by Brent Burley.
 		</div>

+ 7 - 7
docs/api/materials/MultiMaterial.html

@@ -42,12 +42,12 @@
 //The following will create a cube with a different material applied to each side
 var materials = [
 
-    new THREE.MeshBasicMaterial( { color: 0xff0000 ) } ), // right
-    new THREE.MeshBasicMaterial( { color: 0x0000ff ) } ), // left
-    new THREE.MeshBasicMaterial( { color: 0x00ff00 ) } ), // top
-    new THREE.MeshBasicMaterial( { color: 0xffff00 ) } ), // bottom
-    new THREE.MeshBasicMaterial( { color: 0x00ffff ) } ), // back
-    new THREE.MeshBasicMaterial( { color: 0xff00ff ) } )  // front
+    new THREE.MeshBasicMaterial( { color: 0xff0000 } ), // right
+    new THREE.MeshBasicMaterial( { color: 0x0000ff } ), // left
+    new THREE.MeshBasicMaterial( { color: 0x00ff00 } ), // top
+    new THREE.MeshBasicMaterial( { color: 0xffff00 } ), // bottom
+    new THREE.MeshBasicMaterial( { color: 0x00ffff } ), // back
+    new THREE.MeshBasicMaterial( { color: 0xff00ff } )  // front
 
 ];
 
@@ -100,7 +100,7 @@ scene.add( cubeMesh );
 		<h3>[method:null toJSON]( [page:object meta] )</h3>
 		<div>
 		meta -- object containing metadata such as textures or images for the material.<br />
-		Convert the material to Three JSON format.
+		Convert the material to three.js JSON format.
 		</div>
 		<h2>Source</h2>
 

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

@@ -44,13 +44,13 @@ for ( var i = 0; i < 10000; i ++ ) {
 	star.y = THREE.Math.randFloatSpread( 2000 );
 	star.z = THREE.Math.randFloatSpread( 2000 );
 
-	geometry.vertices.push( star );
+	starsGeometry.vertices.push( star )
 
 }
 
 var starsMaterial = new THREE.PointsMaterial( { color: 0x888888 } )
 
-var starField = new THREE.Points( geometry, starsMaterial );
+var starField = new THREE.Points( starsGeometry, starsMaterial );
 
 scene.add( starField );
 		</code>

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

@@ -51,7 +51,7 @@ var color = new THREE.Color( 1, 0, 0 );
 		[page:Float g] - (optional) The green component of the color if it is defined.<br />
 		[page:Float b] - (optional) The blue component of the color if it is defined.<br /><br />
 
-		Note that standard method of specifying color in Three is with a [link:https://en.wikipedia.org/wiki/Web_colors#Hex_triplet hexadecimal triplet], and that method is used
+		Note that standard method of specifying color in three.js is with a [link:https://en.wikipedia.org/wiki/Web_colors#Hex_triplet hexadecimal triplet], and that method is used
 		throughout the rest of the documentation.<br /><br />
 
 		When all arguments are defined then r is the red component, g is the green component and b is the blue component of the color.<br />

+ 21 - 6
docs/api/math/Euler.html

@@ -10,11 +10,12 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">A class representing [link:http://en.wikipedia.org/wiki/Euler_angles Euler Angles].<br /><br />
+		<div class="desc">
+			A class representing [link:http://en.wikipedia.org/wiki/Euler_angles Euler Angles].<br /><br />
 
-		Euler angles describe a rotational transformation by rotating an object on its various
-		axes in specified amounts per axis, and a specified axis order.
-	</div>
+			Euler angles describe a rotational transformation by rotating an object on its various
+			axes in specified amounts per axis, and a specified axis order.
+		</div>
 
 		<h2>Example</h2>
 
@@ -51,9 +52,23 @@
 		<div>
 			The order in which to apply rotations. Default is 'XYZ', which means that the object will first be
 			rotated around its X axis, then its Y axis and finally its Z axis. Other possibilities are:
-			'YZX', 'ZXY', 'XZY', 'YXZ' and 'ZYX'. Note that these must be in upper case.<br /><br />
+			'YZX', 'ZXY', 'XZY', 'YXZ' and 'ZYX'. These must be in upper case.<br /><br />
 
-			If this is changed, [page:.onChangeCallback onChangeCallback] will be called.
+			Three.js uses <em>intrinsic</em> (Tait-Bryan) ordering, also known as <em>yaw</em>, <em>pitch</em>
+			and <em>roll</em>. This means that rotations are performed with respect to the <em>local</em>
+			coordinate system. That is, for order 'XYZ', the rotation is first around world-X, then around
+			local-Y (which may now be different from the world Y-axis), then local-Z (which may be different
+			from the world Z-axis).<br /><br />
+
+			Some implementations may use <em>extrinsic</em> (proper) ordering, in which case rotations are performed
+			with respect to the <em>world</em> coordinate system, so that for order 'XYZ', the rotations
+			are around world-X, world-Y, and world-Z.<br /><br />
+
+			Converting between the two types is relatively straightforward, you just need to reverse the order
+			and the rotation, so that an intrinsic (three.js) Euler rotation of angles a, b, c about XYZ
+			will be equivalent to to an extrinsic Euler rotation of angles c, b, a about ZYX.<br /><br />
+
+			If the order is changed, [page:.onChangeCallback onChangeCallback] will be called.
 		</div>
 
 		<h3>[property:Float x]</h3>

+ 2 - 12
docs/api/math/Matrix3.html

@@ -38,8 +38,8 @@ m.elements = [ 11, 21, 31,
 		</code>
 		and internally all calculations are performed using column-major ordering. However, as the actual ordering
 		makes no difference mathematically and most people are used to thinking about matrices in row-major order,
-		the Three.js documentation shows matrices in row-major order. Just bear in mind that if you are reading the source
-		code, you'll have to take the transpose of any matrices outlined here to make sense of the calculations.
+		the three.js documentation shows matrices in row-major order. Just bear in mind that if you are reading the source
+		code, you'll have to take the [link:https://en.wikipedia.org/wiki/Transpose transpose] of any matrices outlined here to make sense of the calculations.
 		</div>
 
 		<h2>Constructor</h2>
@@ -79,16 +79,6 @@ m.elements = [ 11, 21, 31,
 		Multiplies (applies) this matrix to every 3D vector in the [page:BufferAttribute attribute].
 		</div>
 
-		<h3>[method:Array applyToVector3Array]( [page:Array array], [page:Number offset], [page:Number length] )</h3>
-		<div>
-		[page:Array array] - An array of floats in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...],
-		that represent 3D vectors.<br />
-		[page:Number offset] - (optional) index in the array of the first vector's x component. Default is 0.<br />
-		[page:Number length] - (optional) index in the array of the last vector's z component.
-		Default is the last element in the array.<br /><br />
-
-		Multiplies (applies) this matrix to every 3D vector in the [page:Array array].
-		</div>
 
 		<h3>[method:Matrix3 clone]()</h3>
 		<div>Creates a new Matrix3 and with identical elements to this one.</div>

+ 11 - 34
docs/api/math/Matrix4.html

@@ -40,7 +40,7 @@
 			[page:Camera Cameras] have two additional matrix4s:
 			<ul>
 				<li>
-					[page:Object3D.matrixWorldInverse]: The inverse of the [page:Object3D.matrixWorld] descibed above.
+					[page:Object3D.matrixWorldInverse]: The inverse of the [page:Object3D.matrixWorld] described above.
 				</li>
 				<li>
 					[page:Object3D.projectionMatrix]:
@@ -48,13 +48,6 @@
 			</ul>
 		</div>
 
-
-		<h2>Example</h2>
-
-		<code>
-var m = new Matrix4();
-		</code>
-
 		<h2>A Note on Row-Major and Column-Major Ordering</h2>
 		<div>
 			The [page:set]() method takes arguments in [link:https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order row-major]
@@ -62,21 +55,25 @@ var m = new Matrix4();
 
 			This means that calling
 		<code>
+var m = new Matrix4();
+
 m.set( 11, 12, 13, 14,
        21, 22, 23, 24,
-       31, 32, 33, 34 );
+       31, 32, 33, 34,
+       41, 42, 43, 44 );
 
 		</code>
 		will result in the [page:.elements elements] array containing:
 		<code>
 m.elements = [ 11, 21, 31, 41,
                12, 22, 32, 42,
-               13, 23, 33, 43 ];
+               13, 23, 33, 43,
+               14, 24, 34, 44 ];
 		</code>
 		and internally all calculations are performed using column-major ordering. However, as the actual ordering
 		makes no difference mathematically and most people are used to thinking about matrices in row-major order,
-		the Three.js documentation shows matrices in row-major order. Just bear in mind that if you are reading the source
-		code, you'll have to take the transpose of any matrices outlined here to make sense of the calculations.
+		the three.js documentation shows matrices in row-major order. Just bear in mind that if you are reading the source
+		code, you'll have to take the [link: https://en.wikipedia.org/wiki/Transpose transpose] of any matrices outlined here to make sense of the calculations.
 		</div>
 
 
@@ -118,17 +115,6 @@ m.elements = [ 11, 21, 31, 41,
 		</div>
 
 
-		<h3>[method:Array applyToVector3Array]( [page:Array array], [page:Number offset], [page:Number length] )</h3>
-		<div>
-		[page:Array array] - An array of floats in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...],
-		that represent 3D vectors.<br />
-		[page:Number offset] - (optional) index in the array of the first vector's x component. Default is 0.<br />
-		[page:Number length] - (optional) index in the array of the last vector's z component.
-		Default is the last element in the array.<br /><br />
-
-		Multiplies (applies) the upper 3x3 matrix of this matrix to every 3D vector in the [page:Array array].
-		</div>
-
 		<h3>[method:Matrix4 clone]()</h3>
 		<div>Creates a new Matrix4 with identical [page:.elements elements] to this one.</div>
 
@@ -247,9 +233,9 @@ xAxis.z, yAxis.z, zAxis.z, 0,
 		</code>
 		</div>
 
-		<h3>[method:Matrix4 makeFrustum]( [page:Float left], [page:Float right], [page:Float bottom], [page:Float top], [page:Float near], [page:Float far] )</h3>
+		<h3>[method:Matrix4 makePerspective]( [page:Float left], [page:Float right], [page:Float top], [page:Float bottom], [page:Float near], [page:Float far] )</h3>
 		<div>
-			Creates a matrix representing a [link:https://en.wikipedia.org/wiki/Frustum frustum].
+			Creates a [link:https://en.wikipedia.org/wiki/3D_projection#Perspective_projection perspective projection] matrix.
 			This is used internally by [page:PerspectiveCamera.updateProjectionMatrix]()
 		</div>
 
@@ -259,15 +245,6 @@ xAxis.z, yAxis.z, zAxis.z, 0,
 		This is used internally by [page:OrthographicCamera.updateProjectionMatrix]().
 		</div>
 
-		<h3>[method:Matrix4 makePerspective]( [page:Float fov], [page:Float aspect], [page:Float near], [page:Float far] )</h3>
-		<div>
-		Creates a [link:https://en.wikipedia.org/wiki/3D_projection#Perspective_projection perspective projection] matrix.
-
-		Internally this calculates the values of [page:Float left], [page:Float right], [page:Float bottom] and [page:Float top],
-		and calls [page:.makeFrustum makeFrustum].
-
-		</div>
-
 		<h3>[method:Matrix4 makeRotationFromEuler]( [page:Euler euler] )</h3>
 		<div>
 		Sets the rotation component (the upper left 3x3 matrix) of this matrix to the rotation specified by the given [page:Euler Euler Angle].

+ 0 - 101
docs/api/math/Spline.html

@@ -1,101 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8" />
-		<base href="../../" />
-		<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 representing a [link:https://en.wikipedia.org/wiki/Spline_(mathematics) spline].<br /><br />
-		</div>
-
-		<h2>Examples</h2>
-		<div>
-			[example:webgl_lines_splines WebGL / lines / splines]<br />
-			[example:webgl_lines_dashed WebGL / lines / dashed]<br />
-			[example:software_sandbox Software / sandbox]<br />
-			[example:canvas_lines_dashed Canvas / lines / dashed]
-		</div>
-
-
-		<h2>Constructor</h2>
-
-		<h3>[name]( [page:Array points] )</h3>
-
-		<div>
-			Initialises the spline with [page:Array points], which are the [page:Vector3 Vector3s]
-			 through which the spline will pass.
-		 </div>
-
-
-		<h2>Properties</h2>
-
-		<h3>[property:Array points]</h3>
-
-
-		<h2>Methods</h2>
-
-		<h3>[method:Array getControlPointsArray]( )</h3>
-		<div>
-			Returns an array with triplets of [ x, y, z ] coordinates that correspond to the
-			current control points.
-		</div>
-
-		<h3>[method:Vector3 getPoint]( [page:Integer k] )</h3>
-		<div>
-			[page:Integer k] — point index<br /><br />
-
-			Return the interpolated point at [page:Integer k].
-		</div>
-
-		<h3>[method:Object getLength]( [page:Integer nSubDivisions] )</h3>
-		<div>
-			[page:Integer nSubDivisions] — number of subdivisions between control points. Default is *100*.<br /><br />
-
-
-			Returns an object with the two properties. The property <strong>[page:Number total]</strong> contains
-			the length of the spline when using [page:Integer 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:null initFromArray]( [page:Array a] )</h3>
-		<div>
-			[page:Array a] — array of the form
-			<code>
-				var a = [ [x1, y1, z1], [x2, y2, z2], ...  ];
-			</code>
-			from which to initialise the points array.<br /><br />
-
-			Initialises using the data in the array as a series of points. Each value in *a* must
-				be another array with three values, where a[n] is v, the value for the *nth* point,
-				and v[0], v[1] and v[2] are the x, y and z coordinates of that point n, respectively.
-		</div>
-
-		<h3>[method:Vector3 interpolate]( p0, p1, p2, p3, t, t2, t3 )</h3>
-		<div>
-
-		</div>
-
-		<h3>[method:null reparametrizeByArcLength]( [page:Float samplingCoef] )</h3>
-		<div>
-			[page:Float samplingCoef] — how many intermediate values to use between spline points<br /><br />
-
-			Modifies the spline so that it looks similar to the original but has its points distributed
-			in such way that moving along the spline it's done at a more or less constant speed.
-			The points should also appear more uniformly spread along the curve.
-			This is done by resampling the original spline, with the density of sampling controlled by [page:Float samplingCoef].
-			Here it's interesting to note that denser sampling is not necessarily better:
-			if sampling is too high, you may get weird kinks in curvature.
-		</div>
-
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-	</body>
-</html>

+ 3 - 4
docs/api/math/Vector2.html

@@ -21,7 +21,7 @@
 					A point in 2D space (i.e. a position on a plane).
 				</li>
 				<li>
-					A direction and length across a plane. In Three the length will always be the
+					A direction and length across a plane. In three.js the length will always be the
 					[link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean distance]
 					(straight-line distance) from (0, 0) to (x, y) and the direction is also
 					measured from (0, 0) towards (x, y).
@@ -32,7 +32,7 @@
 			</ul>
 
 			There are other things a 2D vector can be used to represent, such as momentum
-			vectors, complex numbers and so on,	however these are the most common uses in Three.
+			vectors, complex numbers and so on,	however these are the most common uses in three.js.
 		</div>
 
 		<h2>Example</h2>
@@ -184,11 +184,10 @@
 		Sets this vector's [page:.x x] value to be array[0] and [page:.y y] value to be array[1].
 		</div>
 
-		<h3>[method:Vector2 fromAttribute]( [page:BufferAttribute attribute], [page:Integer index], [page:Integer offset] )</h3>
+		<h3>[method:Vector2 fromBufferAttribute]( [page:BufferAttribute attribute], [page:Integer index] )</h3>
 		<div>
 		[page:BufferAttribute attribute] - the source attribute.<br />
 		[page:Integer index] - index in the attribute.<br /><br />
-		[page:Integer offset] - (optional) offset into the attribute. Default is 0.<br /><br />
 
 		Sets this vector's [page:.x x] and [page:.y y] values from the [page:BufferAttribute attribute].
 		</div>

+ 4 - 25
docs/api/math/Vector3.html

@@ -20,7 +20,7 @@
 				A point in 3D space.
 			</li>
 			<li>
-				A direction and length in 3D space. In Three the length will always be the
+				A direction and length in 3D space. In three.js the length will always be the
 				[link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean distance]
 				(straight-line distance) from (0, 0, 0) to (x, y, z) and the direction is also
 				measured from (0, 0, 0) towards (x, y, z).
@@ -31,7 +31,7 @@
 		</ul>
 
 		There are other things a 3D vector can be used to represent, such as momentum
-		vectors and so on, however these are the most common uses in Three.
+		vectors and so on, however these are the most common uses in three.js.
 		</div>
 
 
@@ -108,27 +108,7 @@ var d = a.distanceTo( b );
 
 		<h3>[method:Vector3 applyMatrix4]( [page:Matrix4 m] )</h3>
 		<div>
-		Multiply this vector by 4 x 3 subset of a [page:Matrix4 m]. If [page:Matrix4 m] is:
-		<code>
-a, b, c, d,
-e, f, g, h,
-i, j, k, l,
-m, n, o, p
-		</code>
-		Then the 4 x 3 matrix will be:
-		<code>
-a, b, c,
-e, f, g,
-i, j, k,
-m, n, o
-		</code>
-		</div>
-
-		<h3>[method:Vector3 applyProjection]( [page:Matrix4 m] )</h3>
-		<div>
-		[page:Matrix4 m] - [page:Matrix4] projection matrix.<br /><br />
-
-		Multiplies this vector and m, and divides by perspective.
+		Multiplies this vector (with an implicit 1 in the 4th dimension) and m, and divides by perspective.
 		</div>
 
 		<h3>[method:Vector3 applyQuaternion]( [page:Quaternion quaternion] )</h3>
@@ -240,11 +220,10 @@ m, n, o
 		and [page:.z z] value to be array[ offset + 2 ].
 		</div>
 
-		<h3>[method:Vector3 fromAttribute]( [page:BufferAttribute attribute], [page:Integer index], [page:Integer offset] )</h3>
+		<h3>[method:Vector3 fromBufferAttribute]( [page:BufferAttribute attribute], [page:Integer index] )</h3>
 		<div>
 		[page:BufferAttribute attribute] - the source attribute.<br />
 		[page:Integer index] - index in the attribute.<br /><br />
-		[page:Integer offset] - (optional) offset into the attribute. Default is 0.<br /><br />
 
 		Sets this vector's [page:.x x], [page:.y y] and [page:.z z] values from the [page:BufferAttribute attribute].
 		</div>

+ 3 - 4
docs/api/math/Vector4.html

@@ -20,7 +20,7 @@
 				A point in 4D space.
 			</li>
 			<li>
-				A direction and length in 4D space. In Three the length will always be the
+				A direction and length in 4D space. In three.js the length will always be the
 				[link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean distance]
 				(straight-line distance) from (0, 0, 0, 0, 0) to (x, y, z, w) and the direction is also
 				measured from (0, 0, 0, 0) towards (x, y, z, w).
@@ -30,7 +30,7 @@
 			</li>
 		</ul>
 
-		There are other things a 4D vector can be used to represent, however these are the most common uses in Three.
+		There are other things a 4D vector can be used to represent, however these are the most common uses in three.js.
 		</div>
 
 
@@ -157,11 +157,10 @@ var d = a.distanceTo( b );
 		[page:.z z] value to be array[ offset + 2 ] and [page:.w w ] value to be array[ offset + 3 ].
 		</div>
 
-		<h3>[method:Vector4 fromAttribute]( [page:BufferAttribute attribute], [page:Integer index], [page:Integer offset] )</h3>
+		<h3>[method:Vector4 fromBufferAttribute]( [page:BufferAttribute attribute], [page:Integer index] )</h3>
 		<div>
 		[page:BufferAttribute attribute] - the source attribute.<br />
 		[page:Integer index] - index in the attribute.<br /><br />
-		[page:Integer offset] - (optional) offset into the attribute. Default is 0.<br /><br />
 
 		Sets this vector's [page:.x x], [page:.y y], [page:.z z] and [page:.w w] values from the [page:BufferAttribute attribute].
 		</div>

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

@@ -17,8 +17,8 @@
 
 			This is nearly the same
 			as [page:LineSegments]; the only difference is that it is rendered using
-			[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/drawElements gl.LINES]
-			instead of [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/drawElements gl.LINE_STRIP]
+			[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/drawElements gl.LINE_STRIP]
+			instead of [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/drawElements gl.LINES]
 
 		</div>
 

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

@@ -16,8 +16,8 @@
 			A series of lines drawn between pairs of vertices.<br /><br />
 
 			This is nearly the same	as [page:Line]; the only difference is that it is rendered using
-			[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/drawElements gl.LINE_STRIP]
-			instead of [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/drawElements gl.LINES]
+			[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/drawElements gl.LINES]
+			instead of [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/drawElements gl.LINE_STRIP].
 		</div>
 
 

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

@@ -14,7 +14,7 @@
 
 		<div class="desc">
 			Class representing triangular [link:https://en.wikipedia.org/wiki/Polygon_mesh polygon mesh] based objects.
-		  Also serves as a base for other classes such as [page:MorphAnimMesh] and [page:SkinnedMesh].
+		  Also serves as a base for other classes such as [page:MorphBlendMesh] and [page:SkinnedMesh].
 		</div>
 
 

+ 2 - 2
docs/api/renderers/WebGLRenderTarget.html

@@ -40,8 +40,8 @@
 		[page:Constant type] - default is [page:Textures UnsignedByteType]. <br />
 		[page:Number anisotropy] - default is *1*. See [page:Texture.anistropy]<br />
 		[page:Constant encoding] - default is [page:Textures LinearEncoding]. <br />
-		[page:BooleandepthBuffer] - default is *true*. Set this to false if you don't need it. <br />
-		[page:BooleanstencilBuffer] - default is *true*. Set this to false if you don't need it.<br /><br />
+		[page:Boolean depthBuffer] - default is *true*. Set this to false if you don't need it. <br />
+		[page:Boolean stencilBuffer] - default is *true*. Set this to false if you don't need it.<br /><br />
 
 		Creates a new [name]]
 		</div>

+ 2 - 2
docs/api/renderers/WebGLRenderTargetCube.html

@@ -42,8 +42,8 @@
 		[page:Constant type] - default is [page:Textures UnsignedByteType]. <br />
 		[page:Number anisotropy] - default is *1*. See [page:Texture.anistropy]<br />
 		[page:Constant encoding] - default is [page:Textures LinearEncoding]. <br />
-		[page:BooleandepthBuffer] - default is *true*. Set this to false if you don't need it. <br />
-		[page:BooleanstencilBuffer] - default is *true*. Set this to false if you don't need it.<br /><br />
+		[page:Boolean depthBuffer] - default is *true*. Set this to false if you don't need it. <br />
+		[page:Boolean stencilBuffer] - default is *true*. Set this to false if you don't need it.<br /><br />
 
 		Creates a new [name]]
 		</div>

+ 3 - 3
docs/api/textures/Texture.html

@@ -48,7 +48,7 @@
 		<h3>[property:Image image]</h3>
 		<div>
 		An image object, typically created using the [page:TextureLoader.load] method.
-		This can be any image (e.g., PNG, JPG, GIF, DDS) or video (e.g., MP4, OGG/OGV) type supported by Three.<br /><br />
+		This can be any image (e.g., PNG, JPG, GIF, DDS) or video (e.g., MP4, OGG/OGV) type supported by three.js.<br /><br />
 
 		To use video as a texture you need to have a playing HTML5
 		video element as a source for your texture image and continuously update this texture
@@ -84,7 +84,7 @@
 		NOTE: tiling of images in textures only functions if image dimensions are powers of two
 		 (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...) in terms of pixels.
 		 Individual dimensions need not be equal, but each must be a power of two.
-		 This is a limitation of WebGL, not Three.js.
+		 This is a limitation of WebGL, not three.js.
 		</div>
 
 		<h3>[property:number magFilter]</h3>
@@ -202,7 +202,7 @@
 		<h3>[method:Texture toJSON]( meta )</h3>
 		<div>
 		meta -- optional object containing metadata.<br />
-		Convert the material to Three JSON format.
+		Convert the material to three.js JSON format.
 		</div>
 
 		<h3>[method:null dispose]()</h3>

+ 1 - 1
docs/examples/Lut.html

@@ -133,7 +133,7 @@
 		value -- the data value to be displayed as a color.
 		</div>
 		<div>
-		Returns a Three.Color.
+		Returns a [page:Color].
 		</div>
 
 		<h2>Source</h2>

+ 1 - 1
docs/examples/renderers/CanvasRenderer.html

@@ -16,7 +16,7 @@
 			API.<br /><br />
 
 			<b>
-			NOTE: The Canvas renderer has been deprecated and is no longer part of the Three.js core.
+			NOTE: The Canvas renderer has been deprecated and is no longer part of the three.js core.
 			</b>
 			If you still need to use it you can find it here: [link:https://github.com/mrdoob/three.js/blob/master/examples/js/[path].js examples/js/[path].js].<br /><br />
 

+ 17 - 15
docs/list.js

@@ -1,18 +1,21 @@
 var list = {
 
 	"Manual": {
-		"Introduction": [
+		"Getting Started": [
 			[ "Creating a scene", "manual/introduction/Creating-a-scene" ],
 			[ "Detecting WebGL and browser compatibility", "manual/introduction/Detecting-WebGL-and-browser-compatibility" ],
-			[ "Matrix transformations", "manual/introduction/Matrix-transformations" ],
-			[ "How to update things", "manual/introduction/How-to-update-things" ],
-			[ "Useful links", "manual/introduction/Useful-links" ],
+			[ "How to run things locally", "manual/introduction/How-to-run-thing-locally" ],
 			[ "Drawing Lines", "manual/introduction/Drawing-lines" ],
 			[ "Creating Text", "manual/introduction/Creating-text" ],
-			[ "Code Style Guide", "manual/introduction/Code-style-guide" ],
 			[ "Migration Guide", "manual/introduction/Migration-guide" ],
-			[ "How to run things locally", "manual/introduction/How-to-run-thing-locally" ],
-			[ "FAQ", "manual/introduction/FAQ" ]
+			[ "Code Style Guide", "manual/introduction/Code-style-guide" ],
+			[ "FAQ", "manual/introduction/FAQ" ],
+			[ "Useful links", "manual/introduction/Useful-links" ]
+		],
+
+		"Next Steps": [
+				[ "How to update things", "manual/introduction/How-to-update-things" ],
+			[ "Matrix transformations", "manual/introduction/Matrix-transformations" ]
 		],
 
 		"Build Tools": [
@@ -84,7 +87,7 @@ var list = {
 			[ "Layers", "api/core/Layers" ],
 			[ "Object3D", "api/core/Object3D" ],
 			[ "Raycaster", "api/core/Raycaster" ],
-			[ "Uniform", "api/core/Uniform"]
+			[ "Uniform", "api/core/Uniform" ]
 		],
 
 		"Core / BufferAttributes": [
@@ -120,8 +123,7 @@ var list = {
 			[ "LineCurve3", "api/extras/curves/LineCurve3" ],
 			[ "QuadraticBezierCurve", "api/extras/curves/QuadraticBezierCurve" ],
 			[ "QuadraticBezierCurve3", "api/extras/curves/QuadraticBezierCurve3" ],
-			[ "SplineCurve", "api/extras/curves/SplineCurve" ],
-			[ "SplineCurve3", "api/extras/curves/SplineCurve3" ]
+			[ "SplineCurve", "api/extras/curves/SplineCurve" ]
 		],
 
 		"Extras / Helpers": [
@@ -195,19 +197,20 @@ var list = {
 			[ "HemisphereLight", "api/lights/HemisphereLight" ],
 			[ "Light", "api/lights/Light" ],
 			[ "PointLight", "api/lights/PointLight" ],
+			[ "RectAreaLight", "api/lights/RectAreaLight" ],
 			[ "SpotLight", "api/lights/SpotLight" ]
 		],
 
 		"Lights / Shadows": [
 			[ "DirectionalLightShadow", "api/lights/shadows/DirectionalLightShadow" ],
 			[ "LightShadow", "api/lights/shadows/LightShadow" ],
+			[ "RectAreaLightShadow", "api/lights/shadows/RectAreaLightShadow" ],
 			[ "SpotLightShadow", "api/lights/shadows/SpotLightShadow" ]
 		],
 
 		"Loaders": [
 			[ "AnimationLoader", "api/loaders/AnimationLoader" ],
 			[ "AudioLoader", "api/loaders/AudioLoader" ],
-			[ "BinaryTextureLoader", "api/loaders/BinaryTextureLoader" ],
 			[ "BufferGeometryLoader", "api/loaders/BufferGeometryLoader" ],
 			[ "Cache", "api/loaders/Cache" ],
 			[ "CompressedTextureLoader", "api/loaders/CompressedTextureLoader" ],
@@ -224,8 +227,8 @@ var list = {
 		],
 
 		"Loaders / Managers": [
-			[ "DefaultLoadingManager", "api/loaders/DefaultLoadingManager" ],
-			[ "LoadingManager", "api/loaders/LoadingManager" ]
+			[ "DefaultLoadingManager", "api/loaders/managers/DefaultLoadingManager" ],
+			[ "LoadingManager", "api/loaders/managers/LoadingManager" ]
 		],
 
 		"Materials": [
@@ -265,7 +268,6 @@ var list = {
 			[ "Ray", "api/math/Ray" ],
 			[ "Sphere", "api/math/Sphere" ],
 			[ "Spherical", "api/math/Spherical" ],
-			[ "Spline", "api/math/Spline" ],
 			[ "Triangle", "api/math/Triangle" ],
 			[ "Vector2", "api/math/Vector2" ],
 			[ "Vector3", "api/math/Vector3" ],
@@ -358,7 +360,7 @@ var list = {
 
 	"Developer Reference": {
 		"Polyfills": [
-			[ "Polyfills", "api/polyfills" ]
+			[ "Polyfills", "api/Polyfills" ]
 		],
 
 		"WebGLRenderer": [

+ 72 - 37
docs/manual/introduction/Creating-text.html

@@ -9,44 +9,79 @@
 	</head>
 	<body>
 		<h1>[name]</h1>
+		<div>
+			<p>
+				There are often times when you might need to use text in your three.js application - here are
+				a couple of ways that you can do so.
+			</p>
+		</div>
+
+		<h2>1. DOM + CSS</h2>
+		<div>
+			<p>
+				Using HTML is generally the easiest and fastest manner to add text. This is the method
+				used for descriptive overlays in most three.js examples.
+			</p>
+			<p>You can add content to a</p>
+			<code>&lt;div id="info"&gt;Description&lt;/div&gt;</code>
+
+			<p>
+				and use CSS markup to position absolutely at a position above all others with a
+				z-index especially if you are running three.js full screen.
+			</p>
+
+			<code>
+#info {
+	position: absolute;
+	top: 10px;
+	width: 100%;
+	text-align: center;
+	z-index: 100;
+	display:block;
+}
+			</code>
+
+		</div>
+
+
+
+		<h2>2. Draw text to canvas and use as a [page:Texture]</h2>
+		<div>
+			<p>Use this method if you wish to draw text easily on a plane in your three.js scene.</p>
+		</div>
+
+
+		<h2>3. Create a model in your favourite 3D application and export to three.js</h2>
+		<div>
+			<p>Use this method if you prefer working with your 3d applications and importing the models to three.js</p>
+		</div>
+
+
+
+		<h2>4. Procedural Text Geometry</h2>
+		<div>
+			<p>
+				Use this method if you prefer to work purely in three.js or create procedural and dynamic 3d
+				text geometries. However, font data files in THREE.js JSON format needs to be loaded
+				before this will work.
+				See the [page:TextGeometry] page for examples of JSON fonts.
+			</p>
+			<p>A Text Geometry can then be created with </p>
+			<code>new THREE.TextGeometry( text, parameters );</code>
+
+			<h3>Examples</h3>
+			[example:webgl_geometry_text WebGL / geometry / text]<br />
+			[example:canvas_geometry_text canvas / geometry / text]<br />
+			[example:webgl_shadowmap WebGL / shadowmap]
+
+			<p>
+				If Typeface is down, or you want to use a font that is not there, there's a tutorial
+				with a python script for blender that allows you to export text to Three.js's JSON format:
+				[link:http://www.jaanga.com/2012/03/blender-to-threejs-create-3d-text-with.html]
+				</p>
+
+		</div>
 
-<p>There are often times when you might need to use text in your Three.js application. Here's are some options you may consider when you wish to add Text.</p>
-
-<h2>1. DOM + CSS</h2>
-
-<p>Using HTML could simply be the easiest and fastest manner to add text. This is commonly used for descriptive overlays in three.js examples.</p>
-
-<p>You can add content to a
-<code>&lt;div id="info"&gt;Description&lt;/div&gt;</code></p>
-
-<p>and use css markup to position absolutely at a position above all others with a z-index especially if you are running three.js full screen.</p>
-
-<p><code>#info {
-position: absolute;
-top: 10px;
-width: 100%;
-text-align: center;
-z-index: 100;
-display:block;
-}</code></p>
-
-<h2>2. Draw text to canvas and use as Texture</h2>
-
-<p>Use this method if you wish to draw text easily on a plane in your three.js scene. This technique can be seen utilized in the <a href="http://plumegraph.org/">Civilian Casualties in Afghanistan</a> visualization.</p>
-
-<h2>3. Create a 3d model in your 3d application and export to three.js</h2>
-
-<p>Use this method if you prefer working with your 3d applications and importing the models to three.js</p>
-
-<h2>4. Procedural Text Geometry</h2>
-
-<p>Use this method if you prefer to work purely in three.js or create procedural and dynamic 3d text geometries. However, font data files <a href="http://typeface.neocracy.org/fonts.html">http://typeface.neocracy.org/fonts.html</a> in the typeface.js format needs to be loaded.</p>
-
-<p>A Text Geometry can then be created with <code>new THREE.TextGeometry( text, parameters );</code></p>
-
-<p>For examples, see <a href="https://github.com/mrdoob/three.js/blob/master/examples/webgl_geometry_text.html">https://github.com/mrdoob/three.js/blob/master/examples/webgl_geometry_text.html</a>, <a href="https://github.com/mrdoob/three.js/blob/master/examples/canvas_geometry_text.html">https://github.com/mrdoob/three.js/blob/master/examples/canvas_geometry_text.html</a> and <a href="https://github.com/mrdoob/three.js/blob/master/examples/webgl_shadowmap.html">https://github.com/mrdoob/three.js/blob/master/examples/webgl_shadowmap.html</a></p>
-
-<p>If Typeface is down, or you want to use a font that is not there, there's a tutorial with a python script for blender that allows you to export text to Three.js's JSON format: <a href="http://www.jaanga.com/2012/03/blender-to-threejs-create-3d-text-with.html">http://www.jaanga.com/2012/03/blender-to-threejs-create-3d-text-with.html</a></p>
 
 
 	</body>

+ 15 - 13
docs/manual/introduction/Detecting-WebGL-and-browser-compatibility.html

@@ -10,22 +10,24 @@
 	<body>
 		<h1>[name]</h1><br />
 		<p>
-			Even those this is becming less and less of a problem, some devices or browsers may not support WebGL.
-			Here is how to check if it is supported and display a warning to the user if it is not.
+			Even though this is becoming less and less of a problem, some devices or browsers may still not support WebGL.
+			The following method allows you to check if it is supported and display a message to the user if it is not.
 		</p>
 
-		<h2>A solution</h2>
-
-		<p>In order to detect webgl compatibility and gracefully inform the user you can add <a href="https://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js">https://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js</a> to your javascript and use this example to avoid even attempting to render anything:</p>
+		<p>
+			Add	[link:https://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js]
+			to your javascript and run the following before attempting to render anything.
+		</p>
 
-		<pre><code>if (Detector.webgl) {
-		    init();
-		    animate();
-		} else {
-		    var warning = Detector.getWebGLErrorMessage();
-		    document.getElementById('container').appendChild(warning);
-		}
-		</code></pre>
+<code>
+if (Detector.webgl) {
+    init();
+    animate();
+} else {
+    var warning = Detector.getWebGLErrorMessage();
+    document.getElementById('container').appendChild(warning);
+}
+</code>
 
 
 	</body>

+ 42 - 35
docs/manual/introduction/Drawing-lines.html

@@ -9,49 +9,56 @@
 	</head>
 	<body>
 		<h1>[name]</h1>
+		<div>
+			<p>
+				Let's say you want to draw a line or a circle, not a wireframe [page:Mesh].
+				First we need to setup the [page:WebGLRenderer renderer], [page:Scene scene] and camera (see the Creating a scene page).
+			</p>
 
-		<p>Let's say you want to draw a line or a circle, not a wireframe geometry.
-First we need to setup Renderer, Scene and camera (<a href="Getting%20Started">see Getting Started</a>).</p>
+			<p>Here is the code that we will use:</p>
+			<code>
+var renderer = new THREE.WebGLRenderer();
+renderer.setSize(window.innerWidth, window.innerHeight);
+document.body.appendChild(renderer.domElement);
 
-<p>Here is the code that we will use:</p>
+var camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 500);
+camera.position.set(0, 0, 100);
+camera.lookAt(new THREE.Vector3(0, 0, 0));
 
-<div class="highlight highlight-source-js"><pre>        <span class="pl-k">var</span> renderer <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-en">THREE.WebGLRenderer</span>();
-		<span class="pl-smi">renderer</span>.<span class="pl-en">setSize</span>(<span class="pl-c1">window</span>.<span class="pl-c1">innerWidth</span>, <span class="pl-c1">window</span>.<span class="pl-c1">innerHeight</span>);
-		<span class="pl-c1">document</span>.<span class="pl-c1">body</span>.<span class="pl-c1">appendChild</span>(<span class="pl-smi">renderer</span>.<span class="pl-smi">domElement</span>);
-		<span class="pl-k">var</span> camera <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-en">THREE.PerspectiveCamera</span>(<span class="pl-c1">45</span>, <span class="pl-c1">window</span>.<span class="pl-c1">innerWidth</span> <span class="pl-k">/</span> <span class="pl-c1">window</span>.<span class="pl-c1">innerHeight</span>, <span class="pl-c1">1</span>, <span class="pl-c1">500</span>);
-		<span class="pl-smi">camera</span>.<span class="pl-smi">position</span>.<span class="pl-c1">set</span>(<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">100</span>);
-		<span class="pl-smi">camera</span>.<span class="pl-en">lookAt</span>(<span class="pl-k">new</span> <span class="pl-en">THREE.Vector3</span>(<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>));
-		<span class="pl-k">var</span> scene <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-en">THREE.Scene</span>();</pre></div>
+var scene = new THREE.Scene();
+			</code>
+			<p>Next thing we will do is define a material. For lines we have to use [page:LineBasicMaterial] oe [page:LineDashedMaterial].</p>
+			<code>
+//create a blue LineBasicMaterial
+var material = new THREE.LineBasicMaterial({ color: 0x0000ff });
+			</code>
 
-<p>Next thing we will do is define a material. For lines we have to use <code>LineBasicMaterial</code>.</p>
+			<p>
+				After material we will need a [page:Geometry] or [page:BufferGeometry] with some vertices
+				(it's reccomended to use a BufferGeometry as it's more performant, however for simplicity we'll use a Geometry here):
+			</p>
 
-<div class="highlight highlight-source-js"><pre>        <span class="pl-k">var</span> material <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-en">THREE.LineBasicMaterial</span>({
-				color<span class="pl-k">:</span> <span class="pl-c1">0x0000ff</span>
-		});
-</pre></div>
+			<code>
+var geometry = new THREE.Geometry();
+geometry.vertices.push(new THREE.Vector3(-10, 0, 0));
+geometry.vertices.push(new THREE.Vector3(0, 10, 0));
+geometry.vertices.push(new THREE.Vector3(10, 0, 0));
+			</code>
 
-<p>After material we will need a <code>Geometry</code> with some vertices:</p>
+			<p>Note that lines are drawn between each consecutive pair of vertices, but not between the first and last (the line is not closed.)</p>
 
-<div class="highlight highlight-source-js"><pre>        <span class="pl-k">var</span> geometry <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-en">THREE.Geometry</span>();
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">vertices</span>.<span class="pl-c1">push</span>(<span class="pl-k">new</span> <span class="pl-en">THREE.Vector3</span>(<span class="pl-k">-</span><span class="pl-c1">10</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>));
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">vertices</span>.<span class="pl-c1">push</span>(<span class="pl-k">new</span> <span class="pl-en">THREE.Vector3</span>(<span class="pl-c1">0</span>, <span class="pl-c1">10</span>, <span class="pl-c1">0</span>));
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">vertices</span>.<span class="pl-c1">push</span>(<span class="pl-k">new</span> <span class="pl-en">THREE.Vector3</span>(<span class="pl-c1">10</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>));</pre></div>
+			<p>Now that we have points for two lines and a material, we can put them together to form a line.</p>
+			<code>
+var line = new THREE.Line(geometry, material);
+			</code>
+			<p>All that's left is to add it to the scene and call [page:WebGLRenderer.render render].</p>
 
-<p>Note that lines are drawn between each consecutive pair of vertices, but not between the first and last (the line is not closed.)</p>
+			<code>
+scene.add(line);
+renderer.render(scene, camera);
+			</code>
 
-<p>Now that we have points for two lines and a material, we can put them together to form a line.</p>
-
-<div class="highlight highlight-source-js"><pre>
-		<span class="pl-k">var</span> line <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-en">THREE.Line</span>(geometry, material);
-</pre></div>
-
-<p>All that's left is to add it to the scene and call <code>render</code>.</p>
-
-<div class="highlight highlight-source-js"><pre>
-		<span class="pl-smi">scene</span>.<span class="pl-c1">add</span>(line);
-		<span class="pl-smi">renderer</span>.<span class="pl-en">render</span>(scene, camera);
-</pre></div>
-
-<p>You should now be seeing a arrow pointing upwards, made from two blue lines.</p>
+			<p>You should now be seeing a arrow pointing upwards, made from two blue lines.</p>
+		</div>
 	</body>
 </html>

+ 1 - 1
docs/manual/introduction/FAQ.html

@@ -12,7 +12,7 @@
 
 		<h2>Which Import Format/Exporter is best supported?</h2>
 		<div>
-TODO 
+TODO
 		</div>
 
 		<h2>Why are there meta viewport tags in examples?</h2>

+ 178 - 101
docs/manual/introduction/How-to-run-thing-locally.html

@@ -8,107 +8,184 @@
 		<link type="text/css" rel="stylesheet" href="page.css" />
 	</head>
 	<body>
-		<h1>[name]</h1><br />
-		<p>If you use just procedural geometries and don't load any textures, webpages should work straight from the file system, just double-click on HTML file in a file manager and it should appear working in the browser (accessed as <code>file:///example</code>).</p>
+		<h1>[name]</h1>
+		<div>
+			If you use just procedural geometries and don't load any textures, webpages should work
+			straight from the file system, just double-click on HTML file in a file manager and it
+			should appear working in the browser (you'll see <em>file:///yourFile.html</em> in the address bar).
+		</div>
 
 		<h2>Content loaded from external files</h2>
-
-		<p>If you load models or textures from external files, due to browsers' "<a href="http://en.wikipedia.org/wiki/Same_origin_policy">same origin policy</a>" security restrictions, loading from a file system will fail with a security exception.</p>
-
-		<p>There are two ways how to solve this:</p>
-
-		<ol>
-		<li><p>Change security for local files in a browser (access page as <code>file:///example</code>)</p></li>
-		<li><p>Run files from a local server (access page as <code>http://localhost/example</code>)</p></li>
-		</ol>
-
-		<p>If you use option 1, be aware that you may open yourself to some vulnerabilities if using the same browser for a regular web surfing. You may want to create a separate browser profile / shortcut used just for local development to be safe.</p>
-
-		<hr>
-
-		<h3>Change local files security policy</h3>
-
-		<h4>Safari</h4>
-
-		<p>Enable the develop menu using the preferences panel, under Advanced -&gt; "Show develop menu in menu bar"</p>
-
-		<p>Then from the safari "Develop" menu, select "Disable local file restrictions", it is also worth noting safari has some odd behaviour with caches, so it is advisable to use the "Disable caches" option in the same menu; if you are editing &amp; debugging using safari.</p>
-
-		<h4>Chrome</h4>
-
-		<p>Close all running Chrome instances first. The important word here is 'all'.</p>
-
-		<p>On Windows, you may check for Chrome instances using the Windows Task Manager. Alternatively, if you see a Chrome icon in the system tray, then you may open its context menu and click 'Exit'. This should close all Chrome instances.</p>
-
-		<p>Then start the Chrome executable with a command line flag:</p>
-
-		<pre><code>chrome --allow-file-access-from-files
-		</code></pre>
-
-		<p>On Windows, probably the easiest is probably to create a special shortcut icon which has added the flag given above (right-click on shortcut -&gt; properties -&gt; target).</p>
-
-		<p>On Mac OSX, you can do this with</p>
-
-		<pre><code>open /Applications/Google\ Chrome.app --args --allow-file-access-from-files
-		</code></pre>
-
-		<h4>Firefox</h4>
-
-		<ol>
-		<li>Go to <code>about:config</code>
-		</li>
-		<li>Find <code>security.fileuri.strict_origin_policy</code> parameter</li>
-		<li>Set it to <code>false</code>
-		</li>
-		</ol>
-
-		<hr>
-
-		<h3>Run local server</h3>
-
-		<p>The simplest probably is to use Python's built-in http server. </p>
-
-		<p>If you have <a href="http://python.org/">Python</a> installed, it should be enough to run this from a command line:</p>
-
-		<div class="highlight highlight-source-shell"><pre><span class="pl-c"><span class="pl-c">#</span> Python 2.x</span>
-		python -m SimpleHTTPServer</pre></div>
-
-		<div class="highlight highlight-source-shell"><pre><span class="pl-c"><span class="pl-c">#</span> Python 3.x</span>
-		python -m http.server</pre></div>
-
-		<p>This will serve files from the current directory at localhost under port 8000:</p>
-
-		<p>http://localhost:8000/</p>
-
-		<p>If you have Ruby installed, you can get the same result running this instead:</p>
-
-		<div class="highlight highlight-source-shell"><pre>ruby -r webrick -e <span class="pl-s"><span class="pl-pds">"</span>s = WEBrick::HTTPServer.new(:Port =&gt; 8000, :DocumentRoot =&gt; Dir.pwd); trap('INT') { s.shutdown }; s.start<span class="pl-pds">"</span></span></pre></div>
-
-		<p>PHP also has a built-in web server, starting with php 5.4.0:</p>
-
-		<div class="highlight highlight-source-shell"><pre>php -S localhost:8000</pre></div>
-
-		<p>Node.js has a simple HTTP server package. To install:</p>
-
-		<div class="highlight highlight-source-shell"><pre>npm install http-server -g</pre></div>
-
-		<p>To run:</p>
-
-		<div class="highlight highlight-source-shell"><pre>http-server <span class="pl-c1">.</span></pre></div>
-
-		<p>Other simple alternatives are <a href="http://stackoverflow.com/q/12905426/24874">discussed here</a> on Stack Overflow.</p>
-
-		<p>Of course, you can use any other regular full-fledged web server like <a href="http://www.apachefriends.org/en/xampp.html">Apache</a> or <a href="http://nginx.org/">nginx</a>.</p>
-
-		<p>Example with lighttpd, which is a very lightweight general purpose webserver (on MAC OSX):</p>
-
-		<ol>
-		<li>Install it via homebrew <code>brew install lighttpd</code>
-		</li>
-		<li>Create a configuration file called lighttpd.conf in the directory where you want to run your webserver. There is a sample in <a href="http://redmine.lighttpd.net/projects/lighttpd/wiki/TutorialConfiguration">this</a> page.</li>
-		<li>In the conf file, change the server.document-root with the directory you want to serve</li>
-		<li>Start it with <code>lighttpd -f lighttpd.conf</code>
-		</li>
-		<li>Navigate to http://localhost:3000/ and it will serve static files from the directory you chose.</li>
-		</ol>	</body>
+		<div>
+			<p>
+				If you load models or textures from external files, due to browsers' [link:http://en.wikipedia.org/wiki/Same_origin_policy same origin policy]
+			 	security restrictions, loading from a file system will fail with a security exception.
+		 	</p>
+
+			<p>There are two ways to solve this:</p>
+
+			<ol>
+				<li>
+					Change security for local files in a browser (this allows you to access your page as <code>file:///yourFile.html</code>
+				</li>
+				<li>
+					Run files from a local web server (this allows you to access your page as <code>http://localhost/yourFile.html</code>
+				</li>
+			</ol>
+
+			<p>
+				If you use option 1, be aware that you may open yourself to some vulnerabilities if using
+				the same browser for a regular web surfing. You may want to create a separate browser
+				profile / shortcut used just for local development to be safe. Let's go over each option in turn.
+			</p>
+		</div>
+
+		<h2>Change local files security policy</h2>
+		<div>
+			<h4>Safari</h4>
+			<div>
+				<p>
+					Enable the develop menu using the preferences panel, under Advanced -&gt; "Show develop menu
+					in menu bar".
+				</p>
+
+				<p>
+					Then from the safari "Develop" menu, select "Disable local file restrictions", it is also
+					worth noting safari has some odd behaviour with caches, so it is advisable to use the
+					"Disable caches" option in the same menu; if you are editing &amp; debugging using safari.
+				</p>
+			</div>
+
+
+			<h4>Chrome</h4>
+			<div>
+				<p>Close all running Chrome instances first. The important word here is 'all'.</p>
+
+				<p>
+					On Windows, you may check for Chrome instances using the Windows Task Manager.
+					Alternatively, if you see a Chrome icon in the system tray, then you may open its context
+					menu and click 'Exit'. This should close all Chrome instances.
+				</p>
+
+				<p>Then start the Chrome executable with a command line flag:</p>
+
+				<code>chrome --allow-file-access-from-files</code>
+
+				<p>
+					On Windows, probably the easiest is probably to create a special shortcut icon which has
+					added the flag given above (right-click on shortcut -&gt; properties -&gt; target).
+				</p>
+
+				<p>On Mac OSX, you can do this with</p>
+
+				<code>open /Applications/Google\ Chrome.app --args --allow-file-access-from-files</code>
+			</div>
+
+			<h4>Firefox</h4>
+			<div>
+				<ol>
+				<li>
+					In the address bar, type <code>about:config</code>
+				</li>
+				<li>
+					Find the <code>security.fileuri.strict_origin_policy</code> parameter
+				</li>
+				<li>
+					Set it to <em>false</em>
+				</li>
+				</ol>
+			</div>
+
+		</div>
+
+
+		<h2>Run a local server</h2>
+		<div>
+			<p>
+				Many programming languages have simple HTTP servers built in. They are not as full featured as
+				production servers such as [link:https://www.apache.org/ Apache] or [link:https://nginx.org NGINX], however they should be sufficient for testing your
+				three.js application.
+			</p>
+
+			<h4>Running a Python server</h4>
+			<div>
+				<p>
+					If you have [link:http://python.org/ Python] installed, it should be enough to run this
+					from a command line (from your working directory):
+				</p>
+				<code>
+//Python 2.x
+python -m SimpleHTTPServer
+
+//Python 3.x
+python -m http.server
+				</code>
+
+				<p>This will serve files from the current directory at localhost under port 8000, i.e in the address bar type:</p>
+
+				<code>http://localhost:8000/</code>
+			</div>
+
+			<h4>Running a Ruby server</h4>
+			<div>
+				<p>If you have Ruby installed, you can get the same result running this instead:</p>
+				<code>
+ruby -r webrick -e "s = WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start"
+				</code>
+			</div>
+
+			<h4>Running a PHP server</h4>
+			<div>
+				<p>PHP also has a built-in web server, starting with php 5.4.0:</p>
+				<code>php -S localhost:8000</code>
+			</div>
+
+			<h4>Running a Node.js server</h4>
+			<div>
+				<p>Node.js has a simple HTTP server package. To install:</p>
+				<code>npm install http-server -g</code>
+
+				<p>To run (from your local directory):</p>
+				<code>http-server . -p 8000</code>
+			</div>
+
+			<h4>Running lighttpd on Mac</h4>
+			<div>
+				<p>
+					Lighttpd is a very lightweight general purpose webserver. We'll cover installing it on OSX with
+					HomeBrew here. Unlike the other servers discussed here, lighttpd is a full fledged production
+					ready server.
+				</p>
+
+				<ol>
+					<li>
+						Install it via homebrew
+						<code>brew install lighttpd</code>
+					</li>
+					<li>
+						Create a configuration file called lighttpd.conf in the directory where you want to run
+						your webserver. There is a sample [link:http://redmine.lighttpd.net/projects/lighttpd/wiki/TutorialConfiguration here].
+						 page.
+					 </li>
+					<li>
+						In the conf file, change the server.document-root to the directory you want to serve files from.
+					</li>
+					<li>
+						Start it with
+						<code>lighttpd -f lighttpd.conf</code>
+					</li>
+					<li>
+						Navigate to http://localhost:3000/ and it will serve static files from the directory you
+						chose.
+					</li>
+				</ol>
+			</div>
+
+			<p>
+				Other simple alternatives are [link:http://stackoverflow.com/q/12905426/24874 discussed here]
+				on Stack Overflow.
+			</p>
+		</div>
+
+	</body>
 </html>

+ 219 - 102
docs/manual/introduction/How-to-update-things.html

@@ -9,127 +9,244 @@
 	</head>
 	<body>
 		<h1>[name]</h1>
-		<p>All objects by default automatically update their matrices.</p>
-
-		<p>However, if you know object will be static, you can disable this and update transform matrix manually just when needed.</p>
-
-		<div class="highlight highlight-source-js"><pre><span class="pl-smi">object</span>.<span class="pl-smi">matrixAutoUpdate</span> <span class="pl-k">=</span> <span class="pl-c1">false</span>;
-		<span class="pl-smi">object</span>.<span class="pl-en">updateMatrix</span>();</pre></div>
+		<div>
+			<p>All objects by default automatically update their matrices if the have been added to the scene with</p>
+			<code>
+var object = new THREE.Object3D;
+scene.add( object );
+			</code>
+			or if they are the child of another object that has been added to the scene:
+			<code>
+var object1 = new THREE.Object3D;
+var object2 = new THREE.Object3D;
+
+object1.add( object2 );
+scene.add( object1 ); //object1 and object2 will automatically update their matrices
+			</code>
+		</div>
+
+		<p>However, if you know object will be static, you can disable this and update the transform matrix manually just when needed.</p>
+
+		<code>
+object.matrixAutoUpdate  = false;
+object.updateMatrix();
+		</code>
 
 		<h2>Geometries</h2>
+		<div>
+			<h3>[page:BufferGeometry]</h3>
+			<div>
+				<p>
+					BufferGeometries store information (such as vertex positions, face indices, normals, colors,
+					UVs, and any custom attributes) in [page:BufferAttribute buffers] - that is,
+					[link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays typed arrays].
+					This makes them generally faster than standard Geometries, at the cost of being somewhat harder to
+					work with.
+				</p>
+				<p>
+					With regards to updating BufferGeometries, the most important thing to understand is that you
+					you cannot resize buffers (this is very costly,	basically the equivalent to creating new a geometry).
+					You can however update the content of buffers.
+				</p>
+				<p>
+					This means that if you know an attribute of you BufferGeometry will grow, say the number of vertices,
+					you must pre-allocate a buffer large enough to hold any new vertices that may be created. Of
+					course, this also means that there will be a maximum size for your BufferGeometry - there is
+					no way to create a BufferGeometry that can efficiently be extended indefinitely.
+				</p>
+				<p>
+					We'll use the example of a line that gets extended at render time. We'll allocate space
+					in the buffer for 500 vertices but draw only two at first, using [page:BufferGeometry.drawRange].
+				</p>
+				<code>
+var MAX_POINTS = 500;
+
+// geometry
+var geometry = new THREE.BufferGeometry();
+
+// attributes
+var positions = new Float32Array( MAX_POINTS * 3 ); // 3 vertices per point
+geometry.addAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );
+
+// draw range
+drawCount = 2; // draw the first 2 points, only
+geometry.setDrawRange( 0, drawCount );
+
+// material
+var material = new THREE.LineBasicMaterial( { color: 0xff0000, linewidth: 2 } );
+
+// line
+line = new THREE.Line( geometry,  material );
+scene.add( line );
+				</code>
+			 	<p>
+					Next we'll randomly add points to the line using a pattern like:
+				</p>
+				<code>
+var positions = line.geometry.attributes.position.array;
+
+var x = y = z = index = 0;
+
+for ( var i = 0, l = MAX_POINTS; i < l; i ++ ) {
+
+    positions[ index ++ ] = x;
+    positions[ index ++ ] = y;
+    positions[ index ++ ] = z;
+
+    x += ( Math.random() - 0.5 ) * 30;
+    y += ( Math.random() - 0.5 ) * 30;
+    z += ( Math.random() - 0.5 ) * 30;
+
+}
+				</code>
+				<p>
+					If you want to change the <em>number of points</em> rendered after the first render, do this:
+				</p>
+				<code>
+line.geometry.setDrawRange( 0, newValue );
+				</code>
+				<p>
+					If you want to change the position data values after the first render, you need to
+					set the needsUpdate flag like so:
+				</p>
+				<code>
+line.geometry.attributes.position.needsUpdate = true; // required after the first render
+				</code>
+
+				<p>
+					[link:http://jsfiddle.net/w67tzfhx/ Here is a fiddle] showing an animated line which you can adapt to your use case.
+				</p>
+
+				<h4>Examples:</h4>
+					[example:webgl_custom_attributes WebGL / custom / attributes]<br />
+					[example:webgl_buffergeometry_custom_attributes_particles WebGL / buffergeometry / custom / attributes / particles]
+
+
+			</div>
+
+			<h3>[page:Geometry]</h3>
+			<div>
+				<p>
+					The following flag control updating of various geometry attributes. Set flags only
+					for attributes that you need to update, updates are costly. Once buffers
+					change, these flags reset automatically back to false. You need to keep setting them to
+					true if you wanna keep updating buffers. Note that this applies only to [page:Geometry]
+					and not to [page:BufferGeometry].
+				</p>
+				<code>
+var geometry = new THREE.Geometry();
+geometry.verticesNeedUpdate = true;
+geometry.elementsNeedUpdate = true;
+geometry.morphTargetsNeedUpdate = true;
+geometry.uvsNeedUpdate = true;
+geometry.normalsNeedUpdate = true;
+geometry.colorsNeedUpdate = true;
+geometry.tangentsNeedUpdate = true;
+				</code>
+
+				<p>
+					In versions prior to [link:https://github.com/mrdoob/three.js/releases/tag/r66 r66] meshes
+					additionally need the <em>dynamic</em> flag enabled (to keep internal typed arrays):
+				</p>
+
+				<code>
+		//removed after r66
+		geometry.dynamic = true;
+				</code>
+
+				<h4>Example:</h4>
+					[example:webgl_geometry_dynamic WebGL / geometry / dynamic]<br />
+			</div>
+
+		</div>
 
-		<p>You can only update content of buffers, you cannot resize buffers (this is very costly, basically equivalent to creating new geometry). </p>
-
-		<p>You can emulate resizing by pre-allocating larger buffer and then keeping unneeded vertices collapsed / hidden.</p>
-
-		<p>Set flags only for attributes that you need to update, updates are costly. Once buffers change, these flags reset automatically back to <code>false</code>. You need to keep setting them to <code>true</code> if you wanna keep updating buffers.</p>
-
-		<p>r49</p>
-
-		<div class="highlight highlight-source-js"><pre><span class="pl-smi">geometry</span>.<span class="pl-smi">verticesNeedUpdate</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">elementsNeedUpdate</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">morphTargetsNeedUpdate</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">uvsNeedUpdate</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">normalsNeedUpdate</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">colorsNeedUpdate</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">tangentsNeedUpdate</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;</pre></div>
-
-		<p>pre-r49</p>
-
-		<div class="highlight highlight-source-js"><pre><span class="pl-smi">geometry</span>.<span class="pl-smi">__dirtyVertices</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">__dirtyMorphTargets</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">__dirtyElements</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">__dirtyUvs</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">__dirtyNormals</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">__dirtyTangents</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;
-		<span class="pl-smi">geometry</span>.<span class="pl-smi">__dirtyColors</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;</pre></div>
-
-		<p>In versions prior to <a href="https://github.com/mrdoob/three.js/releases/tag/r66">r66</a> meshes additionally need the <code>dynamic</code> flag enabled (to keep internal typed arrays).</p>
-
-		<div class="highlight highlight-source-js"><pre><span class="pl-smi">geometry</span>.<span class="pl-smi">dynamic</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;</pre></div>
-
-		<p>Custom attributes (in <code>MeshShaderMaterial</code>):</p>
-
-		<div class="highlight highlight-source-js"><pre>attributes[ <span class="pl-s"><span class="pl-pds">"</span>attributeName<span class="pl-pds">"</span></span> ].<span class="pl-smi">needsUpdate</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;</pre></div>
-
-		<p>Other objects like <code>ParticleSystem</code>, <code>Ribbon</code>, <code>Line</code> just need "dirty" flags.</p>
-
-		<p>Examples:</p>
-
-		<p><a href="https://github.com/mrdoob/three.js/blob/master/examples/webgl_geometry_dynamic.html">https://github.com/mrdoob/three.js/blob/master/examples/webgl_geometry_dynamic.html</a></p>
 
-		<p><a href="https://github.com/mrdoob/three.js/blob/master/examples/webgl_custom_attributes.html">https://github.com/mrdoob/three.js/blob/master/examples/webgl_custom_attributes.html</a></p>
 
-		<p><a href="https://github.com/mrdoob/three.js/blob/master/examples/webgl_custom_attributes_particles.html">https://github.com/mrdoob/three.js/blob/master/examples/webgl_custom_attributes_particles.html</a></p>
 
 		<h2>Materials</h2>
+		<div>
+			<p>All uniforms values can be changed freely (e.g. colors, textures, opacity, etc), values are sent to the shader every frame.</p>
 
-		<p>All uniforms values can be changed freely (e.g. colors, textures, opacity, etc), values are sent to shader every frame.</p>
+			<p>Also GLstate related parameters can change any time (depthTest, blending, polygonOffset, etc).</p>
 
-		<p>Also GL state related parameters can change any time (depthTest, blending, polygonOffset, etc).</p>
+			<p>Flat / smooth shading is baked into normals. You need to reset normals buffer (see above).</p>
 
-		<p>Flat / smooth shading is baked into normals. You need to reset normals buffer (see above).</p>
+			<p>The following properties can't be easily changed at runtime (once the material is rendered at least once):</p>
+			<ul>
+				<li>numbers and types of uniforms</li>
+				<li>numbers and types of lights</li>
+				<li>presence or not of
+					<ul>
+						<li>texture</li>
+						<li>fog</li>
+						<li>vertex colors</li>
+						<li>skinning</li>
+						<li>morphing</li>
+						<li>shadow map</li>
+						<li>alpha test</li>
+					</ul>
+				</li>
+			</ul>
 
-		<p>Properties that can't be easily changed in runtime (once material is rendered at least once):</p>
+			<p>Changes in these require building of new shader program. You'll need to set</p>
+			<code>material.needsUpdate = true</code>
 
-		<ul>
-		<li>numbers and types of uniforms</li>
-		<li>numbers and types of lights</li>
-		<li>presence or not of
+			<p>Bear in mind this might be quite slow and induce jerkiness in framerate (especially on Windows, as shader compilation is slower in DirectX than OpenGL).</p>
 
-		<ul>
-		<li>texture</li>
-		<li>fog</li>
-		<li>vertex colors</li>
-		<li>skinning</li>
-		<li>morphing</li>
-		<li>shadow map</li>
-		<li>alpha test</li>
-		</ul>
-		</li>
-		</ul>
+			<p>For smoother experience you can emulate changes in these features to some degree by having "dummy" values like zero intensity lights, white textures, or zero density fog.</p>
 
-		<p>Changes in these require building of new shader program. You'll need to set <code>material.needsUpdate</code> flag to <code>true</code>. </p>
+			<p>You can freely change the material used for geometry chunks, however you cannot change how an object is divided into chunks (according to face materials). </p>
 
-		<p>Bear in mind this might be quite slow and induce jerkiness in framerate (especially on Windows, as shader compilation is slower in DirectX than OpenGL).</p>
+			<h3>If you need to have different configurations of materials during runtime:</h3>
+			<p>If the number of materials / chunks is small, you could pre-divide the object beforehand (e.g. hair / face / body / upper clothes / trousers for a human, front / sides / top / glass / tire / interior for a car). </p>
 
-		<p>For smoother experience you can emulate changes in these features to some degree by having "dummy" values like zero intensity lights, white textures, or zero density fog.</p>
+			<p>If the number is large (e.g. each face could be potentially different), consider a different solution, such as using attributes / textures to drive different per-face look.</p>
 
-		<p>You can change freely material used for geometry chunk, you cannot change how object is divided into chunks (according to face materials). </p>
+			<h3>Examples:</h3>
+			[example:webgl_materials_cars WebGL / materials / cars]<br />
+			[example:webgl_postprocessing_dof WebGL / webgl_postprocessing / dof]
+		</div>
 
-		<p>If you need to have different configurations of materials during runtime, if number of materials / chunks is small, you could pre-divide object beforehand (e.g. hair / face / body / upper clothes / trousers for human, front / sides / top / glass / tire / interior for car). </p>
-
-		<p>If number is large (e.g. each face could be potentially different), consider different solution, using attributes / textures to drive different per-face look.</p>
-
-		<p>Examples:</p>
-
-		<p><a href="https://github.com/mrdoob/three.js/blob/master/examples/webgl_materials_cars.html">https://github.com/mrdoob/three.js/blob/master/examples/webgl_materials_cars.html</a></p>
-
-		<p><a href="https://github.com/mrdoob/three.js/blob/master/examples/webgl_postprocessing_dof.html">https://github.com/mrdoob/three.js/blob/master/examples/webgl_postprocessing_dof.html</a></p>
 
 		<h2>Textures</h2>
-
-		<p>Image, canvas, video and data textures need to have flag set:</p>
-
-		<div class="highlight highlight-source-js"><pre><span class="pl-smi">texture</span>.<span class="pl-smi">needsUpdate</span> <span class="pl-k">=</span> <span class="pl-c1">true</span>;</pre></div>
-
-		<p>Render targets update automatically.</p>
-
-		<p>Examples:</p>
-
-		<p><a href="https://github.com/mrdoob/three.js/blob/master/examples/webgl_materials_video.html">https://github.com/mrdoob/three.js/blob/master/examples/webgl_materials_video.html</a></p>
-
-		<p><a href="https://github.com/mrdoob/three.js/blob/master/examples/webgl_rtt.html">https://github.com/mrdoob/three.js/blob/master/examples/webgl_rtt.html</a></p>
-
-		<h2>
-		<a id="user-content-cameras" class="anchor" href="#cameras" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Cameras</h2>
-
-		<p>Camera position and target is updated automatically.</p>
-
-		<p>If you need to change <code>fov</code>, <code>aspect</code>, <code>near</code>, <code>far</code> you need to recompute projection matrix:</p>
-
-		<div class="highlight highlight-source-js"><pre><span class="pl-smi">camera</span>.<span class="pl-smi">aspect</span> <span class="pl-k">=</span> <span class="pl-c1">window</span>.<span class="pl-c1">innerWidth</span> <span class="pl-k">/</span> <span class="pl-c1">window</span>.<span class="pl-c1">innerHeight</span>;
-		<span class="pl-smi">camera</span>.<span class="pl-en">updateProjectionMatrix</span>();</pre></div>
-
+		<div>
+			<p>Image, canvas, video and data textures need to have the following flag set if they are changed:</p>
+			<code>
+				texture.needsUpdate = true;
+			</code>
+			<p>Render targets update automatically.</p>
+
+			<h3>Examples:</h3>
+			[example:webgl_materials_video WebGL / materials / video]<br />
+			[example:webgl_rtt WebGL / rtt]
+
+		</div>
+
+
+		<h2>Cameras</h2>
+		<div>
+			<p>A camera's position and target is updated automatically. If you need to change</p>
+			<ul>
+				<li>
+					fov
+				</li>
+				<li>
+					aspect
+				</li>
+				<li>
+					near
+				</li>
+				<li>
+					far
+				</li>
+			</ul>
+			<p>
+				then you'll need to recompute the projection matrix:
+			</p>
+			<code>
+camera.aspect = window.innerWidth / window.innerHeight;
+camera.updateProjectionMatrix();
+			</code>
+		</div>
 	</body>
 </html>

+ 62 - 41
docs/manual/introduction/Useful-links.html

@@ -11,55 +11,96 @@
 		<h1>[name]</h1><br />
 
 		<div class="desc">
-			The following is a collection of links that you might find useful when learning Three.<br />
+			The following is a collection of links that you might find useful when learning three.js.<br />
 			If you find something that you'd like to add here, or think that one of the links below is no longer
 			relevant or working, feel free to click the 'edit' button in the top right and make some changes!<br /><br />
 
 			Note also that as three.js is under rapid development, a lot of these links will contain information that is
-			out of date - if something isn't working as you'd expect or one of these links says it should,
-			check the browser console for warning, the relevant docs pages and especially the [page:DeprecatedList].
+			out of date - if something isn't working as you'd expect or as one of these links says it should,
+			check the browser console for warnings or errors, the relevant docs pages and especially the [page:DeprecatedList].<br /><br />
+
+			In addition to this page, mrdoob maintains a collection of links related to three.js over on Google+.
+			Check them out <a href="https://plus.google.com/+ThreejsOrg">here</a>.
 		</div>
 
-		<h2>More documentation</h2>
+		<h2>Help forums</h2>
+		<div>
+			Three.js officially uses [link:http://stackoverflow.com/tags/three.js/info Stack Overflow] for help requests.
+			If you need assistance with something, that's the place to go. Do NOT open an issue on Github for help requests.
+		</div>
+
+		<h2>Tutorials and courses</h2>
+
+		<h4>Getting started with three.js</h4>
 		<ul>
 			<li>
-				[link:http://threejsdoc.appspot.com/doc/index.html threejsdoc] - useful because it links every API element to to every official example that uses it.
+				[link:https://codepen.io/rachsmith/post/beginning-with-3d-webgl-pt-1-the-scene Beginning with 3D WebGL] by [link:https://codepen.io/rachsmith/ Rachel Smith].
 			</li>
 			<li>
-				[link:http://ushiroad.com/3j/ Three.js walking map] - a graphical breakdown of the structure of a three.js scene.
+				[link:https://www.august.com.au/blog/animating-scenes-with-webgl-three-js/ Animating scenes with WebGL and three.js]
 			</li>
+		</ul>
+
+		<h4>More extensive / advanced articles and courses</h4>
+		<ul>
 			<li>
-				[link:http://www.reddit.com/r/threejs/ Three.js] subreddit.
+				[link:http://blog.cjgammon.com/ Collection of tutorials] by [link:http://www.cjgammon.com/ CJ Gammon].
 			</li>
 			<li>
-				[link:http://www.reddit.com/r/webgl/ WebGL] subreddit.
+				<a href="https://medium.com/@soffritti.pierfrancesco/glossy-spheres-in-three-js-bfd2785d4857">Glossy spheres in three.js</a>.
 			</li>
+		 <li>
+			 [link:https://www.udacity.com/course/cs291 Interactive 3D Graphics] - a free course on Udacity that teaches the fundamentals of 3D Graphics,
+			 and uses three.js as it coding tool.
+		 </li>
+		 <li>
+			[Link:https://aerotwist.com/tutorials/ Aerotwist] tutorials by [link:https://github.com/paullewis/ Paul Lewis].
+		 </li>
+			 <li>
+			 [link:http://learningthreejs.com/ Learning Three.js] – a blog with articles dedicated to teaching three.js
+		 </li>
+		 <li>
+			 [link:http://bkcore.com/blog/3d/webgl-three-js-animated-selective-glow.html Animated selective glow in Three.js]
+			 by [link:https://github.com/BKcore BKcore]
+		 </li>
 		</ul>
 
-		<h2>News and Updates</h2>
+		<h4>Tutorials in other languages</h4>
 		<ul>
 			<li>
-				[link:http://learningwebgl.com/blog/ Learning WebGL Blog] – The authoritaive news source for WebGL.
+				[link:http://www.natural-science.or.jp/article/20120220155529.php Building A Physics Simulation Environment] - three.js tutorial in Japanese
 			</li>
 			<li>
-				[link:https://plus.google.com/104300307601542851567/posts Three.js posts] on Google+ – frequent posts on Three.js
-			</li>
+		 	 [link:http://www.senaeh.de/einstieg-in-webgl-mit-three-js/ Einstieg in WebGL mit three.js] - three.js tutorial in German
+		  </li>
+
 		</ul>
 
-		<h2>Articles</h2>
+
+		<h2>More documentation</h2>
 		<ul>
 			<li>
-				[link:http://bkcore.com/blog/3d/webgl-three-js-animated-selective-glow.html Animated selective glow in Three.js]
-				by [link:https://github.com/BKcore BKcore]
+				[link:http://threejsdoc.appspot.com/doc/index.html threejsdoc] - less descriptive than the official docs here, however this is
+				useful because it links every API element to to every official three.js [link:https://threejs.org/examples/ example] that uses it.
 			</li>
 			<li>
+				[link:http://ushiroad.com/3j/ Three.js walking map] - a graphical breakdown of the structure of a three.js scene.
+			</li>
+		</ul>
 
+		<h2>News and Updates</h2>
+		<ul>
+			<li>
+				[link:http://www.reddit.com/r/threejs/ Three.js on reddit]
 			</li>
 			<li>
-
+				[link:http://www.reddit.com/r/webgl/ WebGL on reddit]
 			</li>
 			<li>
-
+				[link:http://learningwebgl.com/blog/ Learning WebGL Blog] – The authoritaive news source for WebGL.
+			</li>
+			<li>
+				[link:https://plus.google.com/104300307601542851567/posts Three.js posts] on Google+ – frequent posts on Three.js
 			</li>
 		</ul>
 
@@ -70,11 +111,11 @@
 				examples built using three.js r60.
 			</li>
 			<li>
-				[link:https://threejs.org/examples/ Official three.js Examples] - these examples are
+				[link:https://threejs.org/examples/ Official three.js examples] - these examples are
 				maintained as part of the three.js repository, and always use the latest version of three.js.
 			</li>
 			<li>
-				[link:https://rawgit.com/mrdoob/three.js/dev/examples/ Official three.js Examples] (dev branch) -
+				[link:https://rawgit.com/mrdoob/three.js/dev/examples/ Official three.js dev branch examples]  -
 				Same as the above, except these use the dev branch of three.js,	and are used to check that
 				everything is working as three.js being is developed.
 			</li>
@@ -98,26 +139,6 @@
 		</li>
 	 </ul>
 
-	 <h2>Tutorials and courses</h2>
-	 <ul>
-		 <li>
-			 [link:https://www.udacity.com/course/cs291 Interactive 3D Graphics] - a free course on Udacity that teaches the fundamentals of 3D Graphics,
-			 and uses three.js as it coding tool.
-		 </li>
-		 <li>
-			[Link:https://aerotwist.com/tutorials/ Aerotwist] tutorials by [link:https://github.com/paullewis/ Paul Lewis].
-		 </li>
-		 <li>
-			 [link:http://www.natural-science.or.jp/article/20120220155529.php Building A Physics Simulation Environment] - three.js tutorial in Japanese
-		 </li>
-		 <li>
-			 [link:http://www.senaeh.de/einstieg-in-webgl-mit-three-js/ Einstieg in WebGL mit three.js] - three.js tutorial in German
-		 </li>
-		 <li>
-			 [link:http://learningthreejs.com/ Learning Three.js] – blog where each post is dedicated to teaching an aspect of three.js
-		 </li>
-	 </ul>
-
 	 <h2>Old Links</h2>
 	 <div>
 		These links are kept for historical purposes - you may still find them useful, but be warned that
@@ -147,10 +168,10 @@
 			[link:http://blackjk3.github.io/threefab/ ThreeFab] - scene editor, maintained up until around three.js r50.
 		</li>
 		<li>
-			[link:http://bkcore.com/blog/3d/webgl-three-js-workflow-tips.html Max to Three.js workflow tips and tricks] by https://github.com/BKcore BKcore]
+			[link:http://bkcore.com/blog/3d/webgl-three-js-workflow-tips.html Max to Three.js workflow tips and tricks] by [link:https://github.com/BKcore BKcore]
 		</li>
 		<li>
-			[link:http://12devsofxmas.co.uk/2012/01/webgl-and-three-js/ On the twelfth day of Xmas, take a whirlwind look at Three.js]
+			[link:http://12devsofxmas.co.uk/2012/01/webgl-and-three-js/ A whirlwind look at Three.js]
 			by [link:http://github.com/nrocy Paul King]
 		</li>
 	 </ul>

+ 1 - 1
docs/page.js

@@ -43,7 +43,7 @@ var onDocumentLoad = function ( event ) {
 	text = text.replace( /\[example:([\w\_]+)\]/gi, "[example:$1 $1]" ); // [example:name] to [example:name title]
 	text = text.replace( /\[example:([\w\_]+) ([\w\:\/\.\-\_ \s]+)\]/gi, "<a href=\"../examples/#$1\"  target=\"_blank\">$2</a>" ); // [example:name title]
 
-
+	
 	document.body.innerHTML = text;
 
 	// handle code snippets formatting

+ 16 - 14
docs/scenes/js/geometry.js

@@ -91,25 +91,24 @@ function updateGroupGeometry( mesh, geometry ) {
 
 }
 
-var CustomSinCurve = THREE.Curve.create(
+function CustomSinCurve( scale ){
 
-	function ( scale ) {
+	this.scale = ( scale === undefined ) ? 1 : scale;
 
-		this.scale = ( scale === undefined ) ? 1 : scale;
+}
 
-	},
+CustomSinCurve.prototype = Object.create( THREE.Curve.prototype );
+CustomSinCurve.prototype.constructor = CustomSinCurve;
 
-	function ( t ) {
+CustomSinCurve.prototype.getPoint = function ( t ) {
 
-		var tx = t * 3 - 1.5;
-		var ty = Math.sin( 2 * Math.PI * t );
-		var tz = 0;
+	var tx = t * 3 - 1.5;
+	var ty = Math.sin( 2 * Math.PI * t );
+	var tz = 0;
 
-		return new THREE.Vector3( tx, ty, tz ).multiplyScalar( this.scale );
+	return new THREE.Vector3( tx, ty, tz ).multiplyScalar( this.scale );
 
-	}
-
-);
+};
 
 // heart shape
 
@@ -925,7 +924,8 @@ var guis = {
 			weight : "regular",
 			bevelEnabled : false,
 			bevelThickness : 1,
-			bevelSize : 0.5
+			bevelSize : 0.5,
+			bevelSegments : 3
 		};
 
 		var fonts = [
@@ -951,7 +951,8 @@ var guis = {
 					curveSegments: data.curveSegments,
 					bevelEnabled: data.bevelEnabled,
 					bevelThickness: data.bevelThickness,
-					bevelSize: data.bevelSize
+					bevelSize: data.bevelSize,
+					bevelSegments: data.bevelSegments
 				} );
 				geometry.center();
 
@@ -975,6 +976,7 @@ var guis = {
 		folder.add( data, 'bevelEnabled' ).onChange( generateGeometry );
 		folder.add( data, 'bevelThickness', 0.1, 3 ).onChange( generateGeometry );
 		folder.add( data, 'bevelSize', 0.1, 3 ).onChange( generateGeometry );
+		folder.add( data, 'bevelSegments', 0, 8 ).step( 1 ).onChange( generateGeometry );
 
 		generateGeometry();
 

+ 1 - 2
editor/examples/arkanoid.app.json

@@ -4,7 +4,6 @@
 	},
 	"project": {
 		"shadows": true,
-		"editable": true,
 		"vr": false
 	},
 	"camera": {
@@ -205,4 +204,4 @@
 				"source": "var ball = this.getObjectByName( 'Ball' );\n\nvar direction = new THREE.Vector3();\ndirection.x = Math.random() - 0.5;\ndirection.z = - 0.5;\ndirection.normalize();\n\nvar speed = new THREE.Vector3();\n\n//\n\nvar group = new THREE.Group();\nthis.add( group );\n\nvar paddle = this.getObjectByName( 'Paddle' );\npaddle.material.visible = false;\ngroup.add( paddle );\n\nvar brick = this.getObjectByName( 'Brick' );\n\nfor ( var j = 0; j < 8; j ++ ) {\n\n\tvar material = new THREE.MeshPhongMaterial( { color: Math.random() * 0xffffff } );\n\n\tfor ( var i = 0; i < 12; i ++ ) {\n\t\t\n\t\tvar object = brick.clone();\n\t\tobject.position.x = i * 22 - 120;\n\t\tobject.position.z = j * 14 - 120;\n\t\tgroup.add( object );\n\n\t\tvar cylinder = object.getObjectByName( 'Cylinder' );\n\t\tcylinder.material = material;\n\n\t}\n\t\n}\n\nbrick.visible = false;\nbrick.material.visible = false;\n\n//\n\nvar raycaster = new THREE.Raycaster();\n\nfunction update( event ) {\n\t\n\tif ( ball.position.x < - 150 || ball.position.x > 150 ) direction.x = - direction.x;\n\tif ( ball.position.z < - 200 || ball.position.z > 200 ) direction.z = - direction.z;\n\n\tball.position.x = Math.max( - 150, Math.min( 150, ball.position.x ) );\n\tball.position.z = Math.max( - 200, Math.min( 200, ball.position.z ) );\n\t\n\tball.position.add( speed.copy( direction ).multiplyScalar( event.delta / 4 ) );\n\t\n\traycaster.set( ball.position, direction );\n\t\n\tvar intersections = raycaster.intersectObjects( group.children );\n\t\n\tif ( intersections.length > 0 ) {\n\t\n\t\tvar intersection = intersections[ 0 ];\n\t\t\n\t\tif ( intersection.distance < 5 ) {\n\t\t\t\n\t\t\tif ( intersection.object !== paddle ) {\n\n\t\t\t\tgroup.remove( intersection.object );\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tdirection.reflect( intersection.face.normal );\n\t\t\t\n\t\t}\n\t\t\n\t}\n\n}"
 			}]
 	}
-}
+}

+ 1 - 2
editor/examples/camera.app.json

@@ -4,7 +4,6 @@
 	},
 	"project": {
 		"shadows": true,
-		"editable": true,
 		"vr": false
 	},
 	"camera": {
@@ -187,4 +186,4 @@
 				"source": "function update( event ) {\n\n\tvar time = event.time * 0.001;\n\n\tthis.position.x = Math.sin( time ) * 400;\n\tthis.position.z = Math.cos( time ) * 400;\n\tthis.lookAt( scene.position );\n\n}"
 			}]
 	}
-}
+}

+ 1 - 2
editor/examples/particles.app.json

@@ -4,7 +4,6 @@
 	},
 	"project": {
 		"shadows": true,
-		"editable": true,
 		"vr": false
 	},
 	"camera": {
@@ -97,4 +96,4 @@
 				"source": "var original = this.getObjectByName( 'Particle' );\n\nvar particles = [];\n\nfor ( var i = 0; i < 100; i ++ ) {\n\n\tvar particle = original.clone();\n\tparticle.userData.velocity = new THREE.Vector3();\n\tthis.add( particle );\n\n\tparticles.push( particle );\n\n}\n\nfunction update( event ) {\n\t\n\tvar particle = particles.shift();\n\tparticles.push( particle );\n\t\t\n\tvar velocity = particle.userData.velocity;\n\tvelocity.x = Math.random() - 0.5;\n\tvelocity.y = Math.random() + 1;\n\tvelocity.z = Math.random() - 0.5;\n\n\tfor ( var i = 0; i < particles.length; i ++ ) {\n\n\t\tvar particle = particles[ i ];\n\n\t\tvar velocity = particle.userData.velocity;\n\n\t\tvelocity.y -= 0.098;\n\n\t\tparticle.position.add( velocity );\n\n\t\tif ( particle.position.y < 0 ) {\n\n\t\t\tparticle.position.y = 0;\n\n\t\t\tvelocity.y = - velocity.y;\n\t\t\tvelocity.multiplyScalar( 0.6 );\n\n\t\t}\n\n\t}\n\n}"
 			}]
 	}
-}
+}

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

@@ -4,7 +4,6 @@
 	},
 	"project": {
 		"shadows": false,
-		"editable": false,
 		"vr": false
 	},
 	"camera": {

+ 1 - 1
editor/index.html

@@ -23,7 +23,7 @@
 		<link href="css/main.css" rel="stylesheet" />
 		<link id="theme" href="css/light.css" rel="stylesheet" />
 
-		<script src="../build/three.min.js"></script>
+		<script src="../build/three.js"></script>
 		<script src="../examples/js/libs/system.min.js"></script>
 
 		<script src="../examples/js/controls/EditorControls.js"></script>

+ 1 - 4
editor/js/Config.js

@@ -13,12 +13,9 @@ var Config = function ( name ) {
 		'project/renderer/gammaInput': false,
 		'project/renderer/gammaOutput': false,
 		'project/renderer/shadows': true,
-		'project/editable': false,
 		'project/vr': false,
 
-		'settings/history': false,
-
-		'ui/sidebar/animation/collapsed': true
+		'settings/history': false
 	};
 
 	if ( window.localStorage[ name ] === undefined ) {

+ 0 - 1
editor/js/Editor.js

@@ -500,7 +500,6 @@ Editor.prototype = {
 				gammaInput: this.config.getKey( 'project/renderer/gammaInput' ),
 				gammaOutput: this.config.getKey( 'project/renderer/gammaOutput' ),
 				shadows: this.config.getKey( 'project/renderer/shadows' ),
-				editable: this.config.getKey( 'project/editable' ),
 				vr: this.config.getKey( 'project/vr' )
 			},
 			camera: this.camera.toJSON(),

+ 3 - 3
editor/js/Loader.js

@@ -155,15 +155,15 @@ var Loader = function ( editor ) {
 
 				break;
 
+			case 'glb':
 			case 'gltf':
 
 				reader.addEventListener( 'load', function ( event ) {
 
 					var contents = event.target.result;
-					var json = JSON.parse( contents );
 
 					var loader = new THREE.GLTFLoader();
-					loader.parse( json, function ( result ) {
+					loader.parse( contents, function ( result ) {
 
 						result.scene.name = filename;
 						editor.execute( new AddObjectCommand( result.scene ) );
@@ -171,7 +171,7 @@ var Loader = function ( editor ) {
 					} );
 
 				}, false );
-				reader.readAsText( file );
+				reader.readAsArrayBuffer( file );
 
 				break;
 

+ 14 - 4
editor/js/Menubar.File.js

@@ -4,6 +4,16 @@
 
 Menubar.File = function ( editor ) {
 
+	var NUMBER_PRECISION = 6;
+
+	function parseNumber( key, value ) {
+
+		return typeof value === 'number' ? parseFloat( value.toFixed( NUMBER_PRECISION ) ) : value;
+
+	}
+
+	//
+
 	var container = new UI.Panel();
 	container.setClass( 'menu' );
 
@@ -89,7 +99,7 @@ Menubar.File = function ( editor ) {
 
 		try {
 
-			output = JSON.stringify( output, null, '\t' );
+			output = JSON.stringify( output, parseNumber, '\t' );
 			output = output.replace( /[\n\t]+([\d\.e\-\[\]]+)/g, '$1' );
 
 		} catch ( e ) {
@@ -123,7 +133,7 @@ Menubar.File = function ( editor ) {
 
 		try {
 
-			output = JSON.stringify( output, null, '\t' );
+			output = JSON.stringify( output, parseNumber, '\t' );
 			output = output.replace( /[\n\t]+([\d\.e\-\[\]]+)/g, '$1' );
 
 		} catch ( e ) {
@@ -148,7 +158,7 @@ Menubar.File = function ( editor ) {
 
 		try {
 
-			output = JSON.stringify( output, null, '\t' );
+			output = JSON.stringify( output, parseNumber, '\t' );
 			output = output.replace( /[\n\t]+([\d\.e\-\[\]]+)/g, '$1' );
 
 		} catch ( e ) {
@@ -220,7 +230,7 @@ Menubar.File = function ( editor ) {
 
 		var vr = output.project.vr;
 
-		output = JSON.stringify( output, null, '\t' );
+		output = JSON.stringify( output, parseNumber, '\t' );
 		output = output.replace( /[\n\t]+([\d\.e\-\[\]]+)/g, '$1' );
 
 		zip.file( 'app.json', output );

+ 3 - 2
editor/js/Script.js

@@ -84,7 +84,7 @@ var Script = function ( editor ) {
 
 				if ( value !== currentScript.source ) {
 
-					editor.execute( new SetScriptValueCommand( currentObject, currentScript, 'source', value, codemirror.getCursor() ) );
+					editor.execute( new SetScriptValueCommand( currentObject, currentScript, 'source', value, codemirror.getCursor(), codemirror.getScrollInfo() ) );
 
 				}
 				return;
@@ -422,7 +422,7 @@ var Script = function ( editor ) {
 
 	} );
 
-	signals.refreshScriptEditor.add( function ( object, script, cursorPosition ) {
+	signals.refreshScriptEditor.add( function ( object, script, cursorPosition, scrollInfo ) {
 
 		if ( currentScript !== script ) return;
 
@@ -435,6 +435,7 @@ var Script = function ( editor ) {
 		if ( cursorPosition !== undefined ) {
 
 			codemirror.setCursor( cursorPosition );
+			codemirror.scrollTo( scrollInfo.left, scrollInfo.top );
 
 		}
 		codemirror.setHistory( history ); // setting the history to previous state

+ 3 - 8
editor/js/Sidebar.Animation.js

@@ -9,16 +9,11 @@ Sidebar.Animation = function ( editor ) {
 	var options = {};
 	var possibleAnimations = {};
 
-	var container = new UI.CollapsiblePanel();
-	container.setCollapsed( editor.config.getKey( 'ui/sidebar/animation/collapsed' ) );
-	container.onCollapsedChange( function ( boolean ) {
-
-		editor.config.setKey( 'ui/sidebar/animation/collapsed', boolean );
-
-	} );
+	var container = new UI.Panel();
 	container.setDisplay( 'none' );
 
-	container.addStatic( new UI.Text( 'Animation' ).setTextTransform( 'uppercase' ) );
+	container.add( new UI.Text( 'Animation' ).setTextTransform( 'uppercase' ) );
+	container.add( new UI.Break() );
 	container.add( new UI.Break() );
 
 	var animationsRow = new UI.Row();

+ 0 - 14
editor/js/Sidebar.Project.js

@@ -101,20 +101,6 @@ Sidebar.Project = function ( editor ) {
 
 	container.add( rendererPropertiesRow );
 
-	// Editable
-
-	var editableRow = new UI.Row();
-	var editable = new UI.Checkbox( config.getKey( 'project/editable' ) ).setLeft( '100px' ).onChange( function () {
-
-		config.setKey( 'project/editable', this.getValue() );
-
-	} );
-
-	editableRow.add( new UI.Text( 'Editable' ).setWidth( '90px' ) );
-	editableRow.add( editable );
-
-	container.add( editableRow );
-
 	// VR
 
 	var vrRow = new UI.Row();

+ 3 - 3
editor/js/Viewport.js

@@ -36,7 +36,7 @@ var Viewport = function ( editor ) {
 
 	// helpers
 
-	var grid = new THREE.GridHelper( 30, 60 );
+	var grid = new THREE.GridHelper( 60, 60 );
 	sceneHelpers.add( grid );
 
 	//
@@ -295,12 +295,12 @@ var Viewport = function ( editor ) {
 
 			case 'css/light.css':
 				sceneHelpers.remove( grid );
-				grid = new THREE.GridHelper( 30, 60, 0x444444, 0x888888 );
+				grid = new THREE.GridHelper( 60, 60, 0x444444, 0x888888 );
 				sceneHelpers.add( grid );
 				break;
 			case 'css/dark.css':
 				sceneHelpers.remove( grid );
-				grid = new THREE.GridHelper( 30, 60, 0xbbbbbb, 0x888888 );
+				grid = new THREE.GridHelper( 60, 60, 0xbbbbbb, 0x888888 );
 				sceneHelpers.add( grid );
 				break;
 

+ 8 - 3
editor/js/commands/SetScriptValueCommand.js

@@ -9,10 +9,11 @@
  * @param attributeName string
  * @param newValue string, object
  * @param cursorPosition javascript object with format {line: 2, ch: 3}
+ * @param scrollInfo javascript object with values {left, top, width, height, clientWidth, clientHeight}
  * @constructor
  */
 
-var SetScriptValueCommand = function ( object, script, attributeName, newValue, cursorPosition ) {
+var SetScriptValueCommand = function ( object, script, attributeName, newValue, cursorPosition, scrollInfo ) {
 
 	Command.call( this );
 
@@ -27,6 +28,7 @@ var SetScriptValueCommand = function ( object, script, attributeName, newValue,
 	this.oldValue = ( script !== undefined ) ? script[ this.attributeName ] : undefined;
 	this.newValue = newValue;
 	this.cursorPosition = cursorPosition;
+	this.scrollInfo = scrollInfo;
 
 };
 
@@ -37,7 +39,7 @@ SetScriptValueCommand.prototype = {
 		this.script[ this.attributeName ] = this.newValue;
 
 		this.editor.signals.scriptChanged.dispatch();
-		this.editor.signals.refreshScriptEditor.dispatch( this.object, this.script, this.cursorPosition );
+		this.editor.signals.refreshScriptEditor.dispatch( this.object, this.script, this.cursorPosition, this.scrollInfo );
 
 	},
 
@@ -46,13 +48,14 @@ SetScriptValueCommand.prototype = {
 		this.script[ this.attributeName ] = this.oldValue;
 
 		this.editor.signals.scriptChanged.dispatch();
-		this.editor.signals.refreshScriptEditor.dispatch( this.object, this.script, this.cursorPosition );
+		this.editor.signals.refreshScriptEditor.dispatch( this.object, this.script, this.cursorPosition, this.scrollInfo );
 
 	},
 
 	update: function ( cmd ) {
 
 		this.cursorPosition = cmd.cursorPosition;
+		this.scrollInfo = cmd.scrollInfo;
 		this.newValue = cmd.newValue;
 
 	},
@@ -67,6 +70,7 @@ SetScriptValueCommand.prototype = {
 		output.oldValue = this.oldValue;
 		output.newValue = this.newValue;
 		output.cursorPosition = this.cursorPosition;
+		output.scrollInfo = this.scrollInfo;
 
 		return output;
 
@@ -82,6 +86,7 @@ SetScriptValueCommand.prototype = {
 		this.object = this.editor.objectByUuid( json.objectUuid );
 		this.script = this.editor.scripts[ json.objectUuid ][ json.index ];
 		this.cursorPosition = json.cursorPosition;
+		this.scrollInfo = json.scrollInfo;
 
 	}
 

+ 0 - 2
editor/js/libs/app.js

@@ -6,8 +6,6 @@ var APP = {
 
 	Player: function () {
 
-		var scope = this;
-
 		var loader = new THREE.ObjectLoader();
 		var camera, scene, renderer;
 

+ 28 - 36
editor/js/libs/app/index.html

@@ -6,26 +6,26 @@
 		<meta name="generator" content="Three.js Editor">
 		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
 		<style>
-		body {
-			font-family: Helvetica, Arial, sans-serif;
-			font-size: 12px;
-			background-color: #000;
-			margin: 0px;
-			overflow: hidden;
-		}
-		#edit {
-			position: absolute;
-			bottom: 20px;
-			right: 20px;
-			padding: 8px;
-			color: #555;
-			background-color: #fff;
-			opacity: 0.5;
-		}
-		#edit:hover {
-			cursor: pointer;
-			opacity: 1;
-		}
+			body {
+				font-family: Helvetica, Arial, sans-serif;
+				font-size: 12px;
+				background-color: #000;
+				margin: 0px;
+				overflow: hidden;
+			}
+			#edit {
+				position: absolute;
+				bottom: 20px;
+				right: 20px;
+				padding: 8px;
+				text-decoration: none;
+				background-color: #fff;
+				color: #555;
+				opacity: 0.5;
+			}
+			#edit:hover {
+				opacity: 1;
+			}
 		</style>
 	</head>
 	<body ontouchstart="">
@@ -37,34 +37,26 @@
 			var loader = new THREE.FileLoader();
 			loader.load( 'app.json', function ( text ) {
 
-				var json = JSON.parse( text );
-
 				var player = new APP.Player();
-				player.load( json );
+				player.load( JSON.parse( text ) );
 				player.setSize( window.innerWidth, window.innerHeight );
 				player.play();
 
 				document.body.appendChild( player.dom );
 
-				if ( json.project.editable === true ) {
+				window.addEventListener( 'resize', function () {
+					player.setSize( window.innerWidth, window.innerHeight );
+				} );
 
-					var button = document.createElement( 'div' );
+				if ( location.search === '?edit' ) {
+					var button = document.createElement( 'a' );
 					button.id = 'edit';
+					button.href = 'https://threejs.org/editor/#file=' + location.href.split( '/' ).slice( 0, - 1 ).join( '/' ) + '/app.json';
+					button.target = '_blank';
 					button.textContent = 'EDIT';
-					button.addEventListener( 'click', function ( event ) {
-
-						var url = location.href.split( '/' ).slice( 0, - 1 ).join( '/' );
-						window.open( 'http://threejs.org/editor/#file=' + url + '/app.json' );
-
-					}, false );
 					document.body.appendChild( button );
-
 				}
 
-				window.addEventListener( 'resize', function () {
-					player.setSize( window.innerWidth, window.innerHeight );
-				} );
-
 			} );
 
 		</script>

+ 8 - 58
editor/js/libs/tern-threejs/threejs.js

@@ -1431,15 +1431,6 @@
       },
       "!doc": "Alias for [page:EllipseCurve]"
     },
-    "ClosedSplineCurve3": {
-      "!url": "http://threejs.org/docs/#Reference/extras/curves/ClosedSplineCurve3",
-      "prototype": {
-        "!proto": "THREE.Curve.prototype",
-        "points": "[]"
-      },
-      "!doc": "Create a smooth 3d spline curve from a series of points that loops back onto itself",
-      "!type": "fn(points: [])"
-    },
     "CubicBezierCurve": {
       "!url": "http://threejs.org/docs/#Reference/extras/curves/CubicBezierCurve",
       "prototype": {
@@ -1529,15 +1520,6 @@
       "!doc": "Create a smooth 2d spline curve from a series of points",
       "!type": "fn(points: [])"
     },
-    "SplineCurve3": {
-      "!url": "http://threejs.org/docs/#Reference/extras/curves/SplineCurve3",
-      "prototype": {
-        "!proto": "THREE.Curve.prototype",
-        "points": "[]"
-      },
-      "!doc": "Create a smooth 3d spline curve from a series of points",
-      "!type": "fn(points: [])"
-    },
     "BoxGeometry": {
       "!url": "http://threejs.org/docs/#Reference/geometries/BoxGeometry",
       "prototype": {
@@ -3774,9 +3756,9 @@
           "!type": "fn(scalar: number) -> +THREE.Matrix3",
           "!doc": "Multiply every component of the matrix by a scalar value."
         },
-        "applyToVector3Array": {
-          "!type": "fn(array: []) -> []",
-          "!doc": "Multiply (apply) this matrix to every vector3 in the array."
+        "applyToBufferAttribute": {
+          "!type": "fn(attribute: []) -> +THREE.BufferAttribute",
+          "!doc": "Multiply (apply) this matrix to every vector3 in the attribute."
         },
         "getNormalMatrix": {
           "!type": "fn(matrix4: +THREE.Matrix4) -> +THREE.Matrix3",
@@ -3921,25 +3903,21 @@
           "!type": "fn(x: number, y: number, z: number) -> +THREE.Matrix4",
           "!doc": "Sets this matrix as scale transform."
         },
-        "makeFrustum": {
-          "!type": "fn(left: number, right: number, bottom: number, top: number, near: number, far: number) -> +THREE.Matrix4",
-          "!doc": "Creates a [page:Frustum frustum] matrix."
-        },
         "makePerspective": {
-          "!type": "fn(fov: number, aspect: number, near: number, far: number) -> +THREE.Matrix4",
+          "!type": "fn(left: number, right: number, top: number, bottom: number, near: number, far: number) -> +THREE.Matrix4",
           "!doc": "Creates a perspective projection matrix."
         },
         "makeOrthographic": {
-          "!type": "fn(left: number, right: number, bottom: number, top: number, near: number, far: number) -> +THREE.Matrix4",
+          "!type": "fn(left: number, right: number, top: number, bottom: number, near: number, far: number) -> +THREE.Matrix4",
           "!doc": "Creates an orthographic projection matrix."
         },
         "clone": {
           "!type": "fn() -> +THREE.Matrix4",
           "!doc": "Clones this matrix."
         },
-        "applyToVector3Array": {
-          "!type": "fn(a: []) -> []",
-          "!doc": "Multiply (apply) this matrix to every vector3 in the array."
+        "applyToBufferAttribute": {
+          "!type": "fn(attribute: []) -> +THREE.BufferAttribute",
+          "!doc": "Multiply (apply) this matrix to every vector3 in the attribute."
         },
         "getMaxScaleOnAxis": {
           "!type": "fn() -> number",
@@ -4237,34 +4215,6 @@
       "!doc": "A geometric sphere defined by a center position and radius.",
       "!type": "fn(center: +THREE.Vector3, radius: number)"
     },
-    "Spline": {
-      "!url": "http://threejs.org/docs/#Reference/math/Spline",
-      "prototype": {
-        "points": "[]",
-        "initFromArray": {
-          "!type": "fn(a: [])",
-          "!doc": "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."
-        },
-        "getPoint": {
-          "!type": "fn(k: number) -> +THREE.Vector3",
-          "!doc": "Return the interpolated point at *k*."
-        },
-        "getControlPointsArray": {
-          "!type": "fn() -> []",
-          "!doc": "Returns an array with triplets of x, y, z coordinates that correspond to the current control points."
-        },
-        "getLength": {
-          "!type": "fn(nSubDivisions: number) -> object",
-          "!doc": "Returns an object with the two properties. The property .[page:Number total] contains\n\t\t\tthe length of the spline when using nSubDivisions. The property .[page:Array chunkLength]\n\t\t\tcontains an array with the total length from the beginning of the spline to the end of that chunk."
-        },
-        "reparametrizeByArcLength": {
-          "!type": "fn(samplingCoef: number)",
-          "!doc": "This is done by resampling the original spline, with the density of sampling controlled by *samplingCoef*. Here it's interesting to note that denser sampling is not necessarily better: if sampling is too high, you may get weird kinks in curvature."
-        }
-      },
-      "!doc": "Represents a spline.",
-      "!type": "fn(points: [])"
-    },
     "Triangle": {
       "!url": "http://threejs.org/docs/#Reference/math/Triangle",
       "prototype": {

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

@@ -216,131 +216,6 @@ UI.Panel = function () {
 UI.Panel.prototype = Object.create( UI.Element.prototype );
 UI.Panel.prototype.constructor = UI.Panel;
 
-
-// Collapsible Panel
-
-UI.CollapsiblePanel = function () {
-
-	UI.Panel.call( this );
-
-	this.setClass( 'Panel Collapsible' );
-
-	var scope = this;
-
-	this.static = new UI.Panel();
-	this.static.setClass( 'Static' );
-	this.static.onClick( function () {
-
-		scope.toggle();
-
-	} );
-	this.dom.appendChild( this.static.dom );
-
-	this.contents = new UI.Panel();
-	this.contents.setClass( 'Content' );
-	this.dom.appendChild( this.contents.dom );
-
-	var button = new UI.Panel();
-	button.setClass( 'Button' );
-	this.static.add( button );
-
-	this.isCollapsed = false;
-
-	return this;
-
-};
-
-UI.CollapsiblePanel.prototype = Object.create( UI.Panel.prototype );
-UI.CollapsiblePanel.prototype.constructor = UI.CollapsiblePanel;
-
-UI.CollapsiblePanel.prototype.addStatic = function () {
-
-	this.static.add.apply( this.static, arguments );
-	return this;
-
-};
-
-UI.CollapsiblePanel.prototype.removeStatic = function () {
-
-	this.static.remove.apply( this.static, arguments );
-	return this;
-
-};
-
-UI.CollapsiblePanel.prototype.clearStatic = function () {
-
-	this.static.clear();
-	return this;
-
-};
-
-UI.CollapsiblePanel.prototype.add = function () {
-
-	this.contents.add.apply( this.contents, arguments );
-	return this;
-
-};
-
-UI.CollapsiblePanel.prototype.remove = function () {
-
-	this.contents.remove.apply( this.contents, arguments );
-	return this;
-
-};
-
-UI.CollapsiblePanel.prototype.clear = function () {
-
-	this.contents.clear();
-	return this;
-
-};
-
-UI.CollapsiblePanel.prototype.toggle = function() {
-
-	this.setCollapsed( ! this.isCollapsed );
-
-};
-
-UI.CollapsiblePanel.prototype.collapse = function() {
-
-	this.setCollapsed( true );
-
-};
-
-UI.CollapsiblePanel.prototype.expand = function() {
-
-	this.setCollapsed( false );
-
-};
-
-UI.CollapsiblePanel.prototype.setCollapsed = function( boolean ) {
-
-	if ( boolean ) {
-
-		this.dom.classList.add( 'collapsed' );
-
-	} else {
-
-		this.dom.classList.remove( 'collapsed' );
-
-	}
-
-	this.isCollapsed = boolean;
-
-	if ( this.onCollapsedChangeCallback !== undefined ) {
-
-		this.onCollapsedChangeCallback( boolean );
-
-	}
-
-};
-
-UI.CollapsiblePanel.prototype.onCollapsedChange = function ( callback ) {
-
-	this.onCollapsedChangeCallback = callback;
-
-};
-
 // Text
 
 UI.Text = function ( text ) {

+ 1 - 1
examples/canvas_lines_dashed.html

@@ -71,7 +71,7 @@
 
 				var points = hilbert3D( new THREE.Vector3( 0,0,0 ), 25.0, recursion, 0, 1, 2, 3, 4, 5, 6, 7 );
 
-				var spline = new THREE.Spline( points );
+				var spline = new THREE.CatmullRomCurve3( points );
 				var geometrySpline = new THREE.Geometry();
 
 				for ( var i = 0; i < points.length * subdivisions; i ++ ) {

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