1
0

FunctionOverloadingNode.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>FunctionOverloadingNode - 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. <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Node.html">Node</a> → </p>
  13. <h1 translate="no">FunctionOverloadingNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This class allows to define multiple overloaded versions
  17. of the same function. Depending on the parameters of the function
  18. call, the node picks the best-fit overloaded version.</p></div>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <h2>Constructor</h2>
  23. <h3 class="name name-method" id="FunctionOverloadingNode" translate="no">new <a href="#FunctionOverloadingNode">FunctionOverloadingNode</a><span class="signature">( functionNodes : <span class="param-type">Array.&lt;function()></span>, &hellip;parametersNodes : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Constructs a new function overloading node.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name">
  32. <strong>functionNodes</strong>
  33. </td>
  34. <td class="description last">
  35. <p>Array of <code>Fn</code> function definitions.</p>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td class="name">
  40. <strong>parametersNodes</strong>
  41. </td>
  42. <td class="description last">
  43. <p>A list of parameter nodes.</p>
  44. </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="functionNodes" translate="no">.<a href="#functionNodes">functionNodes</a><span class="type-signature"> : Array.&lt;function()></span> </h3>
  53. <div class="description">
  54. <p>Array of <code>Fn</code> function definitions.</p>
  55. </div>
  56. </div>
  57. <div class="member">
  58. <h3 class="name" id="global" translate="no">.<a href="#global">global</a><span class="type-signature"> : boolean</span> </h3>
  59. <div class="description">
  60. <p>This node is marked as global.</p>
  61. <p>Default is <code>true</code>.</p>
  62. </div>
  63. <dl class="details">
  64. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#global">Node#global</a></dt>
  65. </dl>
  66. </div>
  67. <div class="member">
  68. <h3 class="name" id="parametersNodes" translate="no">.<a href="#parametersNodes">parametersNodes</a><span class="type-signature"> : Array.&lt;<a href="Node.html">Node</a>></span> </h3>
  69. <div class="description">
  70. <p>A list of parameter nodes.</p>
  71. </div>
  72. </div>
  73. <h2 class="subsection-title">Methods</h2>
  74. <h3 class="name name-method" id="getCandidateFn" translate="no">.<a href="#getCandidateFn">getCandidateFn</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : <a href="FunctionNode.html">FunctionNode</a></span> </h3>
  75. <div class="method">
  76. <div class="description">
  77. <p>Returns the candidate function for the current parameters.</p>
  78. </div>
  79. <table class="params">
  80. <tbody>
  81. <tr>
  82. <td class="name">
  83. <strong>builder</strong>
  84. </td>
  85. <td class="description last">
  86. <p>The current node builder.</p>
  87. </td>
  88. </tr>
  89. </tbody>
  90. </table>
  91. <dl class="details">
  92. <dt class="tag-returns"><strong>Returns:</strong> The candidate function.</dt>
  93. </dl>
  94. </div>
  95. <h3 class="name name-method" id="getNodeType" translate="no">.<a href="#getNodeType">getNodeType</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : string</span> </h3>
  96. <div class="method">
  97. <div class="description">
  98. <p>This method is overwritten since the node type is inferred from
  99. the function's return type.</p>
  100. </div>
  101. <table class="params">
  102. <tbody>
  103. <tr>
  104. <td class="name">
  105. <strong>builder</strong>
  106. </td>
  107. <td class="description last">
  108. <p>The current node builder.</p>
  109. </td>
  110. </tr>
  111. </tbody>
  112. </table>
  113. <dl class="details">
  114. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getNodeType">Node#getNodeType</a></dt>
  115. </dl>
  116. <dl class="details">
  117. <dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
  118. </dl>
  119. </div>
  120. <h3 class="name name-method" id="setup" translate="no">.<a href="#setup">setup</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  121. <div class="method">
  122. <div class="description">
  123. <p>Sets up the node for the current parameters.</p>
  124. </div>
  125. <table class="params">
  126. <tbody>
  127. <tr>
  128. <td class="name">
  129. <strong>builder</strong>
  130. </td>
  131. <td class="description last">
  132. <p>The current node builder.</p>
  133. </td>
  134. </tr>
  135. </tbody>
  136. </table>
  137. <dl class="details">
  138. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#setup">Node#setup</a></dt>
  139. </dl>
  140. <dl class="details">
  141. <dt class="tag-returns"><strong>Returns:</strong> The setup node.</dt>
  142. </dl>
  143. </div>
  144. <h2 class="subsection-title">Source</h2>
  145. <p>
  146. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/utils/FunctionOverloadingNode.js" translate="no" target="_blank" rel="noopener">src/nodes/utils/FunctionOverloadingNode.js</a>
  147. </p>
  148. </article>
  149. </section>
  150. <script src="../scripts/linenumber.js"></script>
  151. <script src="../scripts/page.js"></script>
  152. </body>
  153. </html>
粤ICP备19079148号