SetNode.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>SetNode - 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">SetNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This module is part of the TSL core and usually not used in app level code.
  17. <code>SetNode</code> represents a set operation which means it is used to implement any
  18. <code>setXYZW()</code>, <code>setRGBA()</code> and <code>setSTPQ()</code> method invocations on node objects.
  19. For example:</p></div>
  20. <h2>Code Example</h2>
  21. <div translate="no"><pre><code class="language-js">materialLine.colorNode = color( 0, 0, 0 ).setR( float( 1 ) );
  22. </code></pre></div>
  23. </header>
  24. <article>
  25. <div class="container-overview">
  26. <h2>Constructor</h2>
  27. <h3 class="name name-method" id="SetNode" translate="no">new <a href="#SetNode">SetNode</a><span class="signature">( sourceNode : <span class="param-type"><a href="Node.html">Node</a></span>, components : <span class="param-type">string</span>, targetNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
  28. <div class="method">
  29. <div class="description">
  30. <p>Constructs a new set node.</p>
  31. </div>
  32. <table class="params">
  33. <tbody>
  34. <tr>
  35. <td class="name">
  36. <strong>sourceNode</strong>
  37. </td>
  38. <td class="description last">
  39. <p>The node that should be updated.</p>
  40. </td>
  41. </tr>
  42. <tr>
  43. <td class="name">
  44. <strong>components</strong>
  45. </td>
  46. <td class="description last">
  47. <p>The components that should be updated.</p>
  48. </td>
  49. </tr>
  50. <tr>
  51. <td class="name">
  52. <strong>targetNode</strong>
  53. </td>
  54. <td class="description last">
  55. <p>The value node.</p>
  56. </td>
  57. </tr>
  58. </tbody>
  59. </table>
  60. </div>
  61. </div>
  62. <h2 class="subsection-title">Properties</h2>
  63. <div class="member">
  64. <h3 class="name" id="components" translate="no">.<a href="#components">components</a><span class="type-signature"> : string</span> </h3>
  65. <div class="description">
  66. <p>The components that should be updated.</p>
  67. </div>
  68. </div>
  69. <div class="member">
  70. <h3 class="name" id="sourceNode" translate="no">.<a href="#sourceNode">sourceNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  71. <div class="description">
  72. <p>The node that should be updated.</p>
  73. </div>
  74. </div>
  75. <div class="member">
  76. <h3 class="name" id="targetNode" translate="no">.<a href="#targetNode">targetNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  77. <div class="description">
  78. <p>The value node.</p>
  79. </div>
  80. </div>
  81. <h2 class="subsection-title">Methods</h2>
  82. <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>
  83. <div class="method">
  84. <div class="description">
  85. <p>This method is overwritten since the node type is inferred from <a href="SetNode.html#sourceNode">SetNode#sourceNode</a>.</p>
  86. </div>
  87. <table class="params">
  88. <tbody>
  89. <tr>
  90. <td class="name">
  91. <strong>builder</strong>
  92. </td>
  93. <td class="description last">
  94. <p>The current node builder.</p>
  95. </td>
  96. </tr>
  97. </tbody>
  98. </table>
  99. <dl class="details">
  100. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#getNodeType">TempNode#getNodeType</a></dt>
  101. </dl>
  102. <dl class="details">
  103. <dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
  104. </dl>
  105. </div>
  106. <h2 class="subsection-title">Source</h2>
  107. <p>
  108. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/utils/SetNode.js" translate="no" target="_blank" rel="noopener">src/nodes/utils/SetNode.js</a>
  109. </p>
  110. </article>
  111. </section>
  112. <script src="../scripts/linenumber.js"></script>
  113. <script src="../scripts/page.js"></script>
  114. </body>
  115. </html>
粤ICP备19079148号