| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>CodeNode - 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">CodeNode</h1>
- <section>
- <header>
- <div class="class-description"><p>This class represents native code sections. It is the base
- class for modules like <a href="FunctionNode.html">FunctionNode</a> which allows to implement
- functions with native shader languages.</p></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="CodeNode" translate="no">new <a href="#CodeNode">CodeNode</a><span class="signature">( code : <span class="param-type">string</span>, includes : <span class="param-type">Array.<<a href="Node.html">Node</a>></span>, language : <span class="param-type">'js' | 'wgsl' | 'glsl'</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new code node.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>code</strong>
- </td>
- <td class="description last">
- <p>The native code.</p>
- <p>Default is <code>''</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>includes</strong>
- </td>
- <td class="description last">
- <p>An array of includes.</p>
- <p>Default is <code>[]</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>language</strong>
- </td>
- <td class="description last">
- <p>The used language.</p>
- <p>Default is <code>''</code>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="code" translate="no">.<a href="#code">code</a><span class="type-signature"> : string</span> </h3>
- <div class="description">
- <p>The native code.</p>
- <p>Default is <code>''</code>.</p>
- </div>
- </div>
- <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="includes" translate="no">.<a href="#includes">includes</a><span class="type-signature"> : Array.<<a href="Node.html">Node</a>></span> </h3>
- <div class="description">
- <p>An array of includes</p>
- <p>Default is <code>[]</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="isCodeNode" translate="no">.<a href="#isCodeNode">isCodeNode</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="language" translate="no">.<a href="#language">language</a><span class="type-signature"> : 'js' | 'wgsl' | 'glsl'</span> </h3>
- <div class="description">
- <p>The used language.</p>
- <p>Default is <code>''</code>.</p>
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <h3 class="name name-method" id="getIncludes" translate="no">.<a href="#getIncludes">getIncludes</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : Array.<<a href="Node.html">Node</a>></span> </h3>
- <div class="method">
- <div class="description">
- <p>Returns the includes of this code node.</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 includes.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id="setIncludes" translate="no">.<a href="#setIncludes">setIncludes</a><span class="signature">( includes : <span class="param-type">Array.<<a href="Node.html">Node</a>></span> )</span><span class="type-signature"> : <a href="CodeNode.html">CodeNode</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>Sets the includes of this code node.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>includes</strong>
- </td>
- <td class="description last">
- <p>The includes to set.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> A reference to this node.</dt>
- </dl>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/code/CodeNode.js" translate="no" target="_blank" rel="noopener">src/nodes/code/CodeNode.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|