GrannyKnot.html 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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" rel="noopener">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"><a href="Vector3.html">Vector3</a></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">
  38. <strong>t</strong>
  39. </td>
  40. <td class="description last">
  41. <p>A interpolation factor representing a position on the curve. Must be in the range <code>[0,1]</code>.</p>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td class="name">
  46. <strong>optionalTarget</strong>
  47. </td>
  48. <td class="description last">
  49. <p>The optional target vector the result is written to.</p>
  50. </td>
  51. </tr>
  52. </tbody>
  53. </table>
  54. <dl class="details">
  55. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Curve.html#getPoint">Curve#getPoint</a></dt>
  56. </dl>
  57. <dl class="details">
  58. <dt class="tag-returns"><strong>Returns:</strong> The position on the curve.</dt>
  59. </dl>
  60. </div>
  61. <h2 class="subsection-title">Source</h2>
  62. <p>
  63. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/curves/CurveExtras.js" translate="no" target="_blank" rel="noopener">examples/jsm/curves/CurveExtras.js</a>
  64. </p>
  65. </article>
  66. </section>
  67. <script src="../scripts/linenumber.js"></script>
  68. <script src="../scripts/page.js"></script>
  69. </body>
  70. </html>
粤ICP备19079148号