OrthographicCamera.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <!DOCTYPE html>
  2. <html lang="ko">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:Object3D] &rarr; [page:Camera] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. [link:https://en.wikipedia.org/wiki/Orthographic_projection orthographic projection]을 사용하는 카메라입니다.<br /><br />
  14. 이 투영 모드에서는, 렌더링된 이미지에서 객체의 크기는 카메라와의 거리에 관계없이 일정하게 유지됩니다.<br /><br />
  15. 이 기능은 무엇보다도 2D 장면과 UI 요소를 렌더링하는 데 유용합니다.
  16. </p>
  17. <h2>코드 예제</h2>
  18. <code>
  19. const camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 );
  20. scene.add( camera );
  21. </code>
  22. <h2>예제</h2>
  23. <p>
  24. [example:webgl_camera camera ]<br />
  25. [example:webgl_interactive_cubes_ortho interactive / cubes / ortho ]<br />
  26. [example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]<br />
  27. [example:webgl_postprocessing_advanced postprocessing / advanced ]<br />
  28. [example:webgl_postprocessing_dof2 postprocessing / dof2 ]<br />
  29. [example:webgl_postprocessing_godrays postprocessing / godrays ]<br />
  30. [example:webgl_rtt rtt ]<br />
  31. [example:webgl_shadowmap shadowmap ]
  32. </p>
  33. <h2>생성자</h2>
  34. <h3>[name]( [param:Number left], [param:Number right], [param:Number top], [param:Number bottom], [param:Number near], [param:Number far] )</h3>
  35. <p>
  36. left — 카메라 절두체 좌평면.<br />
  37. right — 카메라 절두체 우평면.<br />
  38. top — 카메라 절두체 상평면.<br />
  39. bottom — 카메라 절두체 하평면.<br />
  40. near — 카메라 절두체 근평면.<br />
  41. far — 카메라 절두체 원평면.<br /><br />
  42. 이 설정을 통해 카메라의 [link:https://en.wikipedia.org/wiki/Viewing_frustum viewing frustum]를 정의합니다.
  43. </p>
  44. <h2>프로퍼티</h2>
  45. <p>
  46. 일반 프로퍼티는 기본 [page:Camera] 클래스를 참고하세요.<br>
  47. 이러한 속성을 변경한 후 변경 내용을 적용하려면 [page:OrthographicCamera.updateProjectionMatrix .updateProjectionMatrix]를 호출해야하는 점을 주의해주세요.
  48. </p>
  49. <h3>[property:Float bottom]</h3>
  50. <p>카메라 절두체 하평면.</p>
  51. <h3>[property:Float far]</h3>
  52. <p>
  53. 카메라 절두체 원평면. 기본값은 *2000*입니다.<br /><br />
  54. [page:.near near](근평면)의 현재 값보다 항상 더 커야합니다.
  55. </p>
  56. <h3>[property:Boolean isOrthographicCamera]</h3>
  57. <p>
  58. Read-only flag to check if a given object is of type [name].
  59. </p>
  60. <h3>[property:Float left]</h3>
  61. <p>카메라 절두체 좌평면.</p>
  62. <h3>[property:Float near]</h3>
  63. <p>
  64. 카메라 절두체 근평면. 기본값은 *0.1*입니다.<br /><br />
  65. 유효한 값의 범위는 0부터 [page:.far far](원평면) 값 사이입니다.
  66. [page:PerspectiveCamera]와 달리, OrthographicCamera의 근평면은 *0*도 유효한 값입니다.
  67. </p>
  68. <h3>[property:Float right]</h3>
  69. <p>카메라 절두체 우평면.</p>
  70. <h3>[property:Float top]</h3>
  71. <p>카메라 절두체 상평면.</p>
  72. <h3>[property:Object view]</h3>
  73. <p>[page:OrthographicCamera.setViewOffset setViewOffset]를 참고하세요. 기본값은 *null*입니다.</p>
  74. <h3>[property:number zoom]</h3>
  75. <p>확대 요소를 가져오거나 설정합니다. 기본값은 *1*입니다.</p>
  76. <h2>메서드</h2>
  77. <p>일반적인 메서드는 기본 [page:Camera] 클래스를 참고하세요.</p>
  78. <h3>[method:undefined setViewOffset]( [param:Float fullWidth], [param:Float fullHeight], [param:Float x], [param:Float y], [param:Float width], [param:Float height] )</h3>
  79. <p>
  80. fullWidth — 멀티뷰 설정 최대 너비<br />
  81. fullHeight — 멀티뷰 설정 최대 높이<br />
  82. x — 서브 카메라의 가로 오프셋<br />
  83. y — 서브 카메라의 가로 오프셋<br />
  84. width — 서브 카메라의 너비<br />
  85. height — 서브 카메라의 높이<br /><br />
  86. 보다 큰 [link:https://en.wikipedia.org/wiki/Viewing_frustum viewing frustum]의 오프셋을 설정합니다.
  87. 멀티윈도우, 멀티모니터/멀티머신 설정에 유용합니다.
  88. 사용 예제는 [page:PerspectiveCamera.setViewOffset PerspectiveCamera]를 참고하세요.
  89. </p>
  90. <h3>[method:undefined clearViewOffset]()</h3>
  91. <p>
  92. .setViewOffset 메서드로 설정된 오프셋을 모두 제거합니다.
  93. </p>
  94. <h3>[method:undefined updateProjectionMatrix]()</h3>
  95. <p>
  96. 카메라 투영 매트릭스를 업데이트합니다. 파라미터 변경 후에 반드시 호출해야 합니다.
  97. </p>
  98. <h3>[method:Object toJSON]([param:Object meta])</h3>
  99. <p>
  100. meta -- 객체의 자식들의 이미지와 텍스쳐같은 메타데이터를 담고 있는 객체입니다.<br />
  101. 카메라를 three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format]으로 변환합니다.
  102. </p>
  103. <h2>소스 코드</h2>
  104. <p>
  105. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  106. </p>
  107. </body>
  108. </html>