StereoCompositePassNode.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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" rel="noopener">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="isStereoCompositePassNode" translate="no">.<a href="#isStereoCompositePassNode">isStereoCompositePassNode</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  58. <div class="description">
  59. <p>This flag can be used for type testing.</p>
  60. <p>Default is <code>true</code>.</p>
  61. </div>
  62. </div>
  63. <div class="member">
  64. <h3 class="name" id="stereo" translate="no">.<a href="#stereo">stereo</a><span class="type-signature"> : <a href="StereoCamera.html">StereoCamera</a></span> </h3>
  65. <div class="description">
  66. <p>The internal stereo camera that is used to render the scene.</p>
  67. </div>
  68. </div>
  69. <h2 class="subsection-title">Methods</h2>
  70. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  71. <div class="method">
  72. <div class="description">
  73. <p>Frees internal resources. This method should be called
  74. when the pass is no longer required.</p>
  75. </div>
  76. <dl class="details">
  77. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="PassNode.html#dispose">PassNode#dispose</a></dt>
  78. </dl>
  79. </div>
  80. <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>
  81. <div class="method">
  82. <div class="description">
  83. <p>Sets the size of the pass.</p>
  84. </div>
  85. <table class="params">
  86. <tbody>
  87. <tr>
  88. <td class="name">
  89. <strong>width</strong>
  90. </td>
  91. <td class="description last">
  92. <p>The width of the pass.</p>
  93. </td>
  94. </tr>
  95. <tr>
  96. <td class="name">
  97. <strong>height</strong>
  98. </td>
  99. <td class="description last">
  100. <p>The height of the pass.</p>
  101. </td>
  102. </tr>
  103. </tbody>
  104. </table>
  105. <dl class="details">
  106. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="PassNode.html#setSize">PassNode#setSize</a></dt>
  107. </dl>
  108. </div>
  109. <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>
  110. <div class="method">
  111. <div class="description">
  112. <p>This method is used to render the effect once per frame.</p>
  113. </div>
  114. <table class="params">
  115. <tbody>
  116. <tr>
  117. <td class="name">
  118. <strong>frame</strong>
  119. </td>
  120. <td class="description last">
  121. <p>The current node frame.</p>
  122. </td>
  123. </tr>
  124. </tbody>
  125. </table>
  126. <dl class="details">
  127. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="PassNode.html#updateBefore">PassNode#updateBefore</a></dt>
  128. </dl>
  129. </div>
  130. <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>
  131. <div class="method">
  132. <div class="description">
  133. <p>Updates the internal stereo camera.</p>
  134. </div>
  135. <table class="params">
  136. <tbody>
  137. <tr>
  138. <td class="name">
  139. <strong>coordinateSystem</strong>
  140. </td>
  141. <td class="description last">
  142. <p>The current coordinate system.</p>
  143. </td>
  144. </tr>
  145. </tbody>
  146. </table>
  147. </div>
  148. <h2 class="subsection-title">Source</h2>
  149. <p>
  150. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/display/StereoCompositePassNode.js" translate="no" target="_blank" rel="noopener">examples/jsm/tsl/display/StereoCompositePassNode.js</a>
  151. </p>
  152. </article>
  153. </section>
  154. <script src="../scripts/linenumber.js"></script>
  155. <script src="../scripts/page.js"></script>
  156. </body>
  157. </html>
粤ICP备19079148号