GrannyKnot.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>GrannyKnot - 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="Curve.html">Curve</a> → </p>
  13. <h1 translate="no">GrannyKnot</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A Granny Knot curve.</p></div>
  17. </header>
  18. <article>
  19. <h2 class="subsection-title">Import</h2>
  20. <p><span translate="no">GrannyKnot</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  21. <pre><code class="language-js">import { GrannyKnot } from 'three/addons/curves/CurveExtras.js';</code></pre>
  22. <div class="container-overview">
  23. <h2>Constructor</h2>
  24. <h3 class="name name-method" id="GrannyKnot" translate="no">new <a href="#GrannyKnot">GrannyKnot</a><span class="signature">()</span> </h3>
  25. <div class="method">
  26. </div>
  27. </div>
  28. <h2 class="subsection-title">Methods</h2>
  29. <h3 class="name name-method" id="getPoint" translate="no">.<a href="#getPoint">getPoint</a><span class="signature">( t : <span class="param-type">number</span>, optionalTarget : <span class="param-type">Vector3</span> )</span><span class="type-signature"> : <a href="Vector3.html">Vector3</a></span> </h3>
  30. <div class="method">
  31. <div class="description">
  32. <p>This method returns a vector in 3D space for the given interpolation factor.</p>
  33. </div>
  34. <table class="params">
  35. <tbody>
  36. <tr>
  37. <td class="name"><code>t</code></td>
  38. <td class="description last"><p>A interpolation factor representing a position on the curve. Must be in the range <code>[0,1]</code>.</p></td>
  39. </tr>
  40. <tr>
  41. <td class="name"><code>optionalTarget</code></td>
  42. <td class="description last"><p>The optional target vector the result is written to.</p></td>
  43. </tr>
  44. </tbody>
  45. </table>
  46. <dl class="details">
  47. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Curve.html#getPoint">Curve#getPoint</a></dt>
  48. </dl>
  49. <dl class="details">
  50. <dt class="tag-returns"><strong>Returns:</strong> The position on the curve.</dt>
  51. </dl>
  52. </div>
  53. <h2 class="subsection-title">Source</h2>
  54. <p>
  55. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/curves/CurveExtras.js" target="_blank" rel="noopener" translate="no">examples/jsm/curves/CurveExtras.js</a>
  56. </p>
  57. </article>
  58. </section>
  59. <script src="../scripts/linenumber.js"></script>
  60. <script src="../scripts/page.js"></script>
  61. </body>
  62. </html>
粤ICP备19079148号