Camera.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Object3D] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">Abstract base class for cameras. This class should always be inherited when you build a new camera.</div>
  14. <h2>Constructor</h2>
  15. <h3>[name]()</h3>
  16. <div>
  17. This constructor sets the following properties to the correct type:
  18. [page:Camera.matrixWorldInverse matrixWorldInverse] and [page:Camera.projectionMatrix projectionMatrix].
  19. </div>
  20. <h2>Properties</h2>
  21. <div>See the base [page:Object3D] class for common properties.</div>
  22. <h3>[property:Boolean isCamera]</h3>
  23. <div>
  24. Used to check whether this or derived classes are cameras. Default is *true*.<br /><br />
  25. You should not change this, as it used internally by the renderer for optimisation.
  26. </div>
  27. <h3>[property:Matrix4 matrixWorldInverse]</h3>
  28. <div>
  29. This is the inverse of matrixWorld. MatrixWorld contains the Matrix which has
  30. the world transform of the Camera.
  31. </div>
  32. <h3>[property:Matrix4 projectionMatrix]</h3>
  33. <div>This is the matrix which contains the projection.</div>
  34. <h3>[property:Layers layers]</h3>
  35. <div>
  36. The [page:Layers layers] that the camera is a member of. This is an inherited
  37. property from [page:Object3D].<br /><br />
  38. Objects must share at least one layer with the camera to be seen
  39. when the camera's viewpoint is rendered.
  40. </div>
  41. <h2>Methods</h2>
  42. <div>See the base [page:Objct3D] class for common methods.</div>
  43. <h3>[method:Vector3 getWorldDirection]( [page:Vector3 optionalTarget] )</h3>
  44. <div>
  45. vector — (optional)<br /><br />
  46. Returns a vector representing the direction in which the camera is looking,
  47. in world space. If the [page:Vector3 optionalTarget] is set, returns a vector representing the direction
  48. from the camera's position to the [page:Vector3 optionalTarget].
  49. </div>
  50. <h3>[method:null lookAt]( [page:Vector3 target] )</h3>
  51. <div>
  52. target — position in 3D space for the camera to point towards<br /><br />
  53. This makes the camera look at the vector position in the global space as long as
  54. the parent of this camera is the scene or at position (0,0,0).
  55. </div>
  56. <h3>[method:Camera clone]( [page:Camera camera] )</h3>
  57. <div>
  58. camera — camera to clone<br /><br />
  59. Returns a clone of camera.
  60. </div>
  61. <h2>Source</h2>
  62. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  63. </body>
  64. </html>