| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>TextureHelper - 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>
- <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Object3D.html">Object3D</a> → <a href="Mesh.html">Mesh</a> → </p>
- <h1 translate="no">TextureHelper</h1>
- <section>
- <header>
- <div class="class-description"><p>A helper that can be used to display any type of texture for
- debugging purposes. Depending on the type of texture (2D, 3D, Array),
- the helper becomes a plane or box mesh.</p>
- <p>This helper can only be used with <a href="WebGLRenderer.html">WebGLRenderer</a>.
- When using <a href="WebGPURenderer.html">WebGPURenderer</a>, import from <code>TextureHelperGPU.js</code>.</p></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">TextureHelper</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 { TextureHelper } from 'three/addons/helpers/TextureHelper.js';</code></pre>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="TextureHelper" translate="no">new <a href="#TextureHelper">TextureHelper</a><span class="signature">( texture : <span class="param-type"><a href="Texture.html">Texture</a></span>, width : <span class="param-type">number</span>, height : <span class="param-type">number</span>, depth : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new texture helper.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>texture</strong>
- </td>
- <td class="description last">
- <p>The texture to visualize.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>width</strong>
- </td>
- <td class="description last">
- <p>The helper's width.</p>
- <p>Default is <code>1</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>height</strong>
- </td>
- <td class="description last">
- <p>The helper's height.</p>
- <p>Default is <code>1</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>depth</strong>
- </td>
- <td class="description last">
- <p>The helper's depth.</p>
- <p>Default is <code>1</code>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="texture" translate="no">.<a href="#texture">texture</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
- <div class="description">
- <p>The texture to visualize.</p>
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
- <div class="method">
- <div class="description">
- <p>Frees the GPU-related resources allocated by this instance. Call this
- method whenever this instance is no longer used in your app.</p>
- </div>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/helpers/TextureHelper.js" translate="no" target="_blank" rel="noopener">examples/jsm/helpers/TextureHelper.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|