| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>ParallaxBarrierEffect - 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">ParallaxBarrierEffect</h1>
- <section>
- <header>
- <div class="class-description"><p>A class that creates an parallax barrier effect.</p>
- <p>Note that this class can only be used with <a href="WebGLRenderer.html">WebGLRenderer</a>.
- When using <a href="WebGPURenderer.html">WebGPURenderer</a>, use <a href="ParallaxBarrierPassNode.html">ParallaxBarrierPassNode</a>.</p></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">ParallaxBarrierEffect</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
- <pre><code class="language-js">import { ParallaxBarrierEffect } from 'three/addons/effects/ParallaxBarrierEffect.js';</code></pre>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="ParallaxBarrierEffect" translate="no">new <a href="#ParallaxBarrierEffect">ParallaxBarrierEffect</a><span class="signature">( renderer : <span class="param-type">WebGLRenderer</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new parallax barrier effect.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>renderer</code></td>
- <td class="description last"><p>The renderer.</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 internal resources. This method should be called
- when the effect is no longer required.</p>
- </div>
- </div>
- <h3 class="name name-method" id="render" translate="no">.<a href="#render">render</a><span class="signature">( scene : <span class="param-type">Object3D</span>, camera : <span class="param-type">Camera</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>When using this effect, this method should be called instead of the
- default <a href="WebGLRenderer.html#render">WebGLRenderer#render</a>.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>scene</code></td>
- <td class="description last"><p>The scene to render.</p></td>
- </tr>
- <tr>
- <td class="name"><code>camera</code></td>
- <td class="description last"><p>The camera.</p></td>
- </tr>
- </tbody>
- </table>
- </div>
- <h3 class="name name-method" id="setSize" translate="no">.<a href="#setSize">setSize</a><span class="signature">( width : <span class="param-type">number</span>, height : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Resizes the effect.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>width</code></td>
- <td class="description last"><p>The width of the effect in logical pixels.</p></td>
- </tr>
- <tr>
- <td class="name"><code>height</code></td>
- <td class="description last"><p>The height of the effect in logical pixels.</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/effects/ParallaxBarrierEffect.js" target="_blank" rel="noopener" translate="no">examples/jsm/effects/ParallaxBarrierEffect.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|