ImprovedNoise.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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/">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">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"><code>x</code></td>
  39. <td class="description last"><p>The x coordinate.</p></td>
  40. </tr>
  41. <tr>
  42. <td class="name"><code>y</code></td>
  43. <td class="description last"><p>The y coordinate.</p></td>
  44. </tr>
  45. <tr>
  46. <td class="name"><code>z</code></td>
  47. <td class="description last"><p>The z coordinate.</p></td>
  48. </tr>
  49. </tbody>
  50. </table>
  51. <dl class="details">
  52. <dt class="tag-returns"><strong>Returns:</strong> The noise value.</dt>
  53. </dl>
  54. </div>
  55. <h2 class="subsection-title">Source</h2>
  56. <p>
  57. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ImprovedNoise.js" target="_blank" rel="noopener" translate="no">examples/jsm/math/ImprovedNoise.js</a>
  58. </p>
  59. </article>
  60. </section>
  61. <script src="../scripts/linenumber.js"></script>
  62. <script src="../scripts/page.js"></script>
  63. </body>
  64. </html>
粤ICP备19079148号