module-ParametricFunctions.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>ParametricFunctions - 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">ParametricFunctions</h1>
  13. <section>
  14. <header>
  15. </header>
  16. <article>
  17. <h2 class="subsection-title">Import</h2>
  18. <p><span translate="no">ParametricFunctions</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  19. <pre><code class="language-js">import * as ParametricFunctions from 'three/addons/geometries/ParametricFunctions.js';</code></pre>
  20. <div class="container-overview">
  21. </div>
  22. <h2 class="subsection-title">Methods</h2>
  23. <h3 class="name name-method" id="~klein" translate="no">.<a href="#~klein">klein</a><span class="signature">( v : <span class="param-type">number</span>, u : <span class="param-type">number</span>, target : <span class="param-type">Vector3</span> )</span> <span class="type-signature">(inner) </span></h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>A parametric function representing the Klein bottle.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name"><code>v</code></td>
  32. <td class="description last"><p>The <code>v</code> coordinate on the surface in the range <code>[0,1]</code>.</p></td>
  33. </tr>
  34. <tr>
  35. <td class="name"><code>u</code></td>
  36. <td class="description last"><p>The <code>u</code> coordinate on the surface in the range <code>[0,1]</code>.</p></td>
  37. </tr>
  38. <tr>
  39. <td class="name"><code>target</code></td>
  40. <td class="description last"><p>The target vector that is used to store the method's result.</p></td>
  41. </tr>
  42. </tbody>
  43. </table>
  44. </div>
  45. <h3 class="name name-method" id="~mobius" translate="no">.<a href="#~mobius">mobius</a><span class="signature">( u : <span class="param-type">number</span>, t : <span class="param-type">number</span>, target : <span class="param-type">Vector3</span> )</span> <span class="type-signature">(inner) </span></h3>
  46. <div class="method">
  47. <div class="description">
  48. <p>A parametric function representing a flat mobius strip.</p>
  49. </div>
  50. <table class="params">
  51. <tbody>
  52. <tr>
  53. <td class="name"><code>u</code></td>
  54. <td class="description last"><p>The <code>u</code> coordinate on the surface in the range <code>[0,1]</code>.</p></td>
  55. </tr>
  56. <tr>
  57. <td class="name"><code>t</code></td>
  58. <td class="description last"><p>The <code>v</code> coordinate on the surface in the range <code>[0,1]</code>.</p></td>
  59. </tr>
  60. <tr>
  61. <td class="name"><code>target</code></td>
  62. <td class="description last"><p>The target vector that is used to store the method's result.</p></td>
  63. </tr>
  64. </tbody>
  65. </table>
  66. </div>
  67. <h3 class="name name-method" id="~mobius3d" translate="no">.<a href="#~mobius3d">mobius3d</a><span class="signature">( u : <span class="param-type">number</span>, t : <span class="param-type">number</span>, target : <span class="param-type">Vector3</span> )</span> <span class="type-signature">(inner) </span></h3>
  68. <div class="method">
  69. <div class="description">
  70. <p>A parametric function representing a volumetric mobius strip.</p>
  71. </div>
  72. <table class="params">
  73. <tbody>
  74. <tr>
  75. <td class="name"><code>u</code></td>
  76. <td class="description last"><p>The <code>u</code> coordinate on the surface in the range <code>[0,1]</code>.</p></td>
  77. </tr>
  78. <tr>
  79. <td class="name"><code>t</code></td>
  80. <td class="description last"><p>The <code>v</code> coordinate on the surface in the range <code>[0,1]</code>.</p></td>
  81. </tr>
  82. <tr>
  83. <td class="name"><code>target</code></td>
  84. <td class="description last"><p>The target vector that is used to store the method's result.</p></td>
  85. </tr>
  86. </tbody>
  87. </table>
  88. </div>
  89. <h3 class="name name-method" id="~plane" translate="no">.<a href="#~plane">plane</a><span class="signature">( u : <span class="param-type">number</span>, v : <span class="param-type">number</span>, target : <span class="param-type">Vector3</span> )</span> <span class="type-signature">(inner) </span></h3>
  90. <div class="method">
  91. <div class="description">
  92. <p>A parametric function representing a flat plane.</p>
  93. </div>
  94. <table class="params">
  95. <tbody>
  96. <tr>
  97. <td class="name"><code>u</code></td>
  98. <td class="description last"><p>The <code>u</code> coordinate on the surface in the range <code>[0,1]</code>.</p></td>
  99. </tr>
  100. <tr>
  101. <td class="name"><code>v</code></td>
  102. <td class="description last"><p>The <code>v</code> coordinate on the surface in the range <code>[0,1]</code>.</p></td>
  103. </tr>
  104. <tr>
  105. <td class="name"><code>target</code></td>
  106. <td class="description last"><p>The target vector that is used to store the method's result.</p></td>
  107. </tr>
  108. </tbody>
  109. </table>
  110. </div>
  111. <h2 class="subsection-title">Source</h2>
  112. <p>
  113. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/ParametricFunctions.js" target="_blank" rel="noopener" translate="no">examples/jsm/geometries/ParametricFunctions.js</a>
  114. </p>
  115. </article>
  116. </section>
  117. <script src="../scripts/linenumber.js"></script>
  118. <script src="../scripts/page.js"></script>
  119. </body>
  120. </html>
粤ICP备19079148号