StereoCamera.html 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>StereoCamera - 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">StereoCamera</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>A special type of camera that uses two perspective cameras with
  16. stereoscopic projection. Can be used for rendering stereo effects
  17. like <a href="https://en.wikipedia.org/wiki/Anaglyph_3D">3D Anaglyph</a> or
  18. <a href="https://en.wikipedia.org/wiki/parallax_barrier">Parallax Barrier</a>.</p></div>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <h2>Constructor</h2>
  23. <h3 class="name name-method" id="StereoCamera" translate="no">new <a href="#StereoCamera">StereoCamera</a><span class="signature">()</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Constructs a new stereo camera.</p>
  27. </div>
  28. </div>
  29. </div>
  30. <h2 class="subsection-title">Properties</h2>
  31. <div class="member">
  32. <h3 class="name" id="aspect" translate="no">.<a href="#aspect">aspect</a><span class="type-signature"> : number</span> </h3>
  33. <div class="description">
  34. <p>The aspect.<br/>Default is <code>1</code>.</p>
  35. </div>
  36. </div>
  37. <div class="member">
  38. <h3 class="name" id="cameraL" translate="no">.<a href="#cameraL">cameraL</a><span class="type-signature"> : <a href="PerspectiveCamera.html">PerspectiveCamera</a></span> </h3>
  39. <div class="description">
  40. <p>The camera representing the left eye. This is added to layer <code>1</code> so objects to be
  41. rendered by the left camera must also be added to this layer.</p>
  42. </div>
  43. </div>
  44. <div class="member">
  45. <h3 class="name" id="cameraR" translate="no">.<a href="#cameraR">cameraR</a><span class="type-signature"> : <a href="PerspectiveCamera.html">PerspectiveCamera</a></span> </h3>
  46. <div class="description">
  47. <p>The camera representing the right eye. This is added to layer <code>2</code> so objects to be
  48. rendered by the right camera must also be added to this layer.</p>
  49. </div>
  50. </div>
  51. <div class="member">
  52. <h3 class="name" id="eyeSep" translate="no">.<a href="#eyeSep">eyeSep</a><span class="type-signature"> : number</span> </h3>
  53. <div class="description">
  54. <p>The eye separation which represents the distance
  55. between the left and right camera.<br/>Default is <code>0.064</code>.</p>
  56. </div>
  57. </div>
  58. <div class="member">
  59. <h3 class="name" id="type" translate="no">.<a href="#type">type</a><span class="type-signature"> : string</span> <span class="type-signature">(readonly) </span></h3>
  60. <div class="description">
  61. <p>The type property is used for detecting the object type
  62. in context of serialization/deserialization.</p>
  63. </div>
  64. </div>
  65. <h2 class="subsection-title">Methods</h2>
  66. <h3 class="name name-method" id="update" translate="no">.<a href="#update">update</a><span class="signature">( camera : <span class="param-type">PerspectiveCamera</span> )</span> </h3>
  67. <div class="method">
  68. <div class="description">
  69. <p>Updates the stereo camera based on the given perspective camera.</p>
  70. </div>
  71. <table class="params">
  72. <tbody>
  73. <tr>
  74. <td class="name"><code>camera</code></td>
  75. <td class="description last"><p>The perspective camera.</p></td>
  76. </tr>
  77. </tbody>
  78. </table>
  79. </div>
  80. <h2 class="subsection-title">Source</h2>
  81. <p>
  82. <a href="https://github.com/mrdoob/three.js/blob/master/src/cameras/StereoCamera.js" target="_blank" rel="noopener" translate="no">src/cameras/StereoCamera.js</a>
  83. </p>
  84. </article>
  85. </section>
  86. <script src="../scripts/linenumber.js"></script>
  87. <script src="../scripts/page.js"></script>
  88. </body>
  89. </html>
粤ICP备19079148号