| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>ViewportDepthNode - 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="Node.html">Node</a> → </p>
- <h1 translate="no">ViewportDepthNode</h1>
- <section>
- <header>
- <div class="class-description"><p>This node offers a collection of features in context of the depth logic in the fragment shader.
- Depending on <a href="ViewportDepthNode.html#scope">ViewportDepthNode#scope</a>, it can be used to define a depth value for the current
- fragment or for depth evaluation purposes.</p></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="ViewportDepthNode" translate="no">new <a href="#ViewportDepthNode">ViewportDepthNode</a><span class="signature">( scope : <span class="param-type">'depth' | 'depthBase' | 'linearDepth'</span>, valueNode : <span class="param-type">Node</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new viewport depth node.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>scope</code></td>
- <td class="description last"><p>The node's scope.</p></td>
- </tr>
- <tr>
- <td class="name"><code>valueNode</code></td>
- <td class="description last"><p>The value node.<br/>Default is <code>null</code>.</p></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="isViewportDepthNode" translate="no">.<a href="#isViewportDepthNode">isViewportDepthNode</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
- <div class="description">
- <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="scope" translate="no">.<a href="#scope">scope</a><span class="type-signature"> : 'depth' | 'depthBase' | 'linearDepth'</span> </h3>
- <div class="description">
- <p>The node behaves differently depending on which scope is selected.</p>
- <ul>
- <li><code>ViewportDepthNode.DEPTH_BASE</code>: Allows to define a value for the current fragment's depth.</li>
- <li><code>ViewportDepthNode.DEPTH</code>: Represents the depth value for the current fragment (<code>valueNode</code> is ignored).</li>
- <li><code>ViewportDepthNode.LINEAR_DEPTH</code>: Represents the linear (orthographic) depth value of the current fragment.
- If a <code>valueNode</code> is set, the scope can be used to convert perspective depth data to linear data.</li>
- </ul>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="valueNode" translate="no">.<a href="#valueNode">valueNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
- <div class="description">
- <p>Can be used to define a custom depth value.
- The property is ignored in the <code>ViewportDepthNode.DEPTH</code> scope.<br/>Default is <code>null</code>.</p>
- </div>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/display/ViewportDepthNode.js" target="_blank" rel="noopener" translate="no">src/nodes/display/ViewportDepthNode.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|