EllipseCurve.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Curve] &rarr;
  12. <h1>[name]</h1>
  13. <p class="desc">
  14. Creates a 2d curve in the shape of an ellipse. Setting the
  15. [page:Number xRadius] equal to the [page:Number yRadius] will result in a circle.
  16. </p>
  17. <h2>Example</h2>
  18. <code>
  19. var curve = new THREE.EllipseCurve(
  20. 0, 0, // ax, aY
  21. 10, 10, // xRadius, yRadius
  22. 0, 2 * Math.PI, // aStartAngle, aEndAngle
  23. false, // aClockwise
  24. 0 // aRotation
  25. );
  26. var points = curve.getPoints( 50 );
  27. var geometry = new THREE.BufferGeometry().setFromPoints( points );
  28. var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
  29. // Create the final object to add to the scene
  30. var ellipse = new THREE.Line( geometry, material );
  31. </code>
  32. <h2>Constructor</h2>
  33. <h3>[name]( [param:Float aX], [param:Float aY], [param:Float xRadius], [param:Float yRadius], [param:Radians aStartAngle], [param:Radians aEndAngle], [param:Boolean aClockwise], [param:Radians aRotation] )</h3>
  34. <p>
  35. [page:Float aX] – The X center of the ellipse. Default is *0*.<br/>
  36. [page:Float aY] – The Y center of the ellipse. Default is *0*.<br/>
  37. [page:Float xRadius] – The radius of the ellipse in the x direction. Default is *1*.<br/>
  38. [page:Float yRadius] – The radius of the ellipse in the y direction. Default is *1*.<br/>
  39. [page:Radians aStartAngle] – The start angle of the curve in radians starting from the middle right side. Default is *0*.<br/>
  40. [page:Radians aEndAngle] – The end angle of the curve in radians starting from the middle right side. Default is *2 x Math.PI*.<br/>
  41. [page:Boolean aClockwise] – Whether the ellipse is drawn clockwise. Default is *false*.<br/>
  42. [page:Radians aRotation] – The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional). Default is *0*.<br/><br/>
  43. <em>Note:</em> When going clockwise it's best to set the start angle to (Math.PI * 2) and then work towards lower numbers.
  44. </p>
  45. <h2>Properties</h2>
  46. <p>See the base [page:Curve] class for common properties.</p>
  47. <h3>[property:Boolean isEllipseCurve]</h3>
  48. <p>
  49. Used to check whether this or derived classes are EllipseCurves. Default is *true*.<br /><br />
  50. You should not change this, as it used internally for optimisation.
  51. </p>
  52. <h3>[property:Float aX]</h3>
  53. <p>The X center of the ellipse.</p>
  54. <h3>[property:Float aY]</h3>
  55. <p>The Y center of the ellipse.</p>
  56. <h3>[property:Radians xRadius]</h3>
  57. <p>The radius of the ellipse in the x direction.</p>
  58. <h3>[property:Radians yRadius]</h3>
  59. <p>The radius of the ellipse in the y direction.</p>
  60. <h3>[property:Float aStartAngle]</h3>
  61. <p>The start angle of the curve in radians starting from the middle right side.</p>
  62. <h3>[property:Float aEndAngle]</h3>
  63. <p>The end angle of the curve in radians starting from the middle right side.</p>
  64. <h3>[property:Boolean aClockwise]</h3>
  65. <p>Whether the ellipse is drawn clockwise.</p>
  66. <h3>[property:Float aRotation]</h3>
  67. <p>The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional). Default is *0*.</p>
  68. <h2>Methods</h2>
  69. <p>See the base [page:Curve] class for common methods.</p>
  70. <h2>Source</h2>
  71. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  72. </body>
  73. </html>