| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Flow - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <h1 translate="no">Flow</h1>
- <section>
- <header>
- <div class="class-description"><p>A modifier for making meshes bend around curves.</p>
- <p>This module can only be used with <a href="WebGLRenderer.html">WebGLRenderer</a>. When using <a href="WebGPURenderer.html">WebGPURenderer</a>,
- import the class from <code>CurveModifierGPU.js</code>.</p></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <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">Installation#Addons</a>.</p>
- <pre><code class="language-js">import { Flow } from 'three/addons/modifiers/CurveModifier.js';</code></pre>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="Flow" translate="no">new <a href="#Flow">Flow</a><span class="signature">( mesh : <span class="param-type">Mesh</span>, numberOfCurves : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new Flow instance.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>mesh</code></td>
- <td class="description last"><p>The mesh to clone and modify to bend around the curve.</p></td>
- </tr>
- <tr>
- <td class="name"><code>numberOfCurves</code></td>
- <td class="description last"><p>The amount of space that should preallocated for additional curves.<br/>Default is <code>1</code>.</p></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Classes</h2>
- <dl>
- <dt><a href="Flow.html">Flow</a></dt>
- <dd></dd>
- </dl>
- <h2 class="subsection-title">Methods</h2>
- <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>
- <div class="method">
- <div class="description">
- <p>Moves the mesh along the curve.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>amount</code></td>
- <td class="description last"><p>The offset.</p></td>
- </tr>
- </tbody>
- </table>
- </div>
- <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">Curve</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Updates the curve for the given curve index.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>index</code></td>
- <td class="description last"><p>The curve index.</p></td>
- </tr>
- <tr>
- <td class="name"><code>curve</code></td>
- <td class="description last"><p>The curve that should be used to bend the mesh.</p></td>
- </tr>
- </tbody>
- </table>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/modifiers/CurveModifier.js" target="_blank" rel="noopener" translate="no">examples/jsm/modifiers/CurveModifier.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|