EllipseCurve.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. <div class="desc">Creates a 2d curve in the shape of an ellipse.</div>
  14. <h2>Example</h2>
  15. <code>
  16. var curve = new THREE.EllipseCurve(
  17. 0, 0, // ax, aY
  18. 10, 10, // xRadius, yRadius
  19. 0, 2 * Math.PI, // aStartAngle, aEndAngle
  20. false, // aClockwise
  21. 0 // aRotation
  22. );
  23. var path = new THREE.Path( curve.getPoints( 50 ) );
  24. var geometry = path.createPointsGeometry( 50 );
  25. var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
  26. // Create the final Object3d to add to the scene
  27. var ellipse = new THREE.Line( geometry, material );
  28. </code>
  29. <h2>Constructor</h2>
  30. <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>
  31. <div>
  32. aX – The X center of the ellipse<br/>
  33. aY – The Y center of the ellipse<br/>
  34. xRadius – The radius of the ellipse in the x direction<br/>
  35. yRadius – The radius of the ellipse in the y direction<br/>
  36. aStartAngle – The start angle of the curve in radians starting from the middle right side<br/>
  37. aEndAngle – The end angle of the curve in radians starting from the middle right side<br/>
  38. aClockwise – Whether the ellipse is clockwise<br/>
  39. aRotation – The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional)<br/><br/>
  40. <strong>Note:</strong> When going clockwise it's best to set the start angle to (Math.PI * 2) and then work towards lower numbers.
  41. </div>
  42. <h2>Properties</h2>
  43. <h3>[property:Float aX]</h3>
  44. <h3>[property:Float aY]</h3>
  45. <h3>[property:Radians xRadius]</h3>
  46. <h3>[property:Radians yRadius]</h3>
  47. <h3>[property:Float aStartAngle]</h3>
  48. <h3>[property:Float aEndAngle]</h3>
  49. <h3>[property:Boolean aClockwise]</h3>
  50. <h3>[property:Float aRotation]</h3>
  51. <h2>Methods</h2>
  52. <h3>See [page:Curve] for inherited methods</h3>
  53. <h2>Source</h2>
  54. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  55. </body>
  56. </html>