| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>EllipseCurve - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <p class="inheritance" translate="no"><a href="Curve.html">Curve</a> → </p>
- <h1 translate="no">EllipseCurve</h1>
- <section>
- <header>
- <div class="class-description"><p>A curve representing an ellipse.</p></div>
- <h2>Code Example</h2>
- <div translate="no"><pre><code class="language-js">const curve = new THREE.EllipseCurve(
- 0, 0,
- 10, 10,
- 0, 2 * Math.PI,
- false,
- 0
- );
- const points = curve.getPoints( 50 );
- const geometry = new THREE.BufferGeometry().setFromPoints( points );
- const material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
- // Create the final object to add to the scene
- const ellipse = new THREE.Line( geometry, material );
- </code></pre></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="EllipseCurve" translate="no">new <a href="#EllipseCurve">EllipseCurve</a><span class="signature">( aX : <span class="param-type">number</span>, aY : <span class="param-type">number</span>, xRadius : <span class="param-type">number</span>, yRadius : <span class="param-type">number</span>, aStartAngle : <span class="param-type">number</span>, aEndAngle : <span class="param-type">number</span>, aClockwise : <span class="param-type">boolean</span>, aRotation : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new ellipse curve.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>aX</strong>
- </td>
- <td class="description last">
- <p>The X center of the ellipse.</p>
- <p>Default is <code>0</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>aY</strong>
- </td>
- <td class="description last">
- <p>The Y center of the ellipse.</p>
- <p>Default is <code>0</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>xRadius</strong>
- </td>
- <td class="description last">
- <p>The radius of the ellipse in the x direction.</p>
- <p>Default is <code>1</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>yRadius</strong>
- </td>
- <td class="description last">
- <p>The radius of the ellipse in the y direction.</p>
- <p>Default is <code>1</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>aStartAngle</strong>
- </td>
- <td class="description last">
- <p>The start angle of the curve in radians starting from the positive X axis.</p>
- <p>Default is <code>0</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>aEndAngle</strong>
- </td>
- <td class="description last">
- <p>The end angle of the curve in radians starting from the positive X axis.</p>
- <p>Default is <code>Math.PI*2</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>aClockwise</strong>
- </td>
- <td class="description last">
- <p>Whether the ellipse is drawn clockwise or not.</p>
- <p>Default is <code>false</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>aRotation</strong>
- </td>
- <td class="description last">
- <p>The rotation angle of the ellipse in radians, counterclockwise from the positive X axis.</p>
- <p>Default is <code>0</code>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="aClockwise" translate="no">.<a href="#aClockwise">aClockwise</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>Whether the ellipse is drawn clockwise or not.</p>
- <p>Default is <code>false</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="aEndAngle" translate="no">.<a href="#aEndAngle">aEndAngle</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>The end angle of the curve in radians starting from the positive X axis.</p>
- <p>Default is <code>Math.PI*2</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="aRotation" translate="no">.<a href="#aRotation">aRotation</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>The rotation angle of the ellipse in radians, counterclockwise from the positive X axis.</p>
- <p>Default is <code>0</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="aStartAngle" translate="no">.<a href="#aStartAngle">aStartAngle</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>The start angle of the curve in radians starting from the positive X axis.</p>
- <p>Default is <code>0</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="aX" translate="no">.<a href="#aX">aX</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>The X center of the ellipse.</p>
- <p>Default is <code>0</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="aY" translate="no">.<a href="#aY">aY</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>The Y center of the ellipse.</p>
- <p>Default is <code>0</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="isEllipseCurve" translate="no">.<a href="#isEllipseCurve">isEllipseCurve</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
- <div class="description">
- <p>This flag can be used for type testing.</p>
- <p>Default is <code>true</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="xRadius" translate="no">.<a href="#xRadius">xRadius</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>The radius of the ellipse in the x direction.
- Setting the this value equal to the <a href="EllipseCurve.html#yRadius">EllipseCurve#yRadius</a> will result in a circle.</p>
- <p>Default is <code>1</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="yRadius" translate="no">.<a href="#yRadius">yRadius</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>The radius of the ellipse in the y direction.
- Setting the this value equal to the <a href="EllipseCurve.html#xRadius">EllipseCurve#xRadius</a> will result in a circle.</p>
- <p>Default is <code>1</code>.</p>
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <h3 class="name name-method" id="getPoint" translate="no">.<a href="#getPoint">getPoint</a><span class="signature">( t : <span class="param-type">number</span>, optionalTarget : <span class="param-type"><a href="Vector2.html">Vector2</a></span> )</span><span class="type-signature"> : <a href="Vector2.html">Vector2</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>Returns a point on the curve.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>t</strong>
- </td>
- <td class="description last">
- <p>A interpolation factor representing a position on the curve. Must be in the range <code>[0,1]</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>optionalTarget</strong>
- </td>
- <td class="description last">
- <p>The optional target vector the result is written to.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Curve.html#getPoint">Curve#getPoint</a></dt>
- </dl>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The position on the curve.</dt>
- </dl>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/src/extras/curves/EllipseCurve.js" translate="no" target="_blank" rel="noopener">src/extras/curves/EllipseCurve.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|