Bläddra i källkod

Added DefaultUp and DefaultMAtrixAutoUpdate to Object3D docs

Lewy Blue 8 år sedan
förälder
incheckning
4dcd049c68
3 ändrade filer med 33 tillägg och 3 borttagningar
  1. 26 2
      docs/api/core/Object3D.html
  2. 0 1
      docs/api/lights/DirectionalLight.html
  3. 7 0
      docs/page.js

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

@@ -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,11 @@
 		</div>
 
 		<h3>[property:Vector3 up]</h3>
-		<div>Up direction. Default is [page:Vector3]( 0, 1, 0 ).</div>
+		<div>
+			Up direction. This is used by the [page:.lookAt lookAt] method to determine the
+			rotation of the result.<br />
+			Default is [page:Object3D.DefaultUp] - that is, ( 0, 1, 0 ).
+		</div>
 
 		<h3>[property:object userData]</h3>
 		<div>
@@ -152,7 +156,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>

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

@@ -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>
 

+ 7 - 0
docs/page.js

@@ -26,6 +26,8 @@ var onDocumentLoad = function ( event ) {
 
 	var text = document.body.innerHTML;
 
+
+
 	text = text.replace( /\[name\]/gi, name );
 	text = text.replace( /\[path\]/gi, path );
 	text = text.replace( /\[page:([\w\.]+)\]/gi, "[page:$1 $1]" ); // [page:name] to [page:name title]
@@ -43,6 +45,11 @@ 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]
 
+//Extract method return type and add it to the bottom of a method definition, unless it is
+//1: null - do nothing
+//2: this - add "return self (chainable)"
+text = text.replace( /\[method:([\w\_]+)/gi, 'gogogo' );
+//console.log( methodPos );
 
 	document.body.innerHTML = text;