Camera.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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.</p>
  40. <p>Default is <code>true</code>.</p>
  41. </div>
  42. </div>
  43. <div class="member">
  44. <h3 class="name" id="matrixWorldInverse" translate="no">.<a href="#matrixWorldInverse">matrixWorldInverse</a><span class="type-signature"> : <a href="Matrix4.html">Matrix4</a></span> </h3>
  45. <div class="description">
  46. <p>The inverse of the camera's world matrix.</p>
  47. </div>
  48. </div>
  49. <div class="member">
  50. <h3 class="name" id="projectionMatrix" translate="no">.<a href="#projectionMatrix">projectionMatrix</a><span class="type-signature"> : <a href="Matrix4.html">Matrix4</a></span> </h3>
  51. <div class="description">
  52. <p>The camera's projection matrix.</p>
  53. </div>
  54. </div>
  55. <div class="member">
  56. <h3 class="name" id="projectionMatrixInverse" translate="no">.<a href="#projectionMatrixInverse">projectionMatrixInverse</a><span class="type-signature"> : <a href="Matrix4.html">Matrix4</a></span> </h3>
  57. <div class="description">
  58. <p>The inverse of the camera's projection matrix.</p>
  59. </div>
  60. </div>
  61. <div class="member">
  62. <h3 class="name" id="reversedDepth" translate="no">.<a href="#reversedDepth">reversedDepth</a><span class="type-signature"> : boolean</span> </h3>
  63. <div class="description">
  64. <p>The flag that indicates whether the camera uses a reversed depth buffer.</p>
  65. <p>Default is <code>false</code>.</p>
  66. </div>
  67. </div>
  68. <h2 class="subsection-title">Methods</h2>
  69. <h3 class="name name-method" id="getWorldDirection" translate="no">.<a href="#getWorldDirection">getWorldDirection</a><span class="signature">( target : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span><span class="type-signature"> : <a href="Vector3.html">Vector3</a></span> </h3>
  70. <div class="method">
  71. <div class="description">
  72. <p>Returns a vector representing the (&quot;look&quot;) direction of the 3D object in world space.</p>
  73. <p>This method is overwritten since cameras have a different forward vector compared to other
  74. 3D objects. A camera looks down its local, negative z-axis by default.</p>
  75. </div>
  76. <table class="params">
  77. <tbody>
  78. <tr>
  79. <td class="name">
  80. <strong>target</strong>
  81. </td>
  82. <td class="description last">
  83. <p>The target vector the result is stored to.</p>
  84. </td>
  85. </tr>
  86. </tbody>
  87. </table>
  88. <dl class="details">
  89. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Object3D.html#getWorldDirection">Object3D#getWorldDirection</a></dt>
  90. </dl>
  91. <dl class="details">
  92. <dt class="tag-returns"><strong>Returns:</strong> The 3D object's direction in world space.</dt>
  93. </dl>
  94. </div>
  95. <h2 class="subsection-title">Source</h2>
  96. <p>
  97. <a href="https://github.com/mrdoob/three.js/blob/master/src/cameras/Camera.js" translate="no" target="_blank" rel="noopener">src/cameras/Camera.js</a>
  98. </p>
  99. </article>
  100. </section>
  101. <script src="../scripts/linenumber.js"></script>
  102. <script src="../scripts/page.js"></script>
  103. </body>
  104. </html>
粤ICP备19079148号