FunctionOverloadingNode.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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">Node</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"><code>functionNodes</code></td>
  32. <td class="description last"><p>Array of <code>Fn</code> function definitions.</p></td>
  33. </tr>
  34. <tr>
  35. <td class="name"><code>parametersNodes</code></td>
  36. <td class="description last"><p>A list of parameter nodes.</p></td>
  37. </tr>
  38. </tbody>
  39. </table>
  40. </div>
  41. </div>
  42. <h2 class="subsection-title">Properties</h2>
  43. <div class="member">
  44. <h3 class="name" id="functionNodes" translate="no">.<a href="#functionNodes">functionNodes</a><span class="type-signature"> : Array.&lt;function()></span> </h3>
  45. <div class="description">
  46. <p>Array of <code>Fn</code> function definitions.</p>
  47. </div>
  48. </div>
  49. <div class="member">
  50. <h3 class="name" id="global" translate="no">.<a href="#global">global</a><span class="type-signature"> : boolean</span> </h3>
  51. <div class="description">
  52. <p>This node is marked as global.<br/>Default is <code>true</code>.</p>
  53. </div>
  54. <dl class="details">
  55. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#global">Node#global</a></dt>
  56. </dl>
  57. </div>
  58. <div class="member">
  59. <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>
  60. <div class="description">
  61. <p>A list of parameter nodes.</p>
  62. </div>
  63. </div>
  64. <h2 class="subsection-title">Methods</h2>
  65. <h3 class="name name-method" id="getCandidateFn" translate="no">.<a href="#getCandidateFn">getCandidateFn</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : <a href="FunctionNode.html">FunctionNode</a></span> </h3>
  66. <div class="method">
  67. <div class="description">
  68. <p>Returns the candidate function for the current parameters.</p>
  69. </div>
  70. <table class="params">
  71. <tbody>
  72. <tr>
  73. <td class="name"><code>builder</code></td>
  74. <td class="description last"><p>The current node builder.</p></td>
  75. </tr>
  76. </tbody>
  77. </table>
  78. <dl class="details">
  79. <dt class="tag-returns"><strong>Returns:</strong> The candidate function.</dt>
  80. </dl>
  81. </div>
  82. <h3 class="name name-method" id="getNodeType" translate="no">.<a href="#getNodeType">getNodeType</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : string</span> </h3>
  83. <div class="method">
  84. <div class="description">
  85. <p>This method is overwritten since the node type is inferred from
  86. the function's return type.</p>
  87. </div>
  88. <table class="params">
  89. <tbody>
  90. <tr>
  91. <td class="name"><code>builder</code></td>
  92. <td class="description last"><p>The current node builder.</p></td>
  93. </tr>
  94. </tbody>
  95. </table>
  96. <dl class="details">
  97. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getNodeType">Node#getNodeType</a></dt>
  98. </dl>
  99. <dl class="details">
  100. <dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
  101. </dl>
  102. </div>
  103. <h3 class="name name-method" id="setup" translate="no">.<a href="#setup">setup</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  104. <div class="method">
  105. <div class="description">
  106. <p>Sets up the node for the current parameters.</p>
  107. </div>
  108. <table class="params">
  109. <tbody>
  110. <tr>
  111. <td class="name"><code>builder</code></td>
  112. <td class="description last"><p>The current node builder.</p></td>
  113. </tr>
  114. </tbody>
  115. </table>
  116. <dl class="details">
  117. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#setup">Node#setup</a></dt>
  118. </dl>
  119. <dl class="details">
  120. <dt class="tag-returns"><strong>Returns:</strong> The setup node.</dt>
  121. </dl>
  122. </div>
  123. <h2 class="subsection-title">Source</h2>
  124. <p>
  125. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/utils/FunctionOverloadingNode.js" target="_blank" rel="noopener" translate="no">src/nodes/utils/FunctionOverloadingNode.js</a>
  126. </p>
  127. </article>
  128. </section>
  129. <script src="../scripts/linenumber.js"></script>
  130. <script src="../scripts/page.js"></script>
  131. </body>
  132. </html>
粤ICP备19079148号