NodeFunction.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>NodeFunction - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <h1 translate="no">NodeFunction</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>Base class for node functions. A derived module must be implemented
  16. for each supported native shader language. Similar to other <code>Node*</code> modules,
  17. this class is only relevant during the building process and not used
  18. in user-level code.</p></div>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <h2>Constructor</h2>
  23. <h3 class="name name-method" id="NodeFunction" translate="no">new <a href="#NodeFunction">NodeFunction</a><span class="signature">( type : <span class="param-type">string</span>, inputs : <span class="param-type">Array.&lt;NodeFunctionInput></span>, name : <span class="param-type">string</span>, precision : <span class="param-type">string</span> )</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Constructs a new node function.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name"><code>type</code></td>
  32. <td class="description last"><p>The node type. This type is the return type of the node function.</p></td>
  33. </tr>
  34. <tr>
  35. <td class="name"><code>inputs</code></td>
  36. <td class="description last"><p>The function's inputs.</p></td>
  37. </tr>
  38. <tr>
  39. <td class="name"><code>name</code></td>
  40. <td class="description last"><p>The function's name.<br/>Default is <code>''</code>.</p></td>
  41. </tr>
  42. <tr>
  43. <td class="name"><code>precision</code></td>
  44. <td class="description last"><p>The precision qualifier.<br/>Default is <code>''</code>.</p></td>
  45. </tr>
  46. </tbody>
  47. </table>
  48. </div>
  49. </div>
  50. <h2 class="subsection-title">Properties</h2>
  51. <div class="member">
  52. <h3 class="name" id="inputs" translate="no">.<a href="#inputs">inputs</a><span class="type-signature"> : Array.&lt;<a href="NodeFunctionInput.html">NodeFunctionInput</a>></span> </h3>
  53. <div class="description">
  54. <p>The function's inputs.</p>
  55. </div>
  56. </div>
  57. <div class="member">
  58. <h3 class="name" id="name" translate="no">.<a href="#name">name</a><span class="type-signature"> : string</span> </h3>
  59. <div class="description">
  60. <p>The name of the uniform.<br/>Default is <code>''</code>.</p>
  61. </div>
  62. </div>
  63. <div class="member">
  64. <h3 class="name" id="precision" translate="no">.<a href="#precision">precision</a><span class="type-signature"> : string</span> </h3>
  65. <div class="description">
  66. <p>The precision qualifier.<br/>Default is <code>''</code>.</p>
  67. </div>
  68. </div>
  69. <div class="member">
  70. <h3 class="name" id="type" translate="no">.<a href="#type">type</a><span class="type-signature"> : string</span> </h3>
  71. <div class="description">
  72. <p>The node type. This type is the return type of the node function.</p>
  73. </div>
  74. </div>
  75. <h2 class="subsection-title">Methods</h2>
  76. <h3 class="name name-method" id="getCode" translate="no">.<a href="#getCode">getCode</a><span class="signature">( name : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> <span class="type-signature">(abstract) </span></h3>
  77. <div class="method">
  78. <div class="description">
  79. <p>This method returns the native code of the node function.</p>
  80. </div>
  81. <table class="params">
  82. <tbody>
  83. <tr>
  84. <td class="name"><code>name</code></td>
  85. <td class="description last"><p>The function's name.</p></td>
  86. </tr>
  87. </tbody>
  88. </table>
  89. <dl class="details">
  90. <dt class="tag-returns"><strong>Returns:</strong> A shader code.</dt>
  91. </dl>
  92. </div>
  93. <h2 class="subsection-title">Source</h2>
  94. <p>
  95. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/NodeFunction.js" target="_blank" rel="noopener" translate="no">src/nodes/core/NodeFunction.js</a>
  96. </p>
  97. </article>
  98. </section>
  99. <script src="../scripts/linenumber.js"></script>
  100. <script src="../scripts/page.js"></script>
  101. </body>
  102. </html>
粤ICP备19079148号