CircleGeometry.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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:Geometry] &rarr;
  11. <h1>[name]</h1>
  12. <div class="desc">CircleGeometry is a simple shape of Euclidean geometry. It is contructed from a number of triangular segments that are oriented around a central point and extend as far out as a given radius. It is built counter-clockwise from a start angle and a given central angle. It can also be used to create regular polygons, where the number of segments determines the number of sides.
  13. </div>
  14. <h2>Example</h2>
  15. <code>var material = new THREE.MeshBasicMaterial({
  16. color: 0x0000ff
  17. });
  18. var radius = 5;
  19. var segments = 32;
  20. var circleGeometry = new THREE.CircleGeometry( radius, segments );
  21. var circle = new THREE.Mesh( circleGeometry, material );
  22. scene.add( circle );
  23. </code>
  24. <h2>Constructor</h2>
  25. <h3>[name]([page:Float radius], [page:Integer segments], [page:Float thetaStart], [page:Float thetaLength])</h3>
  26. <div>
  27. radius — Radius of the circle, default = 50.<br />
  28. segments — Number of segments (triangles), minimum = 3, default = 8.<br />
  29. thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
  30. thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete circle.
  31. </div>
  32. <h2>Source</h2>
  33. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  34. </body>
  35. </html>