PolyhedronGeometry.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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">
  32. <strong>vertices</strong>
  33. </td>
  34. <td class="description last">
  35. <p>A flat array of vertices describing the base shape.</p>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td class="name">
  40. <strong>indices</strong>
  41. </td>
  42. <td class="description last">
  43. <p>A flat array of indices describing the base shape.</p>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td class="name">
  48. <strong>radius</strong>
  49. </td>
  50. <td class="description last">
  51. <p>The radius of the shape.</p>
  52. <p>Default is <code>1</code>.</p>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td class="name">
  57. <strong>detail</strong>
  58. </td>
  59. <td class="description last">
  60. <p>How many levels to subdivide the geometry. The more detail, the smoother the shape.</p>
  61. <p>Default is <code>0</code>.</p>
  62. </td>
  63. </tr>
  64. </tbody>
  65. </table>
  66. </div>
  67. </div>
  68. <h2 class="subsection-title">Properties</h2>
  69. <div class="member">
  70. <h3 class="name" id="parameters" translate="no">.<a href="#parameters">parameters</a><span class="type-signature"> : Object</span> </h3>
  71. <div class="description">
  72. <p>Holds the constructor parameters that have been
  73. used to generate the geometry. Any modification
  74. after instantiation does not change the geometry.</p>
  75. </div>
  76. </div>
  77. <h2 class="subsection-title">Static Methods</h2>
  78. <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>
  79. <div class="method">
  80. <div class="description">
  81. <p>Factory method for creating an instance of this class from the given
  82. JSON object.</p>
  83. </div>
  84. <table class="params">
  85. <tbody>
  86. <tr>
  87. <td class="name">
  88. <strong>data</strong>
  89. </td>
  90. <td class="description last">
  91. <p>A JSON object representing the serialized geometry.</p>
  92. </td>
  93. </tr>
  94. </tbody>
  95. </table>
  96. <dl class="details">
  97. <dt class="tag-returns"><strong>Returns:</strong> A new instance.</dt>
  98. </dl>
  99. </div>
  100. <h2 class="subsection-title">Source</h2>
  101. <p>
  102. <a href="https://github.com/mrdoob/three.js/blob/master/src/geometries/PolyhedronGeometry.js" translate="no" target="_blank" rel="noopener">src/geometries/PolyhedronGeometry.js</a>
  103. </p>
  104. </article>
  105. </section>
  106. <script src="../scripts/linenumber.js"></script>
  107. <script src="../scripts/page.js"></script>
  108. </body>
  109. </html>
粤ICP备19079148号