MRTNode.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>MRTNode - 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="OutputStructNode.html">OutputStructNode</a> → </p>
  13. <h1 translate="no">MRTNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This node can be used setup a MRT context for rendering. A typical MRT setup for
  17. post-processing is shown below:</p>
  18. <p>The MRT output is defined as a dictionary.</p></div>
  19. <h2>Code Example</h2>
  20. <div translate="no"><pre><code class="language-js">const mrtNode = mrt( {
  21. output: output,
  22. normal: normalView
  23. } ) ;
  24. </code></pre></div>
  25. </header>
  26. <article>
  27. <div class="container-overview">
  28. <h2>Constructor</h2>
  29. <h3 class="name name-method" id="MRTNode" translate="no">new <a href="#MRTNode">MRTNode</a><span class="signature">( outputNodes : <span class="param-type">Object.&lt;string, <a href="Node.html">Node</a>></span> )</span> </h3>
  30. <div class="method">
  31. <div class="description">
  32. <p>Constructs a new output struct node.</p>
  33. </div>
  34. <table class="params">
  35. <tbody>
  36. <tr>
  37. <td class="name">
  38. <strong>outputNodes</strong>
  39. </td>
  40. <td class="description last">
  41. <p>The MRT outputs.</p>
  42. </td>
  43. </tr>
  44. </tbody>
  45. </table>
  46. </div>
  47. </div>
  48. <h2 class="subsection-title">Properties</h2>
  49. <div class="member">
  50. <h3 class="name" id="isMRTNode" translate="no">.<a href="#isMRTNode">isMRTNode</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  51. <div class="description">
  52. <p>This flag can be used for type testing.</p>
  53. <p>Default is <code>true</code>.</p>
  54. </div>
  55. </div>
  56. <div class="member">
  57. <h3 class="name" id="outputNodes" translate="no">.<a href="#outputNodes">outputNodes</a><span class="type-signature"> : Object.&lt;string, <a href="Node.html">Node</a>></span> </h3>
  58. <div class="description">
  59. <p>A dictionary representing the MRT outputs. The key
  60. is the name of the output, the value the node which produces
  61. the output result.</p>
  62. </div>
  63. </div>
  64. <h2 class="subsection-title">Methods</h2>
  65. <h3 class="name name-method" id="get" translate="no">.<a href="#get">get</a><span class="signature">( name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  66. <div class="method">
  67. <div class="description">
  68. <p>Returns the output node for the given name.</p>
  69. </div>
  70. <table class="params">
  71. <tbody>
  72. <tr>
  73. <td class="name">
  74. <strong>name</strong>
  75. </td>
  76. <td class="description last">
  77. <p>The name of the output.</p>
  78. </td>
  79. </tr>
  80. </tbody>
  81. </table>
  82. <dl class="details">
  83. <dt class="tag-returns"><strong>Returns:</strong> The output node.</dt>
  84. </dl>
  85. </div>
  86. <h3 class="name name-method" id="has" translate="no">.<a href="#has">has</a><span class="signature">( name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="NodeBuilder.html">NodeBuilder</a></span> </h3>
  87. <div class="method">
  88. <div class="description">
  89. <p>Returns <code>true</code> if the MRT node has an output with the given name.</p>
  90. </div>
  91. <table class="params">
  92. <tbody>
  93. <tr>
  94. <td class="name">
  95. <strong>name</strong>
  96. </td>
  97. <td class="description last">
  98. <p>The name of the output.</p>
  99. </td>
  100. </tr>
  101. </tbody>
  102. </table>
  103. <dl class="details">
  104. <dt class="tag-returns"><strong>Returns:</strong> Whether the MRT node has an output for the given name or not.</dt>
  105. </dl>
  106. </div>
  107. <h3 class="name name-method" id="merge" translate="no">.<a href="#merge">merge</a><span class="signature">( mrtNode : <span class="param-type"><a href="MRTNode.html">MRTNode</a></span> )</span><span class="type-signature"> : <a href="MRTNode.html">MRTNode</a></span> </h3>
  108. <div class="method">
  109. <div class="description">
  110. <p>Merges the outputs of the given MRT node with the outputs of this node.</p>
  111. </div>
  112. <table class="params">
  113. <tbody>
  114. <tr>
  115. <td class="name">
  116. <strong>mrtNode</strong>
  117. </td>
  118. <td class="description last">
  119. <p>The MRT to merge.</p>
  120. </td>
  121. </tr>
  122. </tbody>
  123. </table>
  124. <dl class="details">
  125. <dt class="tag-returns"><strong>Returns:</strong> A new MRT node with merged outputs..</dt>
  126. </dl>
  127. </div>
  128. <h2 class="subsection-title">Source</h2>
  129. <p>
  130. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/MRTNode.js" translate="no" target="_blank" rel="noopener">src/nodes/core/MRTNode.js</a>
  131. </p>
  132. </article>
  133. </section>
  134. <script src="../scripts/linenumber.js"></script>
  135. <script src="../scripts/page.js"></script>
  136. </body>
  137. </html>
粤ICP备19079148号