ConeGeometry.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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:Geometry] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">A class for generating cone geometries</div>
  14. <h2>Example</h2>
  15. <iframe src='scenes/geometry-browser.html#ConeGeometry'></iframe>
  16. <code>var geometry = new THREE.ConeGeometry( 5, 20, 32 );
  17. var material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
  18. var cone = new THREE.Mesh( geometry, material );
  19. scene.add( cone );
  20. </code>
  21. <h2>Constructor</h2>
  22. <h3>[name]([page:Float radius], [page:Float height], [page:Integer radiusSegments], [page:Integer heightSegments], [page:Boolean openEnded], [page:Float thetaStart], [page:Float thetaLength])</h3>
  23. <div>
  24. radius — Radius of the cone at the base. Default is 20.<br />
  25. height — Height of the cone. Default is 100.<br />
  26. radiusSegments — Number of segmented faces around the circumference of the cone. Default is 8<br />
  27. heightSegments — Number of rows of faces along the height of the cone. Default is 1.<br />
  28. openEnded — A Boolean indicating whether the base of the cone is open or capped. Default is false, meaning capped.<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 cone.
  31. </div>
  32. <h2>Properties</h2>
  33. <div>
  34. 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.
  35. </div>
  36. <h2>Source</h2>
  37. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  38. </body>
  39. </html>