| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>VaryingNode - 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">VaryingNode</h1>
- <section>
- <header>
- <div class="class-description"><p>Class for representing shader varyings as nodes. Varyings are create from
- existing nodes like the following:</p></div>
- <h2>Code Example</h2>
- <div translate="no"><pre><code class="language-js">const positionLocal = positionGeometry.toVarying( 'vPositionLocal' );
- </code></pre></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="VaryingNode" translate="no">new <a href="#VaryingNode">VaryingNode</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, name : <span class="param-type">string</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new varying node.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>node</strong>
- </td>
- <td class="description last">
- <p>The node for which a varying should be created.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>name</strong>
- </td>
- <td class="description last">
- <p>The name of the varying in the shader.</p>
- <p>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="global" translate="no">.<a href="#global">global</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>This flag is used for global cache.</p>
- <p>Default is <code>true</code>.</p>
- </div>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#global">Node#global</a></dt>
- </dl>
- </div>
- <div class="member">
- <h3 class="name" id="interpolationSampling" translate="no">.<a href="#interpolationSampling">interpolationSampling</a><span class="type-signature"> : string</span> </h3>
- <div class="description">
- <p>The interpolation sampling type of varying data.</p>
- <p>Default is <code>null</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="interpolationType" translate="no">.<a href="#interpolationType">interpolationType</a><span class="type-signature"> : string</span> </h3>
- <div class="description">
- <p>The interpolation type of the varying data.</p>
- <p>Default is <code>null</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="isVaryingNode" translate="no">.<a href="#isVaryingNode">isVaryingNode</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.</p>
- <p>Default is <code>true</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="name" translate="no">.<a href="#name">name</a><span class="type-signature"> : string</span> </h3>
- <div class="description">
- <p>The name of the varying in the shader. If no name is defined,
- the node system auto-generates one.</p>
- <p>Default is <code>null</code>.</p>
- </div>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#name">Node#name</a></dt>
- </dl>
- </div>
- <div class="member">
- <h3 class="name" id="node" translate="no">.<a href="#node">node</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
- <div class="description">
- <p>The node for which a varying should be created.</p>
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <h3 class="name name-method" id="setInterpolation" translate="no">.<a href="#setInterpolation">setInterpolation</a><span class="signature">( type : <span class="param-type">string</span>, sampling : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="VaryingNode.html">VaryingNode</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>Defines the interpolation type of the varying.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>type</strong>
- </td>
- <td class="description last">
- <p>The interpolation type.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>sampling</strong>
- </td>
- <td class="description last">
- <p>The interpolation sampling type</p>
- <p>Default is <code>null</code>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> A reference to this node.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id="setupVarying" translate="no">.<a href="#setupVarying">setupVarying</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : <a href="NodeVarying.html">NodeVarying</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>This method performs the setup of a varying node with the current node builder.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>builder</strong>
- </td>
- <td class="description last">
- <p>The current node builder.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The node varying from the node builder.</dt>
- </dl>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/VaryingNode.js" translate="no" target="_blank" rel="noopener">src/nodes/core/VaryingNode.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|