Camera.html 4.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Camera - 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="Object3D.html">Object3D</a> → </p>
  13. <h1 translate="no">Camera</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Abstract base class for cameras. This class should always be inherited
  17. when you build a new camera.</p></div>
  18. </header>
  19. <article>
  20. <div class="container-overview">
  21. <h2>Constructor</h2>
  22. <h3 class="name name-method" id="Camera" translate="no">new <a href="#Camera">Camera</a><span class="signature">()</span> <span class="type-signature">(abstract) </span></h3>
  23. <div class="method">
  24. <div class="description">
  25. <p>Constructs a new camera.</p>
  26. </div>
  27. </div>
  28. </div>
  29. <h2 class="subsection-title">Properties</h2>
  30. <div class="member">
  31. <h3 class="name" id="coordinateSystem" translate="no">.<a href="#coordinateSystem">coordinateSystem</a><span class="type-signature"> : <a href="global.html#WebGLCoordinateSystem">WebGLCoordinateSystem</a> | <a href="global.html#WebGPUCoordinateSystem">WebGPUCoordinateSystem</a></span> </h3>
  32. <div class="description">
  33. <p>The coordinate system in which the camera is used.</p>
  34. </div>
  35. </div>
  36. <div class="member">
  37. <h3 class="name" id="isCamera" translate="no">.<a href="#isCamera">isCamera</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  38. <div class="description">
  39. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  40. </div>
  41. </div>
  42. <div class="member">
  43. <h3 class="name" id="matrixWorldInverse" translate="no">.<a href="#matrixWorldInverse">matrixWorldInverse</a><span class="type-signature"> : <a href="Matrix4.html">Matrix4</a></span> </h3>
  44. <div class="description">
  45. <p>The inverse of the camera's world matrix.</p>
  46. </div>
  47. </div>
  48. <div class="member">
  49. <h3 class="name" id="projectionMatrix" translate="no">.<a href="#projectionMatrix">projectionMatrix</a><span class="type-signature"> : <a href="Matrix4.html">Matrix4</a></span> </h3>
  50. <div class="description">
  51. <p>The camera's projection matrix.</p>
  52. </div>
  53. </div>
  54. <div class="member">
  55. <h3 class="name" id="projectionMatrixInverse" translate="no">.<a href="#projectionMatrixInverse">projectionMatrixInverse</a><span class="type-signature"> : <a href="Matrix4.html">Matrix4</a></span> </h3>
  56. <div class="description">
  57. <p>The inverse of the camera's projection matrix.</p>
  58. </div>
  59. </div>
  60. <div class="member">
  61. <h3 class="name" id="reversedDepth" translate="no">.<a href="#reversedDepth">reversedDepth</a><span class="type-signature"> : boolean</span> </h3>
  62. <div class="description">
  63. <p>The flag that indicates whether the camera uses a reversed depth buffer.<br/>Default is <code>false</code>.</p>
  64. </div>
  65. </div>
  66. <h2 class="subsection-title">Methods</h2>
  67. <h3 class="name name-method" id="getWorldDirection" translate="no">.<a href="#getWorldDirection">getWorldDirection</a><span class="signature">( target : <span class="param-type">Vector3</span> )</span><span class="type-signature"> : <a href="Vector3.html">Vector3</a></span> </h3>
  68. <div class="method">
  69. <div class="description">
  70. <p>Returns a vector representing the (&quot;look&quot;) direction of the 3D object in world space.</p>
  71. <p>This method is overwritten since cameras have a different forward vector compared to other
  72. 3D objects. A camera looks down its local, negative z-axis by default.</p>
  73. </div>
  74. <table class="params">
  75. <tbody>
  76. <tr>
  77. <td class="name"><code>target</code></td>
  78. <td class="description last"><p>The target vector the result is stored to.</p></td>
  79. </tr>
  80. </tbody>
  81. </table>
  82. <dl class="details">
  83. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Object3D.html#getWorldDirection">Object3D#getWorldDirection</a></dt>
  84. </dl>
  85. <dl class="details">
  86. <dt class="tag-returns"><strong>Returns:</strong> The 3D object's direction in world space.</dt>
  87. </dl>
  88. </div>
  89. <h2 class="subsection-title">Source</h2>
  90. <p>
  91. <a href="https://github.com/mrdoob/three.js/blob/master/src/cameras/Camera.js" target="_blank" rel="noopener" translate="no">src/cameras/Camera.js</a>
  92. </p>
  93. </article>
  94. </section>
  95. <script src="../scripts/linenumber.js"></script>
  96. <script src="../scripts/page.js"></script>
  97. </body>
  98. </html>
粤ICP备19079148号