| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>FlakesTexture - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <h1 translate="no">FlakesTexture</h1>
- <section>
- <header>
- <div class="class-description"><p>Utility class for generating a flakes texture image. This image might be used
- as a normal map to produce a car paint like effect.</p></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <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" rel="noopener">Installation#Addons</a>.</p>
- <pre><code class="language-js">import { FlakesTexture } from 'three/addons/textures/FlakesTexture.js';</code></pre>
- <div class="container-overview">
- <h2>Constructor</h2>
- <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>
- <div class="method">
- <div class="description">
- <p>Generates a new flakes texture image. The result is a canvas
- that can be used as an input for <a href="CanvasTexture.html">CanvasTexture</a>.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>width</strong>
- </td>
- <td class="description last">
- <p>The width of the image.</p>
- <p>Default is <code>512</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>height</strong>
- </td>
- <td class="description last">
- <p>The height of the image.</p>
- <p>Default is <code>512</code>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The generated image.</dt>
- </dl>
- </div>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/textures/FlakesTexture.js" translate="no" target="_blank" rel="noopener">examples/jsm/textures/FlakesTexture.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|