EllipseCurve.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../../list.js"></script>
  6. <script src="../../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../../page.css" />
  8. </head>
  9. <body>
  10. [page:Curve] &rarr;
  11. <h1>[name]</h1>
  12. <div class="desc">Creates a 2d curve in the shape of an ellipse.</div>
  13. <h2>Example</h2>
  14. <code>
  15. var curve = new THREE.EllipseCurve(
  16. 0, 0, // ax, aY
  17. 10, 10, // xRadius, yRadius
  18. 0, 2 * Math.PI, // aStartAngle, aEndAngle
  19. false // aClockwise
  20. );
  21. var path = new THREE.Path( curve.getPoints( 50 ) );
  22. var geometry = path.createPointsGeometry( 50 );
  23. var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
  24. // Create the final Object3d to add to the scene
  25. var ellipse = new THREE.Line( geometry, material );
  26. </code>
  27. <h2>Constructor</h2>
  28. <h3>[name]( [page:Float aX], [page:Float aY], [page:Float xRadius], [page:Float yRadius], [page:Radians aStartAngle], [page:Radians aEndAngle], [page:Boolean aClockwise] )</h3>
  29. <div>
  30. aX – The X center of the ellipse<br/>
  31. aY – The Y center of the ellipse<br/>
  32. xRadius – The radius of the ellipse in the x direction<br/>
  33. yRadius – The radius of the ellipse in the y direction<br/>
  34. aStartAngle – The start angle of the curve in radians starting from the middle right side<br/>
  35. aEndAngle – The end angle of the curve in radians starting from the middle right side<br/>
  36. aClockwise – Whether the ellipse is clockwise<br/><br/>
  37. <strong>Note:</strong> When going clockwise it's best to set the start angle to (Math.PI * 2) and then work towards lower numbers.
  38. </div>
  39. <h2>Properties</h2>
  40. <h3>[property:Float aX]</h3>
  41. <h3>[property:Float aY]</h3>
  42. <h3>[property:Radians xRadius]</h3>
  43. <h3>[property:Radians yRadius]</h3>
  44. <h3>[property:Float aStartAngle]</h3>
  45. <h3>[property:Float aEndAngle]</h3>
  46. <h3>[property:Boolean aClockwise]</h3>
  47. <h2>Methods</h2>
  48. <h3>See [page:Curve] for inherited methods</h3>
  49. <h2>Source</h2>
  50. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  51. </body>
  52. </html>