1
0

StereoEffect.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>StereoEffect - 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. <h1 translate="no">StereoEffect</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>A class that creates an stereo effect.</p>
  16. <p>Note that this class can only be used with <a href="WebGLRenderer.html">WebGLRenderer</a>.
  17. When using <a href="WebGPURenderer.html">WebGPURenderer</a>, use <a href="StereoPassNode.html">StereoPassNode</a>.</p></div>
  18. </header>
  19. <article>
  20. <h2 class="subsection-title">Import</h2>
  21. <p><span translate="no">StereoEffect</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  22. <pre><code class="language-js">import { StereoEffect } from 'three/addons/effects/StereoEffect.js';</code></pre>
  23. <div class="container-overview">
  24. <h2>Constructor</h2>
  25. <h3 class="name name-method" id="StereoEffect" translate="no">new <a href="#StereoEffect">StereoEffect</a><span class="signature">( renderer : <span class="param-type">WebGLRenderer</span> )</span> </h3>
  26. <div class="method">
  27. <div class="description">
  28. <p>Constructs a new stereo effect.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name"><code>renderer</code></td>
  34. <td class="description last"><p>The renderer.</p></td>
  35. </tr>
  36. </tbody>
  37. </table>
  38. </div>
  39. </div>
  40. <h2 class="subsection-title">Methods</h2>
  41. <h3 class="name name-method" id="render" translate="no">.<a href="#render">render</a><span class="signature">( scene : <span class="param-type">Object3D</span>, camera : <span class="param-type">Camera</span> )</span> </h3>
  42. <div class="method">
  43. <div class="description">
  44. <p>When using this effect, this method should be called instead of the
  45. default <a href="WebGLRenderer.html#render">WebGLRenderer#render</a>.</p>
  46. </div>
  47. <table class="params">
  48. <tbody>
  49. <tr>
  50. <td class="name"><code>scene</code></td>
  51. <td class="description last"><p>The scene to render.</p></td>
  52. </tr>
  53. <tr>
  54. <td class="name"><code>camera</code></td>
  55. <td class="description last"><p>The camera.</p></td>
  56. </tr>
  57. </tbody>
  58. </table>
  59. </div>
  60. <h3 class="name name-method" id="setEyeSeparation" translate="no">.<a href="#setEyeSeparation">setEyeSeparation</a><span class="signature">( eyeSep : <span class="param-type">number</span> )</span> </h3>
  61. <div class="method">
  62. <div class="description">
  63. <p>Sets the given eye separation.</p>
  64. </div>
  65. <table class="params">
  66. <tbody>
  67. <tr>
  68. <td class="name"><code>eyeSep</code></td>
  69. <td class="description last"><p>The eye separation to set.</p></td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. </div>
  74. <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>
  75. <div class="method">
  76. <div class="description">
  77. <p>Resizes the effect.</p>
  78. </div>
  79. <table class="params">
  80. <tbody>
  81. <tr>
  82. <td class="name"><code>width</code></td>
  83. <td class="description last"><p>The width of the effect in logical pixels.</p></td>
  84. </tr>
  85. <tr>
  86. <td class="name"><code>height</code></td>
  87. <td class="description last"><p>The height of the effect in logical pixels.</p></td>
  88. </tr>
  89. </tbody>
  90. </table>
  91. </div>
  92. <h2 class="subsection-title">Source</h2>
  93. <p>
  94. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/effects/StereoEffect.js" target="_blank" rel="noopener" translate="no">examples/jsm/effects/StereoEffect.js</a>
  95. </p>
  96. </article>
  97. </section>
  98. <script src="../scripts/linenumber.js"></script>
  99. <script src="../scripts/page.js"></script>
  100. </body>
  101. </html>
粤ICP备19079148号