CombinedCamera.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../../list.js"></script>
  6. <script src="../../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../../page.css" />
  8. </head>
  9. <body>
  10. [page:Camera] &rarr;
  11. <h1>[name]</h1>
  12. <div class="desc">A general perpose camera, for setting FOV, Lens Focal Length,
  13. and switching between perspective and orthographic views easily.
  14. Use this only if you do not wish to manage
  15. both a Orthographic and Perspective Camera</div>
  16. <h2>Constructor</h2>
  17. <h3>[name]([page:Number width], [page:Number height], [page:Number fov], [page:Number near], [page:Number far], [page:Number orthoNear], [page:Number orthoFar])</h3>
  18. <div>
  19. width -- Camera frustum width.<br />
  20. height -- Camera frustum height.<br />
  21. fov — Camera frustum vertical field of view in perspective view.<br />
  22. near — Camera frustum near plane in perspective view.<br />
  23. far — Camera frustum far plane in perspective view.<br />
  24. orthoNear — Camera frustum near plane in orthographic view.<br />
  25. orthoFar — Camera frustum far plane in orthographic view.
  26. </div>
  27. <div>
  28. Creates a [name]. This initializes 2 cameras, an OrthographicCamera and a PerspectiveCamera. The default is the perspective Camera.
  29. </div>
  30. <h2>Properties</h2>
  31. <h3>.[page:Number fov]</h3>
  32. <div>
  33. Gets or sets the camera frustum vertical field of view in perspective view.
  34. </div>
  35. <h3>.[page:number left]</h3>
  36. <div>
  37. Gets or sets the camera frustum left plane in orthographic view.
  38. </div>
  39. <h3>.[page:Number right]</h3>
  40. <div>
  41. Gets or sets the camera frustum right plane in orthographic view.
  42. </div>
  43. <h3>.[page:number top]</h3>
  44. <div>
  45. Gets or sets the camera frustum top plane in orthographic view.
  46. </div>
  47. <h3>.[page:Number bottom]</h3>
  48. <div>
  49. Gets or sets the camera frustum bottom plane in orthographic view.
  50. </div>
  51. <h3>.[page:number zoom]</h3>
  52. <div>
  53. Gets or sets the zoom factor of the camera.
  54. </div>
  55. <h3>.[page:number far]</h3>
  56. <div>
  57. Gets camera frustum far plane.
  58. </div>
  59. <h3>.[page:number near]</h3>
  60. <div>
  61. Gets camera frustum near plane.
  62. </div>
  63. <h3>.[page:OrthographicCamera cameraO]</h3>
  64. <div>
  65. Gets or sets the internal OrthographicCamera used as camera.
  66. </div>
  67. <h3>.[page:PerspectiveCamera cameraP]</h3>
  68. <div>
  69. Gets or sets the internal PerspectiveCamera used as camera.
  70. </div>
  71. <h3>.[page:boolean inOrthographicMode]</h3>
  72. <div>
  73. Gets whether the combinedCamera is in Orthographic Mode.
  74. </div>
  75. <h3>.[page:boolean inPerspectiveMode]</h3>
  76. <div>
  77. Gets whether the combinedCamera is in Perspective Mode.
  78. </div>
  79. <h2>Methods</h2>
  80. <h3>.setFov([page:Number fov])</h3>
  81. <div>
  82. fov -- Camera frustum vertical field of view in perspective view.
  83. </div>
  84. <div>
  85. sets the camera frustum vertical field of view in perspective view.
  86. </div>
  87. <h3>.setZoom([page:Number zoom]) [page:todo]</h3>
  88. <div>
  89. zoom -- The zoom factor.
  90. </div>
  91. <div>
  92. Sets the zoomfactor.
  93. </div>
  94. <h3>.setLens([page:number focalLength], [page:Number frameHeight]) [page:todo]</h3>
  95. <div>
  96. focalLength -- The focal length of a lens is defined as the distance from the optical center of a lens (or, the secondary principal point for a complex lens like a camera lens) to the focal point (sensor) when the lens is focused on an object at infinity. <br />
  97. frameHeight -- the size of the frame in mm. (default is *35*)
  98. </div>
  99. <div>
  100. Sets the fov based on lens data.
  101. </div>
  102. <h3>.toFrontView()</h3>
  103. <div>
  104. Sets the camera to view the front of the target.
  105. </div>
  106. <h3>.toBackView() </h3>
  107. <div>
  108. Sets the camera to view the back of the target.
  109. </div>
  110. <h3>.toLeftView() </h3>
  111. <div>
  112. Sets the camera to view the left of the target.
  113. </div>
  114. <h3>.toRightView()</h3>
  115. <div>
  116. Sets the camera to view the right of the target.
  117. </div>
  118. <h3>.toTopView()</h3>
  119. <div>
  120. Sets the camera to view the top.
  121. </div>
  122. <h3>.toBottomView()</h3>
  123. <div>
  124. Sets the camera to view the bottom.
  125. </div>
  126. <h3>.setSize([page:Number width], [page:Number height]) </h3>
  127. <div>
  128. width -- The width of the orthographic view.<br />
  129. height -- The height of the orthographic view.
  130. </div>
  131. <div>
  132. Sets the size of the orthographic view.
  133. </div>
  134. <h3>.toOrthographic()</h3>
  135. <div>
  136. Change the camera to orthographic view.
  137. </div>
  138. <h3>.toPerspective()</h3>
  139. <div>
  140. Change the camera to Perspective view.
  141. </div>
  142. <h3>.updateProjectionMatrix()</h3>
  143. <div>
  144. Updates the ProjectionMatrix.
  145. </div>
  146. <h2>Source</h2>
  147. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  148. </body>
  149. </html>