CylinderBufferGeometry.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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:CylinderGeometry].</p>
  14. <iframe id="scene" src="scenes/geometry-browser.html#CylinderBufferGeometry"></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>var geometry = new THREE.CylinderBufferGeometry( 5, 5, 20, 32 );
  26. var material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
  27. var cylinder = new THREE.Mesh( geometry, material );
  28. scene.add( cylinder );
  29. </code>
  30. <h2>Constructor</h2>
  31. <h3>[name]([param:Float radiusTop], [param:Float radiusBottom], [param:Float height], [param:Integer radialSegments], [param:Integer heightSegments], [param:Boolean openEnded], [param:Float thetaStart], [param:Float thetaLength])</h3>
  32. <p>
  33. radiusTop — Radius of the cylinder at the top. Default is 1.<br />
  34. radiusBottom — Radius of the cylinder at the bottom. Default is 1.<br />
  35. height — Height of the cylinder. Default is 1.<br />
  36. radialSegments — Number of segmented faces around the circumference of the cylinder. Default is 8<br />
  37. heightSegments — Number of rows of faces along the height of the cylinder. Default is 1.<br />
  38. openEnded — A Boolean indicating whether the ends of the cylinder are open or capped. Default is false, meaning capped.<br />
  39. thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
  40. thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cylinder.
  41. </p>
  42. <h2>Properties</h2>
  43. <h3>[property:Object parameters]</h3>
  44. <p>
  45. An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
  46. </p>
  47. <h2>Source</h2>
  48. [link:https://github.com/mrdoob/three.js/blob/master/src/geometries/CylinderGeometry.js src/geometries/CylinderGeometry.js]
  49. </body>
  50. </html>