FlakesTexture.html 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>FlakesTexture - 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">FlakesTexture</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>Utility class for generating a flakes texture image. This image might be used
  16. as a normal map to produce a car paint like effect.</p></div>
  17. </header>
  18. <article>
  19. <h2 class="subsection-title">Import</h2>
  20. <p><span translate="no">FlakesTexture</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 { FlakesTexture } from 'three/addons/textures/FlakesTexture.js';</code></pre>
  22. <div class="container-overview">
  23. <h2>Constructor</h2>
  24. <h3 class="name name-method" id="FlakesTexture" translate="no">new <a href="#FlakesTexture">FlakesTexture</a><span class="signature">( width : <span class="param-type">number</span>, height : <span class="param-type">number</span> )</span><span class="type-signature"> : HTMLCanvasElement</span> </h3>
  25. <div class="method">
  26. <div class="description">
  27. <p>Generates a new flakes texture image. The result is a canvas
  28. that can be used as an input for <a href="CanvasTexture.html">CanvasTexture</a>.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name"><code>width</code></td>
  34. <td class="description last"><p>The width of the image.<br/>Default is <code>512</code>.</p></td>
  35. </tr>
  36. <tr>
  37. <td class="name"><code>height</code></td>
  38. <td class="description last"><p>The height of the image.<br/>Default is <code>512</code>.</p></td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. <dl class="details">
  43. <dt class="tag-returns"><strong>Returns:</strong> The generated image.</dt>
  44. </dl>
  45. </div>
  46. </div>
  47. <h2 class="subsection-title">Source</h2>
  48. <p>
  49. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/textures/FlakesTexture.js" target="_blank" rel="noopener" translate="no">examples/jsm/textures/FlakesTexture.js</a>
  50. </p>
  51. </article>
  52. </section>
  53. <script src="../scripts/linenumber.js"></script>
  54. <script src="../scripts/page.js"></script>
  55. </body>
  56. </html>
粤ICP备19079148号