123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <base href="../../../" />
- <script src="list.js"></script>
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- [page:Curve] →
- <h1>[name]</h1>
- <div class="desc">
- Creates a 2d curve in the shape of an ellipse. Setting the
- [page:Number xRadius] equal to the [page:Number yRadius] will result in a circle.
- </div>
- <h2>Example</h2>
- <code>
- var curve = new THREE.EllipseCurve(
- 0, 0, // ax, aY
- 10, 10, // xRadius, yRadius
- 0, 2 * Math.PI, // aStartAngle, aEndAngle
- false, // aClockwise
- 0 // aRotation
- );
- var points = curve.getPoints( 50 );
- var geometry = new THREE.BufferGeometry().setFromPoints( points );
- var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
- // Create the final object to add to the scene
- var ellipse = new THREE.Line( geometry, material );
- </code>
- <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], [page:Radians aRotation] )</h3>
- <div>
- [page:Float aX] – The X center of the ellipse.<br/>
- [page:Float aY] – The Y center of the ellipse.<br/>
- [page:Float xRadius] – The radius of the ellipse in the x direction.<br/>
- [page:Float yRadius] – The radius of the ellipse in the y direction.<br/>
- [page:Radians aStartAngle] – The start angle of the curve in radians starting from the middle right side.<br/>
- [page:Radians aEndAngle] – The end angle of the curve in radians starting from the middle right side.<br/>
- [page:Boolean aClockwise] – Whether the ellipse is drawn clockwise.<br/>
- [page:Radians aRotation] – The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional). Default is *0*.<br/><br/>
- <em>Note:</em> 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>
- <div>See the base [page:Curve] class for common properties.</div>
- <h3>[property:Boolean isEllipseCurve]</h3>
- <div>
- Used to check whether this or derived classes are EllipseCurves. Default is *true*.<br /><br />
- You should not change this, as it used internally for optimisation.
- </div>
- <h3>[property:Float aX]</h3>
- <div>The X center of the ellipse.</div>
- <h3>[property:Float aY]</h3>
- <div>The Y center of the ellipse.</div>
- <h3>[property:Radians xRadius]</h3>
- <div>The radius of the ellipse in the x direction.</div>
- <h3>[property:Radians yRadius]</h3>
- <div>The radius of the ellipse in the y direction.</div>
- <h3>[property:Float aStartAngle]</h3>
- <div>The start angle of the curve in radians starting from the middle right side.</div>
- <h3>[property:Float aEndAngle]</h3>
- <div>The end angle of the curve in radians starting from the middle right side.</div>
- <h3>[property:Boolean aClockwise]</h3>
- <div>Whether the ellipse is drawn clockwise.</div>
- <h3>[property:Float aRotation]</h3>
- <div>The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional). Default is *0*.</div>
- <h3>[property:Boolean isEllipseCurve]</h3>
- <div>
- Used to check whether this or derived classes are ellipses. Default is *true*.<br /><br />
- You should not change this, as it used internally for optimisation.
- </div>
- <h2>Methods</h2>
- <div>See the base [page:Curve] class for common methods.</div>
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- </body>
- </html>
|