CircleBufferGeometry.html 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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:BufferGeometry] &rarr;
  12. <h1>[name]</h1>
  13. <p class="desc">This is the [page:BufferGeometry] port of [page:CircleGeometry].</p>
  14. <iframe id="scene" src="scenes/geometry-browser.html#CircleBufferGeometry"></iframe>
  15. <script>
  16. // iOS iframe auto-resize workaround
  17. if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
  18. var scene = document.getElementById( 'scene' );
  19. scene.style.width = getComputedStyle( scene ).width;
  20. scene.style.height = getComputedStyle( scene ).height;
  21. scene.setAttribute( 'scrolling', 'no' );
  22. }
  23. </script>
  24. <h2>Example</h2>
  25. <code>
  26. var geometry = new THREE.CircleBufferGeometry( 5, 32 );
  27. var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
  28. var circle = new THREE.Mesh( geometry, material );
  29. scene.add( circle );
  30. </code>
  31. <h2>Constructor</h2>
  32. <h3>[name]([param:Float radius], [param:Integer segments], [param:Float thetaStart], [param:Float thetaLength])</h3>
  33. <p>
  34. radius — Radius of the circle, default = 1.<br />
  35. segments — Number of segments (triangles), minimum = 3, default = 8.<br />
  36. thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
  37. thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete circle.
  38. </p>
  39. <h2>Properties</h2>
  40. <h3>[property:Object parameters]</h3>
  41. <p>
  42. An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
  43. </p>
  44. <h2>Source</h2>
  45. [link:https://github.com/mrdoob/three.js/blob/master/src/geometries/CircleGeometry.js src/geometries/CircleGeometry.js]
  46. </body>
  47. </html>