HeartCurve.html 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>HeartCurve - 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">HeartCurve</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A heart curve.</p></div>
  17. </header>
  18. <article>
  19. <h2 class="subsection-title">Import</h2>
  20. <p><span translate="no">HeartCurve</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 { HeartCurve } from 'three/addons/curves/CurveExtras.js';</code></pre>
  22. <div class="container-overview">
  23. <h2>Constructor</h2>
  24. <h3 class="name name-method" id="HeartCurve" translate="no">new <a href="#HeartCurve">HeartCurve</a><span class="signature">( scale : <span class="param-type">number</span> )</span> </h3>
  25. <div class="method">
  26. <div class="description">
  27. <p>Constructs a new heart curve.</p>
  28. </div>
  29. <table class="params">
  30. <tbody>
  31. <tr>
  32. <td class="name"><code>scale</code></td>
  33. <td class="description last"><p>The curve's scale.<br/>Default is <code>5</code>.</p></td>
  34. </tr>
  35. </tbody>
  36. </table>
  37. </div>
  38. </div>
  39. <h2 class="subsection-title">Properties</h2>
  40. <div class="member">
  41. <h3 class="name" id="scale" translate="no">.<a href="#scale">scale</a><span class="type-signature"> : number</span> </h3>
  42. <div class="description">
  43. <p>The curve's scale.<br/>Default is <code>5</code>.</p>
  44. </div>
  45. </div>
  46. <h2 class="subsection-title">Methods</h2>
  47. <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>
  48. <div class="method">
  49. <div class="description">
  50. <p>This method returns a vector in 3D space for the given interpolation factor.</p>
  51. </div>
  52. <table class="params">
  53. <tbody>
  54. <tr>
  55. <td class="name"><code>t</code></td>
  56. <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>
  57. </tr>
  58. <tr>
  59. <td class="name"><code>optionalTarget</code></td>
  60. <td class="description last"><p>The optional target vector the result is written to.</p></td>
  61. </tr>
  62. </tbody>
  63. </table>
  64. <dl class="details">
  65. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Curve.html#getPoint">Curve#getPoint</a></dt>
  66. </dl>
  67. <dl class="details">
  68. <dt class="tag-returns"><strong>Returns:</strong> The position on the curve.</dt>
  69. </dl>
  70. </div>
  71. <h2 class="subsection-title">Source</h2>
  72. <p>
  73. <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>
  74. </p>
  75. </article>
  76. </section>
  77. <script src="../scripts/linenumber.js"></script>
  78. <script src="../scripts/page.js"></script>
  79. </body>
  80. </html>
粤ICP备19079148号