MRTNode.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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, Node></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"><code>outputNodes</code></td>
  38. <td class="description last"><p>The MRT outputs.</p></td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. </div>
  43. </div>
  44. <h2 class="subsection-title">Properties</h2>
  45. <div class="member">
  46. <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>
  47. <div class="description">
  48. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  49. </div>
  50. </div>
  51. <div class="member">
  52. <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>
  53. <div class="description">
  54. <p>A dictionary representing the MRT outputs. The key
  55. is the name of the output, the value the node which produces
  56. the output result.</p>
  57. </div>
  58. </div>
  59. <h2 class="subsection-title">Methods</h2>
  60. <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>
  61. <div class="method">
  62. <div class="description">
  63. <p>Returns the output node for the given name.</p>
  64. </div>
  65. <table class="params">
  66. <tbody>
  67. <tr>
  68. <td class="name"><code>name</code></td>
  69. <td class="description last"><p>The name of the output.</p></td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. <dl class="details">
  74. <dt class="tag-returns"><strong>Returns:</strong> The output node.</dt>
  75. </dl>
  76. </div>
  77. <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>
  78. <div class="method">
  79. <div class="description">
  80. <p>Returns <code>true</code> if the MRT node has an output with the given name.</p>
  81. </div>
  82. <table class="params">
  83. <tbody>
  84. <tr>
  85. <td class="name"><code>name</code></td>
  86. <td class="description last"><p>The name of the output.</p></td>
  87. </tr>
  88. </tbody>
  89. </table>
  90. <dl class="details">
  91. <dt class="tag-returns"><strong>Returns:</strong> Whether the MRT node has an output for the given name or not.</dt>
  92. </dl>
  93. </div>
  94. <h3 class="name name-method" id="merge" translate="no">.<a href="#merge">merge</a><span class="signature">( mrtNode : <span class="param-type">MRTNode</span> )</span><span class="type-signature"> : <a href="MRTNode.html">MRTNode</a></span> </h3>
  95. <div class="method">
  96. <div class="description">
  97. <p>Merges the outputs of the given MRT node with the outputs of this node.</p>
  98. </div>
  99. <table class="params">
  100. <tbody>
  101. <tr>
  102. <td class="name"><code>mrtNode</code></td>
  103. <td class="description last"><p>The MRT to merge.</p></td>
  104. </tr>
  105. </tbody>
  106. </table>
  107. <dl class="details">
  108. <dt class="tag-returns"><strong>Returns:</strong> A new MRT node with merged outputs..</dt>
  109. </dl>
  110. </div>
  111. <h2 class="subsection-title">Source</h2>
  112. <p>
  113. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/MRTNode.js" target="_blank" rel="noopener" translate="no">src/nodes/core/MRTNode.js</a>
  114. </p>
  115. </article>
  116. </section>
  117. <script src="../scripts/linenumber.js"></script>
  118. <script src="../scripts/page.js"></script>
  119. </body>
  120. </html>
粤ICP备19079148号