ImprovedNoise.html 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>ImprovedNoise - 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">ImprovedNoise</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>A utility class providing a 3D noise function.</p>
  16. <p>The code is based on <a href="https://cs.nyu.edu/~perlin/noise/" target="_blank" rel="noopener">IMPROVED NOISE</a>
  17. by Ken Perlin, 2002.</p></div>
  18. </header>
  19. <article>
  20. <h2 class="subsection-title">Import</h2>
  21. <p><span translate="no">ImprovedNoise</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>
  22. <pre><code class="language-js">import { ImprovedNoise } from 'three/addons/math/ImprovedNoise.js';</code></pre>
  23. <div class="container-overview">
  24. <h2>Constructor</h2>
  25. <h3 class="name name-method" id="ImprovedNoise" translate="no">new <a href="#ImprovedNoise">ImprovedNoise</a><span class="signature">()</span> </h3>
  26. <div class="method">
  27. </div>
  28. </div>
  29. <h2 class="subsection-title">Methods</h2>
  30. <h3 class="name name-method" id="noise" translate="no">.<a href="#noise">noise</a><span class="signature">( x : <span class="param-type">number</span>, y : <span class="param-type">number</span>, z : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  31. <div class="method">
  32. <div class="description">
  33. <p>Returns a noise value for the given parameters.</p>
  34. </div>
  35. <table class="params">
  36. <tbody>
  37. <tr>
  38. <td class="name">
  39. <strong>x</strong>
  40. </td>
  41. <td class="description last">
  42. <p>The x coordinate.</p>
  43. </td>
  44. </tr>
  45. <tr>
  46. <td class="name">
  47. <strong>y</strong>
  48. </td>
  49. <td class="description last">
  50. <p>The y coordinate.</p>
  51. </td>
  52. </tr>
  53. <tr>
  54. <td class="name">
  55. <strong>z</strong>
  56. </td>
  57. <td class="description last">
  58. <p>The z coordinate.</p>
  59. </td>
  60. </tr>
  61. </tbody>
  62. </table>
  63. <dl class="details">
  64. <dt class="tag-returns"><strong>Returns:</strong> The noise value.</dt>
  65. </dl>
  66. </div>
  67. <h2 class="subsection-title">Source</h2>
  68. <p>
  69. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ImprovedNoise.js" translate="no" target="_blank" rel="noopener">examples/jsm/math/ImprovedNoise.js</a>
  70. </p>
  71. </article>
  72. </section>
  73. <script src="../scripts/linenumber.js"></script>
  74. <script src="../scripts/page.js"></script>
  75. </body>
  76. </html>
粤ICP备19079148号