TessellateModifier.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>TessellateModifier - 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. <h1 translate="no">TessellateModifier</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>This class can be used to modify a geometry by breaking its edges if they
  16. are longer than maximum length.</p></div>
  17. <h2>Code Example</h2>
  18. <div translate="no"><pre><code class="language-js">const modifier = new TessellateModifier( 8, 6 );
  19. geometry = modifier.modify( geometry );
  20. </code></pre></div>
  21. </header>
  22. <article>
  23. <h2 class="subsection-title">Import</h2>
  24. <p><span translate="no">TessellateModifier</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
  25. <pre><code class="language-js">import { TessellateModifier } from 'three/addons/modifiers/TessellateModifier.js';</code></pre>
  26. <div class="container-overview">
  27. <h2>Constructor</h2>
  28. <h3 class="name name-method" id="TessellateModifier" translate="no">new <a href="#TessellateModifier">TessellateModifier</a><span class="signature">( maxEdgeLength : <span class="param-type">number</span>, maxIterations : <span class="param-type">number</span> )</span> </h3>
  29. <div class="method">
  30. <div class="description">
  31. <p>Constructs a new Tessellate modifier.</p>
  32. </div>
  33. <table class="params">
  34. <tbody>
  35. <tr>
  36. <td class="name">
  37. <strong>maxEdgeLength</strong>
  38. </td>
  39. <td class="description last">
  40. <p>The maximum edge length.</p>
  41. <p>Default is <code>0.1</code>.</p>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td class="name">
  46. <strong>maxIterations</strong>
  47. </td>
  48. <td class="description last">
  49. <p>The number of iterations.</p>
  50. <p>Default is <code>6</code>.</p>
  51. </td>
  52. </tr>
  53. </tbody>
  54. </table>
  55. </div>
  56. </div>
  57. <h2 class="subsection-title">Properties</h2>
  58. <div class="member">
  59. <h3 class="name" id="maxEdgeLength" translate="no">.<a href="#maxEdgeLength">maxEdgeLength</a><span class="type-signature"> : number</span> </h3>
  60. <div class="description">
  61. <p>The maximum edge length.</p>
  62. <p>Default is <code>0.1</code>.</p>
  63. </div>
  64. </div>
  65. <div class="member">
  66. <h3 class="name" id="maxIterations" translate="no">.<a href="#maxIterations">maxIterations</a><span class="type-signature"> : number</span> </h3>
  67. <div class="description">
  68. <p>The maximum edge length.</p>
  69. <p>Default is <code>0.1</code>.</p>
  70. </div>
  71. </div>
  72. <h2 class="subsection-title">Methods</h2>
  73. <h3 class="name name-method" id="modify" translate="no">.<a href="#modify">modify</a><span class="signature">( geometry : <span class="param-type"><a href="BufferGeometry.html">BufferGeometry</a></span> )</span><span class="type-signature"> : <a href="BufferGeometry.html">BufferGeometry</a></span> </h3>
  74. <div class="method">
  75. <div class="description">
  76. <p>Returns a new, modified version of the given geometry by applying a tesselation.
  77. Please note that the resulting geometry is always non-indexed.</p>
  78. </div>
  79. <table class="params">
  80. <tbody>
  81. <tr>
  82. <td class="name">
  83. <strong>geometry</strong>
  84. </td>
  85. <td class="description last">
  86. <p>The geometry to modify.</p>
  87. </td>
  88. </tr>
  89. </tbody>
  90. </table>
  91. <dl class="details">
  92. <dt class="tag-returns"><strong>Returns:</strong> A new, modified geometry.</dt>
  93. </dl>
  94. </div>
  95. <h2 class="subsection-title">Source</h2>
  96. <p>
  97. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/modifiers/TessellateModifier.js" translate="no" target="_blank" rel="noopener">examples/jsm/modifiers/TessellateModifier.js</a>
  98. </p>
  99. </article>
  100. </section>
  101. <script src="../scripts/linenumber.js"></script>
  102. <script src="../scripts/page.js"></script>
  103. </body>
  104. </html>
粤ICP备19079148号