OrthographicCamera.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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; [page:Camera] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">Camera with orthographic projection.</div>
  14. <h2>Example</h2>
  15. <div>[example:canvas_camera_orthographic camera / orthographic ]</div>
  16. <div>[example:canvas_camera_orthographic2 camera / orthographic2 ]</div>
  17. <div>[example:webgl_camera camera ]</div>
  18. <div>[example:webgl_interactive_cubes_ortho interactive / cubes / ortho ]</div>
  19. <div>[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]</div>
  20. <div>[example:webgl_postprocessing_advanced postprocessing / advanced ]</div>
  21. <div>[example:webgl_postprocessing_dof2 postprocessing / dof2 ]</div>
  22. <div>[example:webgl_postprocessing_godrays postprocessing / godrays ]</div>
  23. <div>[example:webgl_rtt rtt ]</div>
  24. <div>[example:webgl_shaders_tonemapping shaders / tonemapping ]</div>
  25. <div>[example:webgl_shadowmap shadowmap ]</div>
  26. <div>[example:webgl_terrain_dynamic terrain / dynamic ]</div>
  27. <code>var camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 );
  28. scene.add( camera );</code>
  29. <h2>Constructor</h2>
  30. <h3>[name]( [page:Float left], [page:Float right], [page:Float top], [page:Float bottom], [page:Float near], [page:Float far] )</h3>
  31. <div>
  32. left — Camera frustum left plane.<br />
  33. right — Camera frustum right plane.<br />
  34. top — Camera frustum top plane.<br />
  35. bottom — Camera frustum bottom plane.<br />
  36. near — Camera frustum near plane.<br />
  37. far — Camera frustum far plane.
  38. </div>
  39. <h2>Properties</h2>
  40. <h3>[property:number zoom]</h3>
  41. <div>Gets or sets the zoom factor of the camera. </div>
  42. <h3>[property:Float left]</h3>
  43. <div>Camera frustum left plane.</div>
  44. <h3>[property:Float right]</h3>
  45. <div>Camera frustum right plane.</div>
  46. <h3>[property:Float top]</h3>
  47. <div>Camera frustum top plane.</div>
  48. <h3>[property:Float bottom]</h3>
  49. <div>Camera frustum bottom plane.</div>
  50. <h3>[property:Float near]</h3>
  51. <div>Camera frustum near plane.</div>
  52. <h3>[property:Float far]</h3>
  53. <div>Camera frustum far plane.</div>
  54. <h2>Methods</h2>
  55. <h3>[method:null setViewOffset]( [page:Float fullWidth], [page:Float fullHeight], [page:Float x], [page:Float y], [page:Float width], [page:Float height] )</h3>
  56. <div>
  57. fullWidth — full width of multiview setup<br />
  58. fullHeight — full height of multiview setup<br />
  59. x — horizontal offset of subcamera<br />
  60. y — vertical offset of subcamera<br />
  61. width — width of subcamera<br />
  62. height — height of subcamera
  63. </div>
  64. <div>
  65. Sets an offset in a larger frustum. This is useful for multi-window or multi-monitor/multi-machine setups. For an example on how to use it see [page:PerspectiveCamera].
  66. </div>
  67. <h3>[method:null clearViewOffset]()</h3>
  68. <div>
  69. Removes any offset set by the .setViewOffset method.
  70. </div>
  71. <h3>[method:null updateProjectionMatrix]()</h3>
  72. <div>
  73. Updates the camera projection matrix. Must be called after change of parameters.
  74. </div>
  75. <h3>[method:OrthographicCamera clone]()</h3>
  76. <div>
  77. <br />
  78. It returns a clone of OrthographicCamera.
  79. </div>
  80. <h3>[method:JSON toJSON]()</h3>
  81. <div>
  82. Return camera data in JSON format.
  83. </div>
  84. <h2>Source</h2>
  85. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  86. </body>
  87. </html>