PolyhedronGeometry.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>PolyhedronGeometry - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="BufferGeometry.html">BufferGeometry</a> → </p>
  13. <h1 translate="no">PolyhedronGeometry</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A polyhedron is a solid in three dimensions with flat faces. This class
  17. will take an array of vertices, project them onto a sphere, and then
  18. divide them up to the desired level of detail.</p></div>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <h2>Constructor</h2>
  23. <h3 class="name name-method" id="PolyhedronGeometry" translate="no">new <a href="#PolyhedronGeometry">PolyhedronGeometry</a><span class="signature">( vertices : <span class="param-type">Array.&lt;number></span>, indices : <span class="param-type">Array.&lt;number></span>, radius : <span class="param-type">number</span>, detail : <span class="param-type">number</span> )</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Constructs a new polyhedron geometry.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name"><code>vertices</code></td>
  32. <td class="description last"><p>A flat array of vertices describing the base shape.</p></td>
  33. </tr>
  34. <tr>
  35. <td class="name"><code>indices</code></td>
  36. <td class="description last"><p>A flat array of indices describing the base shape.</p></td>
  37. </tr>
  38. <tr>
  39. <td class="name"><code>radius</code></td>
  40. <td class="description last"><p>The radius of the shape.<br/>Default is <code>1</code>.</p></td>
  41. </tr>
  42. <tr>
  43. <td class="name"><code>detail</code></td>
  44. <td class="description last"><p>How many levels to subdivide the geometry. The more detail, the smoother the shape.<br/>Default is <code>0</code>.</p></td>
  45. </tr>
  46. </tbody>
  47. </table>
  48. </div>
  49. </div>
  50. <h2 class="subsection-title">Properties</h2>
  51. <div class="member">
  52. <h3 class="name" id="parameters" translate="no">.<a href="#parameters">parameters</a><span class="type-signature"> : Object</span> </h3>
  53. <div class="description">
  54. <p>Holds the constructor parameters that have been
  55. used to generate the geometry. Any modification
  56. after instantiation does not change the geometry.</p>
  57. </div>
  58. </div>
  59. <h2 class="subsection-title">Static Methods</h2>
  60. <h3 class="name name-method" id=".fromJSON" translate="no">.<a href="#.fromJSON">fromJSON</a><span class="signature">( data : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="PolyhedronGeometry.html">PolyhedronGeometry</a></span> </h3>
  61. <div class="method">
  62. <div class="description">
  63. <p>Factory method for creating an instance of this class from the given
  64. JSON object.</p>
  65. </div>
  66. <table class="params">
  67. <tbody>
  68. <tr>
  69. <td class="name"><code>data</code></td>
  70. <td class="description last"><p>A JSON object representing the serialized geometry.</p></td>
  71. </tr>
  72. </tbody>
  73. </table>
  74. <dl class="details">
  75. <dt class="tag-returns"><strong>Returns:</strong> A new instance.</dt>
  76. </dl>
  77. </div>
  78. <h2 class="subsection-title">Source</h2>
  79. <p>
  80. <a href="https://github.com/mrdoob/three.js/blob/master/src/geometries/PolyhedronGeometry.js" target="_blank" rel="noopener" translate="no">src/geometries/PolyhedronGeometry.js</a>
  81. </p>
  82. </article>
  83. </section>
  84. <script src="../scripts/linenumber.js"></script>
  85. <script src="../scripts/page.js"></script>
  86. </body>
  87. </html>
粤ICP备19079148号