Procházet zdrojové kódy

Add rotation angle to THREE.EllipseCurve and THREE.Path docs

neko před 10 roky
rodič
revize
e429d85dae

+ 4 - 2
docs/api/extras/core/Path.html

@@ -81,7 +81,7 @@
 		</div>
 		<div>Draw an arc absolutely positioned</div>
 
-		<h3>[method:null ellipse]( [page:Float x], [page:Float y], [page:Float xRadius], [page:Float yRadius], [page:Float startAngle], [page:Float endAngle], [page:Float clockwise] )</h3>
+		<h3>[method:null ellipse]( [page:Float x], [page:Float y], [page:Float xRadius], [page:Float yRadius], [page:Float startAngle], [page:Float endAngle], [page:Float clockwise], [page:Float rotation] )</h3>
 		<div>
 		x, y -- The center of the ellipse offset from the last call
 		xRadius -- The radius of the ellipse in the x axis
@@ -89,10 +89,11 @@
 		startAngle -- The start angle in radians
 		endAngle -- The end angle in radians
 		clockwise -- Sweep the ellipse clockwise. Defaults to false
+		rotation -- The rotation angle of the ellipse in radians, counterclockwise from the positive X axis. Optional, defaults to 0
 		</div>
 		<div>Draw an ellipse offset from the last call</div>
 
-		<h3>[method:null absellipse]( [page:Float x], [page:Float y], [page:Float xRadius], [page:Float yRadius], [page:Float startAngle], [page:Float endAngle], [page:Float clockwise] )</h3>
+		<h3>[method:null absellipse]( [page:Float x], [page:Float y], [page:Float xRadius], [page:Float yRadius], [page:Float startAngle], [page:Float endAngle], [page:Float clockwise], [page:Float rotation] )</h3>
 		<div>
 		x, y -- The absolute center of the ellipse
 		xRadius -- The radius of the ellipse in the x axis
@@ -100,6 +101,7 @@
 		startAngle -- The start angle in radians
 		endAngle -- The end angle in radians
 		clockwise -- Sweep the ellipse clockwise. Defaults to false
+		rotation -- The rotation angle of the ellipse in radians, counterclockwise from the positive X axis. Optional, defaults to 0
 		</div>
 		<div>Draw an ellipse absolutely positioned</div>
 

+ 6 - 3
docs/api/extras/curves/EllipseCurve.html

@@ -21,7 +21,8 @@ var curve = new THREE.EllipseCurve(
 	0,  0,            // ax, aY
 	10, 10,           // xRadius, yRadius
 	0,  2 * Math.PI,  // aStartAngle, aEndAngle
-	false             // aClockwise
+	false,            // aClockwise
+	0                 // aRotation 
 );
 
 var path = new THREE.Path( curve.getPoints( 50 ) );
@@ -35,7 +36,7 @@ var ellipse = new THREE.Line( geometry, material );
 		<h2>Constructor</h2>
 
 
-		<h3>[name]( [page:Float aX], [page:Float aY], [page:Float xRadius], [page:Float yRadius], [page:Radians aStartAngle], [page:Radians aEndAngle], [page:Boolean aClockwise] )</h3>
+		<h3>[name]( [page:Float aX], [page:Float aY], [page:Float xRadius], [page:Float yRadius], [page:Radians aStartAngle], [page:Radians aEndAngle], [page:Boolean aClockwise], [page:Radians aRotation] )</h3>
 		<div>
 			aX – The X center of the ellipse<br/>
 			aY – The Y center of the ellipse<br/>
@@ -43,7 +44,8 @@ var ellipse = new THREE.Line( geometry, material );
 			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/>
+			aClockwise – Whether the ellipse is clockwise<br/>
+			aRotation – The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional)<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>
@@ -58,6 +60,7 @@ var ellipse = new THREE.Line( geometry, material );
 		<h3>[property:Float aStartAngle]</h3>
 		<h3>[property:Float aEndAngle]</h3>
 		<h3>[property:Boolean aClockwise]</h3>
+		<h3>[property:Float aRotation]</h3>
 
 		<h2>Methods</h2>