StereoCompositePassNode.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>StereoCompositePassNode - 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> → <a href="PassNode.html">PassNode</a> → </p>
  13. <h1 translate="no">StereoCompositePassNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A special (abstract) render pass node that renders the scene
  17. as a stereoscopic image. Unlike <a href="StereoPassNode.html">StereoPassNode</a>, this
  18. node merges the image for the left and right eye
  19. into a single one. That is required for effects like
  20. anaglyph or parallax barrier.</p></div>
  21. </header>
  22. <article>
  23. <h2 class="subsection-title">Import</h2>
  24. <p><span translate="no">StereoCompositePassNode</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  25. <pre><code class="language-js">import { StereoCompositePassNode } from 'three/addons/tsl/display/StereoCompositePassNode.js';</code></pre>
  26. <div class="container-overview">
  27. <h2>Constructor</h2>
  28. <h3 class="name name-method" id="StereoCompositePassNode" translate="no">new <a href="#StereoCompositePassNode">StereoCompositePassNode</a><span class="signature">( scene : <span class="param-type"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span> )</span> <span class="type-signature">(abstract) </span></h3>
  29. <div class="method">
  30. <div class="description">
  31. <p>Constructs a new stereo composite pass node.</p>
  32. </div>
  33. <table class="params">
  34. <tbody>
  35. <tr>
  36. <td class="name">
  37. <strong>scene</strong>
  38. </td>
  39. <td class="description last">
  40. <p>The scene to render.</p>
  41. </td>
  42. </tr>
  43. <tr>
  44. <td class="name">
  45. <strong>camera</strong>
  46. </td>
  47. <td class="description last">
  48. <p>The camera to render the scene with.</p>
  49. </td>
  50. </tr>
  51. </tbody>
  52. </table>
  53. </div>
  54. </div>
  55. <h2 class="subsection-title">Properties</h2>
  56. <div class="member">
  57. <h3 class="name" id="_mapLeft" translate="no">.<a href="#_mapLeft">_mapLeft</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  58. <div class="description">
  59. <p>A texture node representing the left's eye view.</p>
  60. </div>
  61. </div>
  62. <div class="member">
  63. <h3 class="name" id="_mapRight" translate="no">.<a href="#_mapRight">_mapRight</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  64. <div class="description">
  65. <p>A texture node representing the right's eye view.</p>
  66. </div>
  67. </div>
  68. <div class="member">
  69. <h3 class="name" id="_material" translate="no">.<a href="#_material">_material</a><span class="type-signature"> : <a href="NodeMaterial.html">NodeMaterial</a></span> </h3>
  70. <div class="description">
  71. <p>The node material that implements the composite. All
  72. derived effect passes must provide an instance for rendering.</p>
  73. </div>
  74. </div>
  75. <div class="member">
  76. <h3 class="name" id="_renderTargetL" translate="no">.<a href="#_renderTargetL">_renderTargetL</a><span class="type-signature"> : <a href="RenderTarget.html">RenderTarget</a></span> </h3>
  77. <div class="description">
  78. <p>The render target for rendering the left eye's view.</p>
  79. </div>
  80. </div>
  81. <div class="member">
  82. <h3 class="name" id="_renderTargetR" translate="no">.<a href="#_renderTargetR">_renderTargetR</a><span class="type-signature"> : <a href="RenderTarget.html">RenderTarget</a></span> </h3>
  83. <div class="description">
  84. <p>The render target for rendering the right eye's view.</p>
  85. </div>
  86. </div>
  87. <div class="member">
  88. <h3 class="name" id="isStereoCompositePassNode" translate="no">.<a href="#isStereoCompositePassNode">isStereoCompositePassNode</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  89. <div class="description">
  90. <p>This flag can be used for type testing.</p>
  91. <p>Default is <code>true</code>.</p>
  92. </div>
  93. </div>
  94. <div class="member">
  95. <h3 class="name" id="stereo" translate="no">.<a href="#stereo">stereo</a><span class="type-signature"> : <a href="StereoCamera.html">StereoCamera</a></span> </h3>
  96. <div class="description">
  97. <p>The internal stereo camera that is used to render the scene.</p>
  98. </div>
  99. </div>
  100. <h2 class="subsection-title">Methods</h2>
  101. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  102. <div class="method">
  103. <div class="description">
  104. <p>Frees internal resources. This method should be called
  105. when the pass is no longer required.</p>
  106. </div>
  107. <dl class="details">
  108. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="PassNode.html#dispose">PassNode#dispose</a></dt>
  109. </dl>
  110. </div>
  111. <h3 class="name name-method" id="setSize" translate="no">.<a href="#setSize">setSize</a><span class="signature">( width : <span class="param-type">number</span>, height : <span class="param-type">number</span> )</span> </h3>
  112. <div class="method">
  113. <div class="description">
  114. <p>Sets the size of the pass.</p>
  115. </div>
  116. <table class="params">
  117. <tbody>
  118. <tr>
  119. <td class="name">
  120. <strong>width</strong>
  121. </td>
  122. <td class="description last">
  123. <p>The width of the pass.</p>
  124. </td>
  125. </tr>
  126. <tr>
  127. <td class="name">
  128. <strong>height</strong>
  129. </td>
  130. <td class="description last">
  131. <p>The height of the pass.</p>
  132. </td>
  133. </tr>
  134. </tbody>
  135. </table>
  136. <dl class="details">
  137. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="PassNode.html#setSize">PassNode#setSize</a></dt>
  138. </dl>
  139. </div>
  140. <h3 class="name name-method" id="updateBefore" translate="no">.<a href="#updateBefore">updateBefore</a><span class="signature">( frame : <span class="param-type"><a href="NodeFrame.html">NodeFrame</a></span> )</span> </h3>
  141. <div class="method">
  142. <div class="description">
  143. <p>This method is used to render the effect once per frame.</p>
  144. </div>
  145. <table class="params">
  146. <tbody>
  147. <tr>
  148. <td class="name">
  149. <strong>frame</strong>
  150. </td>
  151. <td class="description last">
  152. <p>The current node frame.</p>
  153. </td>
  154. </tr>
  155. </tbody>
  156. </table>
  157. <dl class="details">
  158. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="PassNode.html#updateBefore">PassNode#updateBefore</a></dt>
  159. </dl>
  160. </div>
  161. <h3 class="name name-method" id="updateStereoCamera" translate="no">.<a href="#updateStereoCamera">updateStereoCamera</a><span class="signature">( coordinateSystem : <span class="param-type">number</span> )</span> </h3>
  162. <div class="method">
  163. <div class="description">
  164. <p>Updates the internal stereo camera.</p>
  165. </div>
  166. <table class="params">
  167. <tbody>
  168. <tr>
  169. <td class="name">
  170. <strong>coordinateSystem</strong>
  171. </td>
  172. <td class="description last">
  173. <p>The current coordinate system.</p>
  174. </td>
  175. </tr>
  176. </tbody>
  177. </table>
  178. </div>
  179. <h2 class="subsection-title">Source</h2>
  180. <p>
  181. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/display/StereoCompositePassNode.js" target="_blank" rel="noopener" translate="no">examples/jsm/tsl/display/StereoCompositePassNode.js</a>
  182. </p>
  183. </article>
  184. </section>
  185. <script src="../scripts/linenumber.js"></script>
  186. <script src="../scripts/page.js"></script>
  187. </body>
  188. </html>
粤ICP备19079148号