Browse Source

Merge branch 'documentation' of git://github.com/gero3/three.js into dev

Mr.doob 12 years ago
parent
commit
c9eebb58bc

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

@@ -20,9 +20,23 @@
 		<h2>Methods</h2>
 
 		<h3>.projectVector( [page:Vector3 vector], [page:Camera camera] ) [page:Vector3]</h3>
+		<div>
+		[page:Vector3 vector] — vector to project.<br />
+		[page:Camera camera] — camera to use in the projection.<br />
+		</div>
+		<div>
+		Projects a vector with the camera. Caution, this method changes 'vector'.
+		</div>
 
 		<h3>.unprojectVector( [page:Vector3 vector], [page:Camera camera] ) [page:Vector3]</h3>
-
+		<div>
+		[page:Vector3 vector] — vector to unproject.<br />
+		[page:Camera camera] — camera to use in the projection.<br />
+		</div>
+		<div>
+		Unprojects a vector with the camera. Caution, this method changes 'vector'. 
+		</div>
+		
 		<h3>.pickingRay( [page:Vector3 vector], [page:Camera camera] ) [page:Raycaster]</h3>
 		<div>
 		Translates a 2D point from NDC (<em>Normalized Device Coordinates</em>) to a [page:Raycaster] that can be used for picking. NDC range from [-1..1] in x (left to right) and [1.0 .. -1.0] in y (top to bottom).

+ 58 - 5
docs/api/core/Raycaster.html

@@ -9,24 +9,77 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">
+		This class makes raycasting easier. Raycasting is used for picking and more.
+			
+		</div>
 
 
 		<h2>Constructor</h2>
 
-		<h3>[name]()</h3>
+		<h3>[name]( [page:Vector3 origin], [page:Vector3 direction], [page:Float near], [page:Float far] ) {</h3>
+		<div>
+		[page:Vector3 origin] — The origin vector where the ray casts from.<br />
+		[page:Vector3 direction] — The direction vector that  gives direction to the ray.<br />
+		[page:Float near] — All results returned are further away then near. Near can't be negative. Default value is 0.<br />
+		[page:Float far] — All results returned are closer then far. Far can't be lower then near . Default value is Infinity.
+		</div>
+		<div>
+		This creates a new raycaster object.<br />
+		</div>
 
 
 		<h2>Properties</h2>
 
-		<h3>.[page:Vector3 todo]</h3>
+		<h3>.[page:Ray ray]</h3>
+		<div>
+		The Ray used for the raycasting.
+		</div>
+
+		<h3>.[page:float near]</h3>
+		<div>
+		The near factor of the raycaster. This value indicates which objects can be discarded based on the distance.<br />
+		This value shouldn't be negative and should be smaller then the far property. 
+		</div>
 
+		<h3>.[page:float far]</h3>
+		<div>
+		The far factor of the raycaster. This value indicates which objects can be discarded based on the distance.<br />
+		This value shouldn't be negative and should be smaller then the far property. 
+		</div>
+
+		<h3>.[page:float precision]</h3>
+		<div>
+		The precision factor of the raycaster. 
+		</div>
 
 		<h2>Methods</h2>
 
-		<h3>.todo( [page:Vector3 todo] )</h3>
+		<h3>.set( [page:Vector3 origin], [page:Vector3 direction] )</h3>
+		<div>
+		[page:Vector3 origin] — The origin vector where the ray casts from.<br />
+		[page:Vector3 direction] — The direction vector that  gives direction to the ray.
+		</div>
+		<div>
+		Updates the ray with a new origin and direction.
+		</div>
+
+		<h3>.intersectObject( [page:Object3D object], [page:Boolean recursive] )</h3>
+		<div>
+		[page:Object3D object] — The object to check for intersection with the ray.<br />
+		[page:Boolean recursive] — If set, it also checks all descendants. Otherwise it only checks intersecton with the object.
+		</div>
+		<div>
+		checks all intersection between the ray and the object with or without the descendants.
+		</div>
+
+		<h3>.intersectObjects( [page:Array objects], [page:Boolean recursive] )</h3>
+		<div>
+		[page:Array objects] — The objects to check for intersection with the ray.<br />
+		[page:Boolean recursive] — If set, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects.
+		</div>
 		<div>
-		todo — todo<br />
+		checks all intersection between the ray and the objects with or without the descendants.
 		</div>
 
 

+ 7 - 0
docs/api/lights/AmbientLight.html

@@ -24,6 +24,13 @@ scene.add( light );</code>
 		<h2>Constructor</h2>
 
 		<h3>[name]( [page:Float hex] )</h3>
+		<div>
+		[page:Integer hex] — Numeric value of the RGB component of the color.
+		</div>
+		<div>
+		This creates a Ambientlight with a color.
+		</div>
+		
 
 
 		<h2>Source</h2>

+ 9 - 1
docs/api/lights/Light.html

@@ -17,12 +17,20 @@
 		<h2>Constructor</h2>
 
 		<h3>[name]( [page:Integer hex] )</h3>
+		<div>
+		[page:Integer hex] — Numeric value of the RGB component of the color.
+		</div>
+		<div>
+		This creates a light with color.<br />
+		</div>
 
 
 		<h2>Properties</h2>
 
 		<h3>.[page:Color color]</h3>
-
+		<div>
+		Color of the light.<br />
+		</div>
 
 		<h2>Source</h2>