OperatorNode.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>OperatorNode - 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> → <a href="TempNode.html">TempNode</a> → </p>
  13. <h1 translate="no">OperatorNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This node represents basic mathematical and logical operations like addition,
  17. subtraction or comparisons (e.g. <code>equal()</code>).</p></div>
  18. </header>
  19. <article>
  20. <div class="container-overview">
  21. <h2>Constructor</h2>
  22. <h3 class="name name-method" id="OperatorNode" translate="no">new <a href="#OperatorNode">OperatorNode</a><span class="signature">( op : <span class="param-type">string</span>, aNode : <span class="param-type">Node</span>, bNode : <span class="param-type">Node</span>, &hellip;params : <span class="param-type">Node</span> )</span> </h3>
  23. <div class="method">
  24. <div class="description">
  25. <p>Constructs a new operator node.</p>
  26. </div>
  27. <table class="params">
  28. <tbody>
  29. <tr>
  30. <td class="name"><code>op</code></td>
  31. <td class="description last"><p>The operator.</p></td>
  32. </tr>
  33. <tr>
  34. <td class="name"><code>aNode</code></td>
  35. <td class="description last"><p>The first input.</p></td>
  36. </tr>
  37. <tr>
  38. <td class="name"><code>bNode</code></td>
  39. <td class="description last"><p>The second input.</p></td>
  40. </tr>
  41. <tr>
  42. <td class="name"><code>params</code></td>
  43. <td class="description last"><p>Additional input parameters.</p></td>
  44. </tr>
  45. </tbody>
  46. </table>
  47. </div>
  48. </div>
  49. <h2 class="subsection-title">Properties</h2>
  50. <div class="member">
  51. <h3 class="name" id="aNode" translate="no">.<a href="#aNode">aNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  52. <div class="description">
  53. <p>The first input.</p>
  54. </div>
  55. </div>
  56. <div class="member">
  57. <h3 class="name" id="bNode" translate="no">.<a href="#bNode">bNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  58. <div class="description">
  59. <p>The second input.</p>
  60. </div>
  61. </div>
  62. <div class="member">
  63. <h3 class="name" id="isOperatorNode" translate="no">.<a href="#isOperatorNode">isOperatorNode</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  64. <div class="description">
  65. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  66. </div>
  67. </div>
  68. <div class="member">
  69. <h3 class="name" id="op" translate="no">.<a href="#op">op</a><span class="type-signature"> : string</span> </h3>
  70. <div class="description">
  71. <p>The operator.</p>
  72. </div>
  73. </div>
  74. <h2 class="subsection-title">Methods</h2>
  75. <h3 class="name name-method" id="getNodeType" translate="no">.<a href="#getNodeType">getNodeType</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span>, output : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
  76. <div class="method">
  77. <div class="description">
  78. <p>This method is overwritten since the node type is inferred from the operator
  79. and the input node types.</p>
  80. </div>
  81. <table class="params">
  82. <tbody>
  83. <tr>
  84. <td class="name"><code>builder</code></td>
  85. <td class="description last"><p>The current node builder.</p></td>
  86. </tr>
  87. <tr>
  88. <td class="name"><code>output</code></td>
  89. <td class="description last"><p>The output type.<br/>Default is <code>null</code>.</p></td>
  90. </tr>
  91. </tbody>
  92. </table>
  93. <dl class="details">
  94. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#getNodeType">TempNode#getNodeType</a></dt>
  95. </dl>
  96. <dl class="details">
  97. <dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
  98. </dl>
  99. </div>
  100. <h3 class="name name-method" id="getOperatorMethod" translate="no">.<a href="#getOperatorMethod">getOperatorMethod</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span>, output : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
  101. <div class="method">
  102. <div class="description">
  103. <p>Returns the operator method name.</p>
  104. </div>
  105. <table class="params">
  106. <tbody>
  107. <tr>
  108. <td class="name"><code>builder</code></td>
  109. <td class="description last"><p>The current node builder.</p></td>
  110. </tr>
  111. <tr>
  112. <td class="name"><code>output</code></td>
  113. <td class="description last"><p>The output type.</p></td>
  114. </tr>
  115. </tbody>
  116. </table>
  117. <dl class="details">
  118. <dt class="tag-returns"><strong>Returns:</strong> The operator method name.</dt>
  119. </dl>
  120. </div>
  121. <h2 class="subsection-title">Source</h2>
  122. <p>
  123. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/math/OperatorNode.js" target="_blank" rel="noopener" translate="no">src/nodes/math/OperatorNode.js</a>
  124. </p>
  125. </article>
  126. </section>
  127. <script src="../scripts/linenumber.js"></script>
  128. <script src="../scripts/page.js"></script>
  129. </body>
  130. </html>
粤ICP备19079148号