| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>ReflectorForSSRPass - 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">ReflectorForSSRPass</h1>
- <section>
- <header>
- <div class="class-description"><p>A special version of <a href="Reflector.html">Reflector</a> for usage with <a href="SSRPass.html">SSRPass</a>.</p></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">ReflectorForSSRPass</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 { ReflectorForSSRPass } from 'three/addons/objects/ReflectorForSSRPass.js';</code></pre>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="ReflectorForSSRPass" translate="no">new <a href="#ReflectorForSSRPass">ReflectorForSSRPass</a><span class="signature">( geometry : <span class="param-type"><a href="BufferGeometry.html">BufferGeometry</a></span>, options : <span class="param-type"><a href="ReflectorForSSRPass.html#~Options">ReflectorForSSRPass~Options</a></span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new reflector.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>geometry</strong>
- </td>
- <td class="description last">
- <p>The reflector's geometry.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>options</strong>
- </td>
- <td class="description last">
- <p>The configuration options.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </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>
- <h3 class="name name-method" id="getRenderTarget" translate="no">.<a href="#getRenderTarget">getRenderTarget</a><span class="signature">()</span><span class="type-signature"> : <a href="WebGLRenderTarget.html">WebGLRenderTarget</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>Returns the reflector's internal render target.</p>
- </div>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The internal render target</dt>
- </dl>
- </div>
- <h2 class="subsection-title">Type Definitions</h2>
- <div class="member">
- <h3 class="name" id="~Options" translate="no">.<a href="#~Options">Options</a> </h3>
- <div class="description">
- <p>Constructor options of <code>ReflectorForSSRPass</code>.</p>
- </div>
- <table class="props">
- <tbody>
- <tr>
- <td class="name">
- <strong>color</strong>
- <br>
- <span class="param-type">number</span>
- |
- <span class="param-type"><a href="Color.html">Color</a></span>
- |
- <span class="param-type">string</span>
- </td>
- <td class="description last">
- <p>The reflector's color.</p>
- <p>Default is <code>0x7F7F7F</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>textureWidth</strong>
- <br>
- <span class="param-type">number</span>
- </td>
- <td class="description last">
- <p>The texture width. A higher value results in more clear reflections but is also more expensive.</p>
- <p>Default is <code>512</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>textureHeight</strong>
- <br>
- <span class="param-type">number</span>
- </td>
- <td class="description last">
- <p>The texture height. A higher value results in more clear reflections but is also more expensive.</p>
- <p>Default is <code>512</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>clipBias</strong>
- <br>
- <span class="param-type">number</span>
- </td>
- <td class="description last">
- <p>The clip bias.</p>
- <p>Default is <code>0</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>shader</strong>
- <br>
- <span class="param-type">Object</span>
- </td>
- <td class="description last">
- <p>Can be used to pass in a custom shader that defines how the reflective view is projected onto the reflector's geometry.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>useDepthTexture</strong>
- <br>
- <span class="param-type">boolean</span>
- </td>
- <td class="description last">
- <p>Whether to store depth values in a texture or not.</p>
- <p>Default is <code>true</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>resolution</strong>
- <br>
- <span class="param-type"><a href="Vector2.html">Vector2</a></span>
- </td>
- <td class="description last">
- <p>Resolution for the Reflector Pass.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/ReflectorForSSRPass.js" translate="no" target="_blank" rel="noopener">examples/jsm/objects/ReflectorForSSRPass.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|