Browse Source

Completed geometry doc todos

Greg Tatum 10 years ago
parent
commit
69f8879a7e

+ 39 - 0
docs/api/extras/geometries/DodecahedronGeometry.html

@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="utf-8" />
+		<script src="../../../list.js"></script>
+		<script src="../../../page.js"></script>
+		<link type="text/css" rel="stylesheet" href="../../../page.css" />
+	</head>
+	<body>
+		[page:PolyhedronGeometry] &rarr;
+	
+		<h1>[name]</h1>
+
+		<div class="desc">A class for generating a dodecahedron geometries.</div>
+
+
+		<h2>Constructor</h2>
+
+
+		<h3>[name]([page:Float radius], [page:Integer detail])</h3>
+		<div>
+		radius — Radius of the dodecahedron. Default is 1.<br />
+		detail — Default is 0. Setting this to a value greater than 0 adds vertices making it no longer a dodecahedron.
+		</div>
+
+
+		<h2>Properties</h2>
+
+		<h3>.[page:Object parameters]</h3>
+		<div>
+		An object with all of the parameters that were used to generate the geometry.
+		</div> 
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 3 - 3
docs/api/extras/geometries/IcosahedronGeometry.html

@@ -25,10 +25,10 @@
 
 		<h2>Properties</h2>
 
-
+		<h3>.[page:Object parameters]</h3>
 		<div>
-		Each of the contructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
-		</div>
+		An object with all of the parameters that were used to generate the geometry.
+		</div> 
 
 
 		<h2>Source</h2>

+ 8 - 4
docs/api/extras/geometries/OctahedronGeometry.html

@@ -8,10 +8,9 @@
 	</head>
 	<body>
 		[page:PolyhedronGeometry] &rarr;
-		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">A class for generating an octahedron geometry.</div>
 
 
 		<h2>Constructor</h2>
@@ -22,9 +21,14 @@
 		radius — Radius of the octahedron. Default is 1.<br />
 		detail — Default is 0.  Setting this to a value greater than zero add vertices making it no longer an octahedron.
 		</div>
+
+
+		<h2>Properties</h2>
+		
+		<h3>.[page:Object parameters]</h3>
 		<div>
-		todo
-		</div>
+		An object with all of the parameters that were used to generate the geometry.
+		</div> 
 
 		<h2>Source</h2>
 

+ 5 - 8
docs/api/extras/geometries/ParametricGeometry.html

@@ -11,20 +11,17 @@
 		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">Generate geometry representing a parametric surface.</div>
 
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo func], [page:todo slices], [page:todo stacks])</h3>
+		<h3>[name]([page:Function func], [page:Integer slices], [page:Integer stacks])</h3>
 		<div>
-		func — todo <br />
-		slices — todo <br />
-		stacks — todo
-		</div>
-		<div>
-		todo
+		func — A function that takes in a [page:Float u] and [page:Float v] value each between 0 and 1 and returns a [page:Vector3]<br />
+		slices — The count of slices to use for the parametric function <br />
+		stacks — The count of stacks to use for the parametric function
 		</div>
 
 

+ 34 - 7
docs/api/extras/geometries/PolyhedronGeometry.html

@@ -11,22 +11,49 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">
+			A polyhedron is a solid in three dimensions with flat faces. This class will take an array of vertices,
+			project them onto a sphere, and then divide them up to the desired level of detail. This class is used
+			by [page:DodecahedronGeometry], [page:IcosahedronGeometry], [page:OctahedronGeometry],
+			and [page:TetrahedronGeometry] to generate their respective geometries.
+		</div>
 
+		<h2>Example</h2>
+<code>
+var verticesOfCube = [
+    -1,-1,-1,    1,-1,-1,    1, 1,-1,    -1, 1,-1,
+    -1,-1, 1,    1,-1, 1,    1, 1, 1,    -1, 1, 1,
+];
+
+var indicesOfFaces = [
+    2,1,0,    0,3,2,
+    0,4,7,    7,3,0,
+    0,1,5,    5,4,0,
+    1,2,6,    6,5,1,
+    2,3,7,    7,6,2,
+    4,5,6,    6,7,4
+];
+
+var geometry = new THREE.PolyhedronGeometry( verticesOfCube, indicesOfFaces, 6, 2 );
+</code>
 
 		<h2>Constructor</h2>
 
 
 		<h3>[name]([page:Array vertices], [page:Array faces], [page:Float radius], [page:Integer detail])</h3>
 		<div>
-		vertices — todo <br />
-		faces — todo <br />
-		radius — todo <br />
-		detail — todo
+		vertices — [page:Array] of points of the form [1,1,1, -1,-1,-1, ... ] <br />
+		faces — [page:Array] of indices that make up the faces of the form [0,1,2, 2,3,0, ... ] <br />
+		radius — [page:Float] - The radius of the final shape <br />
+		detail — [page:Integer] - How many levels to subdivide the geometry. The more detail, the smoother the shape.
 		</div>
+		
+		<h2>Properties</h2>
+		
+		<h3>.[page:Object parameters]</h3>
 		<div>
-		todo
-		</div>
+		An object with all of the parameters that were used to generate the geometry.
+		</div> 
 		
 
 		<h2>Source</h2>

+ 14 - 20
docs/api/extras/geometries/ShapeGeometry.html

@@ -11,7 +11,7 @@
 		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">Creates a one-sided polygonal geometry from one or more path shapes. Similar to [page:ExtrudeGeometry]</div>
 
 		<h2>Example</h2>
 		
@@ -36,42 +36,36 @@
 
 		<h3>[name]([page:Array shapes], [page:Object options])</h3>
 		<div>
-		shapes — todo <br />
-		options — 
+		shapes — [page:Array] of shapes, or a single [page:Shape shape] <br />
+		options — Optional options [page:Object object]
 		<ul>
-		<li>curveSegments - todo</li>
-		<li>material - todo</li>
-		<li>UVGenerator - todo</li>
+		<li>curveSegments - [page:Integer] - Not used at the moment - defaults to 12</li>
+		<li>material - [page:Integer] - index of the material in a material list</li>
+		<li>UVGenerator - A UV generator, defaults to [page:ExtrudeGeometry]'s WorldUVGenerator</li>
 		</ul>
 		</div>
-		<div>
-		todo
-		</div>
-
-
-		<h2>Properties</h2>
 
 
 		<h2>Methods</h2>
 
 
 
-		<h3>.addShapeList([page:todo shapes], [page:Object options]) [page:this]</h3>
+		<h3>.addShapeList([page:Array shapes], [page:Object options]) [page:this]</h3>
 		<div>
-		shapes — todo <br />
-		options — todo
+		shapes — [page:Array] of [page:Shape shapes] <br />
+		options — See options in constructor
 		</div>
 		<div>
-		todo
+		Adds a list of shapes to the geometry.
 		</div>
 
-		<h3>.addShape([page:todo shape], [page:Object options])</h3>
+		<h3>.addShape([page:Shape shape], [page:Object options])</h3>
 		<div>
-		shape — todo <br />
-		options — todo
+		shape — [page:Shape] <br />
+		options — See options in constructor
 		</div>
 		<div>
-		todo
+		Adds a single shape to the geometry
 		</div>
 
 		<h2>Source</h2>

+ 8 - 0
docs/api/extras/geometries/TetrahedronGeometry.html

@@ -24,6 +24,14 @@
 		</div>
 
 
+		<h2>Properties</h2>
+
+		<h3>.[page:Object parameters]</h3>
+		<div>
+		An object with all of the parameters that were used to generate the geometry.
+		</div> 
+
+
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 1 - 0
docs/list.js

@@ -184,6 +184,7 @@ var list = {
 			[ "CircleGeometry", "api/extras/geometries/CircleGeometry" ],
 			[ "CubeGeometry", "api/extras/geometries/CubeGeometry" ],
 			[ "CylinderGeometry", "api/extras/geometries/CylinderGeometry" ],
+			[ "DodecahedronGeometry", "api/extras/geometries/DodecahedronGeometry" ],
 			[ "ExtrudeGeometry", "api/extras/geometries/ExtrudeGeometry" ],
 			[ "IcosahedronGeometry", "api/extras/geometries/IcosahedronGeometry" ],
 			[ "LatheGeometry", "api/extras/geometries/LatheGeometry" ],