CylinderGeometry.html 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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">A class for generating cylinder geometries</div>
  13. <h2>Example</h2>
  14. <code>var geometry = new THREE.CylinderGeometry( 5, 5, 20, 32 );
  15. var material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
  16. var cylinder = new THREE.Mesh( geometry, material );
  17. scene.add( cylinder );
  18. </code>
  19. <h2>Constructor</h2>
  20. <h3>[name]([page:Float radiusTop], [page:Float radiusBottom], [page:Float height], [page:Integer radiusSegments], [page:Integer heightSegments], [page:Boolean openEnded], [page:Float thetaStart], [page:Float thetaLength])</h3>
  21. <div>
  22. radiusTop — Radius of the cylinder at the top. Default is 20.<br />
  23. radiusBottom — Radius of the cylinder at the bottom. Default is 20.<br />
  24. height — Height of the cylinder. Default is 100.<br />
  25. radiusSegments — Number of segmented faces around the circumference of the cylinder. Default is 8<br />
  26. heightSegments — Number of rows of faces along the height of the cylinder. Default is 1.<br />
  27. openEnded — A Boolean indicating whether the ends of the cylinder are open or capped. Default is false, meaning capped.<br />
  28. thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
  29. thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cylinder.
  30. </div>
  31. <h2>Properties</h2>
  32. <div>
  33. Each of the constructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
  34. </div>
  35. <h2>Source</h2>
  36. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  37. </body>
  38. </html>