1
0

Flow.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Flow - 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">Flow</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>A modifier for making meshes bend around curves.</p>
  16. <p>This module can only be used with <a href="WebGLRenderer.html">WebGLRenderer</a>. When using <a href="WebGPURenderer.html">WebGPURenderer</a>,
  17. import the class from <code>CurveModifierGPU.js</code>.</p></div>
  18. </header>
  19. <article>
  20. <h2 class="subsection-title">Import</h2>
  21. <p><span translate="no">Flow</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>
  22. <pre><code class="language-js">import { Flow } from 'three/addons/modifiers/CurveModifier.js';</code></pre>
  23. <div class="container-overview">
  24. <h2>Constructor</h2>
  25. <h3 class="name name-method" id="Flow" translate="no">new <a href="#Flow">Flow</a><span class="signature">( mesh : <span class="param-type"><a href="Mesh.html">Mesh</a></span>, numberOfCurves : <span class="param-type">number</span> )</span> </h3>
  26. <div class="method">
  27. <div class="description">
  28. <p>Constructs a new Flow instance.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name">
  34. <strong>mesh</strong>
  35. </td>
  36. <td class="description last">
  37. <p>The mesh to clone and modify to bend around the curve.</p>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td class="name">
  42. <strong>numberOfCurves</strong>
  43. </td>
  44. <td class="description last">
  45. <p>The amount of space that should preallocated for additional curves.</p>
  46. <p>Default is <code>1</code>.</p>
  47. </td>
  48. </tr>
  49. </tbody>
  50. </table>
  51. </div>
  52. </div>
  53. <h2 class="subsection-title">Classes</h2>
  54. <dl>
  55. <dt><a href="Flow.html">Flow</a></dt>
  56. <dd></dd>
  57. </dl>
  58. <h2 class="subsection-title">Methods</h2>
  59. <h3 class="name name-method" id="moveAlongCurve" translate="no">.<a href="#moveAlongCurve">moveAlongCurve</a><span class="signature">( amount : <span class="param-type">number</span> )</span> </h3>
  60. <div class="method">
  61. <div class="description">
  62. <p>Moves the mesh along the curve.</p>
  63. </div>
  64. <table class="params">
  65. <tbody>
  66. <tr>
  67. <td class="name">
  68. <strong>amount</strong>
  69. </td>
  70. <td class="description last">
  71. <p>The offset.</p>
  72. </td>
  73. </tr>
  74. </tbody>
  75. </table>
  76. </div>
  77. <h3 class="name name-method" id="updateCurve" translate="no">.<a href="#updateCurve">updateCurve</a><span class="signature">( index : <span class="param-type">number</span>, curve : <span class="param-type"><a href="Curve.html">Curve</a></span> )</span> </h3>
  78. <div class="method">
  79. <div class="description">
  80. <p>Updates the curve for the given curve index.</p>
  81. </div>
  82. <table class="params">
  83. <tbody>
  84. <tr>
  85. <td class="name">
  86. <strong>index</strong>
  87. </td>
  88. <td class="description last">
  89. <p>The curve index.</p>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td class="name">
  94. <strong>curve</strong>
  95. </td>
  96. <td class="description last">
  97. <p>The curve that should be used to bend the mesh.</p>
  98. </td>
  99. </tr>
  100. </tbody>
  101. </table>
  102. </div>
  103. <h2 class="subsection-title">Source</h2>
  104. <p>
  105. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/modifiers/CurveModifier.js" translate="no" target="_blank" rel="noopener">examples/jsm/modifiers/CurveModifier.js</a>
  106. </p>
  107. </article>
  108. </section>
  109. <script src="../scripts/linenumber.js"></script>
  110. <script src="../scripts/page.js"></script>
  111. </body>
  112. </html>
粤ICP备19079148号