فهرست منبع

Completed half of curve documentation

Greg Tatum 10 سال پیش
والد
کامیت
76ecc66174

+ 2 - 30
docs/api/extras/curves/ArcCurve.html

@@ -11,38 +11,10 @@
 		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
-
-		<h2>Example</h2>
-
-		<code>todo</code>
-
-		<h2>Constructor</h2>
-
-
-		<h3>todo</h3>
-		<div></div>
-
-
-		<h2>Properties</h2>
-
-		<h3>todo</h3>
-		<div>
-		todo
-		</div> 
-
-
-		<h2>Methods</h2>
-		
-
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
+		<div class="desc">Alias for [page:EllipseCurve]</div>
 		
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 	</body>
-</html>
+</html>

+ 20 - 17
docs/api/extras/curves/ClosedSplineCurve3.html

@@ -11,38 +11,41 @@
 		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">Create a smooth 3d spline curve from a series of points that loops back onto itself</div>
 
 		<h2>Example</h2>
 
-		<code>todo</code>
+<code>
+//Create a closed wavey loop
+var curve = new THREE.ClosedSplineCurve3([
+	new THREE.Vector3(-10, 0, 10),
+	new THREE.Vector3(-5,  5, 5),
+	new THREE.Vector3( 0,  0, 0),
+	new THREE.Vector3( 5, -5, 5),
+	new THREE.Vector3(10,  0, 10)
+]);
+
+var geometry = new THREE.Geometry();
+geometry.vertices = curve.getPoints(50);
+
+var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
+</code>
 
 		<h2>Constructor</h2>
 
 
-		<h3>todo</h3>
-		<div></div>
+		<h3>[name]([page:Array points])</h3>
+		<div>points – An array of [page:Vector3] points</div>
 
 
 		<h2>Properties</h2>
 
-		<h3>todo</h3>
-		<div>
-		todo
-		</div> 
-
+		<h3>.[page:Array points]</h3>
 
 		<h2>Methods</h2>
 		
-
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
+		<h3>See [page:Curve] for inherited methods</h3>
 		
-		<h2>Source</h2>
-
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 	</body>
 </html>

+ 36 - 15
docs/api/extras/curves/EllipseCurve.html

@@ -11,35 +11,56 @@
 		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">Creates a 2d curve in the shape of an ellipse.</div>
 
 		<h2>Example</h2>
 
-		<code>todo</code>
+<code>
+var curve = new THREE.EllipseCurve(
+	0,  0,            // ax, aY
+	10, 10,           // xRadius, yRadius
+	0,  2 * Math.PI,  // aStartAngle, aEndAngle
+	false             // aClockwise
+);
+
+var path = new THREE.Path( curve.getPoints(50) );
+var geometry = path.createPointsGeometry( 50 );
+var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
+
+//Create the final Object3d to add to the scene
+var ellipse = new THREE.Line( geometry, material );
+</code>
 
 		<h2>Constructor</h2>
 
 
-		<h3>todo</h3>
-		<div></div>
+		<h3>[name]([page:Float aX], [page:Float aY], [page:Float xRadius], [page:Float yRadius], [page:Radians aStartAngle], [page:Radians aEndAngle], [page:Boolean aClockwise])</h3>
+		<div>
+			aX – The X center of the ellipse<br/>
+			aY – The Y center of the ellipse<br/>
+			xRadius – The radius of the ellipse in the x direction<br/>
+			yRadius – The radius of the ellipse in the y direction<br/>
+			aStartAngle – The start angle of the curve in radians starting from the middle right side<br/>
+			aEndAngle – The end angle of the curve in radians starting from the middle right side<br/>
+			aClockwise – Whether the ellipse is clockwise<br/><br/>
+			
+			<strong>Note:</strong> When going clockwise it's best to set the start angle to (Math.PI * 2) and then work towards lower numbers.
+		</div>
 
 
 		<h2>Properties</h2>
 
-		<h3>todo</h3>
-		<div>
-		todo
-		</div> 
-
+		<h3>.[page:Float aX]</h3>
+		<h3>.[page:Float aY]</h3>
+		<h3>.[page:Radians xRadius]</h3>
+		<h3>.[page:Radians yRadius]</h3>
+		<h3>.[page:Float aStartAngle]</h3>
+		<h3>.[page:Float aEndAngle]</h3>
+		<h3>.[page:Boolean aClockwise]</h3>
 
 		<h2>Methods</h2>
 		
-
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
+		<h3>See [page:Curve] for inherited methods</h3>
 		
 		<h2>Source</h2>
 

+ 10 - 17
docs/api/extras/curves/LineCurve.html

@@ -8,38 +8,31 @@
 	</head>
 	<body>
 		[page:Curve] &rarr;
-		
+			
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
-
-		<h2>Example</h2>
-
-		<code>todo</code>
+		<div class="desc">A curve representing a 2d line segment</div>
 
 		<h2>Constructor</h2>
 
 
-		<h3>todo</h3>
-		<div></div>
+		<h3>[name]([page:Vector2 v1], [page:Vector2 v2])</h3>
+		<div>
+			v1 – The start point<br/>
+			v2 - The end point
+		</div>
 
 
 		<h2>Properties</h2>
 
-		<h3>todo</h3>
-		<div>
-		todo
-		</div> 
+		<h3>.[page:Vector2 v1]</h3>
+		<h3>.[page:Vector2 v2]</h3>
 
 
 		<h2>Methods</h2>
 		
+		<h3>See [page:Curve] for inherited methods</h3>
 
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
 		
 		<h2>Source</h2>
 

+ 10 - 18
docs/api/extras/curves/LineCurve3.html

@@ -8,38 +8,30 @@
 	</head>
 	<body>
 		[page:Curve] &rarr;
-		
+			
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
-
-		<h2>Example</h2>
-
-		<code>todo</code>
+		<div class="desc">A curve representing a 3d line segment</div>
 
 		<h2>Constructor</h2>
 
 
-		<h3>todo</h3>
-		<div></div>
+		<h3>[name]([page:Vector3 v1], [page:Vector3 v2])</h3>
+		<div>
+			v1 – The start point<br/>
+			v2 - The end point
+		</div>
 
 
 		<h2>Properties</h2>
 
-		<h3>todo</h3>
-		<div>
-		todo
-		</div> 
+		<h3>.[page:Vector3 v1]</h3>
+		<h3>.[page:Vector3 v2]</h3>
 
 
 		<h2>Methods</h2>
 		
-
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
+		<h3>See [page:Curve] for inherited methods</h3>
 		
 		<h2>Source</h2>
 

+ 22 - 15
docs/api/extras/curves/SplineCurve.html

@@ -11,35 +11,42 @@
 		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">Create a smooth 2d spline curve from a series of points</div>
 
 		<h2>Example</h2>
 
-		<code>todo</code>
+<code>
+//Create a sine-like wave
+var curve = new THREE.SplineCurve([
+	new THREE.Vector2(-10, 0),
+	new THREE.Vector2(-5, 5),
+	new THREE.Vector2( 0, 0),
+	new THREE.Vector2( 5, -5),
+	new THREE.Vector2(10, 0)
+]);
+
+var path = new THREE.Path( curve.getPoints(50) );
+
+var geometry = path.createPointsGeometry( 50 );
+var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
+
+var object3d = new THREE.Line( geometry, material );
+</code>
 
 		<h2>Constructor</h2>
 
 
-		<h3>todo</h3>
-		<div></div>
+		<h3>[name]([page:Array points])</h3>
+		<div>points – An array of [page:Vector2] points</div>
 
 
 		<h2>Properties</h2>
 
-		<h3>todo</h3>
-		<div>
-		todo
-		</div> 
-
+		<h3>.[page:Array points]</h3>
 
 		<h2>Methods</h2>
 		
-
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
+		<h3>See [page:Curve] for inherited methods</h3>
 		
 		<h2>Source</h2>
 

+ 20 - 17
docs/api/extras/curves/SplineCurve3.html

@@ -11,38 +11,41 @@
 		
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">Create a smooth 3d spline curve from a series of points</div>
 
 		<h2>Example</h2>
 
-		<code>todo</code>
+<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 } );
+</code>
 
 		<h2>Constructor</h2>
 
 
-		<h3>todo</h3>
-		<div></div>
+		<h3>[name]([page:Array points])</h3>
+		<div>points – An array of [page:Vector3] points</div>
 
 
 		<h2>Properties</h2>
 
-		<h3>todo</h3>
-		<div>
-		todo
-		</div> 
-
+		<h3>.[page:Array points]</h3>
 
 		<h2>Methods</h2>
 		
-
-		<h3>todo</h3>
-		<div>todo</div>
-		<div>
-		todo
-		</div>
+		<h3>See [page:Curve] for inherited methods</h3>
 		
-		<h2>Source</h2>
-
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 	</body>
 </html>