TrackballControls.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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:EventDispatcher] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. <p>
  14. [name] 는 [page:OrbitControls] 와 유사하지만, 카메라의 일정한 [page:Object3D.up up] vector 값을 유지하지 않습니다.
  15. 이 말인즉슨, 카메라가 위쪽 방향이나 아럐쪽 방향으로 회전할 경우, "오른쪽을 위로" 유지하기 위해 뒤집을 수 없습니다.
  16. </p>
  17. </p>
  18. <h2>예시</h2>
  19. <p>[example:misc_controls_trackball misc / controls / trackball ]</p>
  20. <h2>생성자</h2>
  21. <h3>[name]( [param:Camera camera], [param:HTMLDOMElement domElement] )</h3>
  22. <p>
  23. <p>
  24. [page:Camera camera]: 렌더링 된 장면의 카메라입니다.
  25. </p>
  26. <p>
  27. [page:HTMLDOMElement domElement]: 이벤트 리스너에 사용되는 HTML 엘리먼트입니다.
  28. </p>
  29. <p>
  30. 새로운 [name] 객체를 생성합니다.
  31. </p>
  32. </p>
  33. <h2>이벤트</h2>
  34. <h3>change</h3>
  35. <p>
  36. 컨트롤에 의해 카메라가 변환될 경우 호출됩니다.
  37. </p>
  38. <h3>start</h3>
  39. <p>
  40. 처음으로 상호 작용이 실행되면 호출됩니다. (e.g. 터치패드)
  41. </p>
  42. <h3>end</h3>
  43. <p>
  44. 상호 작용이 완료되면 호출됩니다.
  45. </p>
  46. <h2>특성</h2>
  47. <h3>[property:HTMLDOMElement domElement]</h3>
  48. <p>
  49. 마우스 / 터치 이벤트를 수신하는 데 사용되는 HTMLDOMElement입니다. 이것은 생성자에 의해 설정되어야 합니다; 생성자를 통해 설정되지 않을 경우 새 이벤트 리스너에 설정되지 않습니다.
  50. </p>
  51. <h3>[property:Number dynamicDampingFactor]</h3>
  52. <p>
  53. 댐핑의 강도를 조절합니다. [page:.staticMoving staticMoving] 이 * false * 로 설정된 경우에만 고려됩니다. 기본값은 *0.2* 입니다.
  54. </p>
  55. <h3>[property:Boolean enabled]</h3>
  56. <p>
  57. 컨트롤이 활성화인지 비활성화인지 나타냅니다.
  58. </p>
  59. <h3>[property:Array keys]</h3>
  60. <p>
  61. 이 배열은 상호 작용을 제어하기위한 키 코드를 보유합니다.
  62. <ul>
  63. <li>처음 정의 된 키를 누르면 모든 마우스 상호 작용 (왼쪽, 가운데, 오른쪽)이 궤도를 회전합니다.</li>
  64. <li>두 번째로 정의 된 키를 누르면 모든 마우스 상호 작용 (왼쪽, 가운데, 오른쪽)이 확대 / 축소를 수행합니다.</li>
  65. <li>세 번째로 정의 된 키를 누르면 모든 마우스 상호 작용 (왼쪽, 가운데, 오른쪽)이 패닝을 수행합니다.</li>
  66. </ul>
  67. 기본값은 A, S, D를 나타내는 * 65, 83, 68 *입니다.
  68. </p>
  69. <h3>[property:Number maxDistance]</h3>
  70. <p>
  71. How far you can zoom out. Default is *Infinity*.
  72. </p>
  73. <h3>[property:Number minDistance]</h3>
  74. <p>
  75. How far you can zoom in. Default is *0*.
  76. </p>
  77. <h3>
  78. [property:Object mouseButtons]</h3>
  79. <p>
  80. This object contains references to the mouse actions used by the controls.
  81. <ul>
  82. <li>.LEFT is assigned with *THREE.MOUSE.ROTATE*</li>
  83. <li>.MIDDLE is assigned with *THREE.MOUSE.ZOOM*</li>
  84. <li>.RIGHT is assigned with *THREE.MOUSE.PAN*</li>
  85. </ul>
  86. </p>
  87. <h3>[property:Boolean noPan]</h3>
  88. <p>
  89. Whether or not panning is disabled. Default is *false*.
  90. </p>
  91. <h3>[property:Boolean noRotate]</h3>
  92. <p>
  93. Whether or not rotation is disabled. Default is *false*.
  94. </p>
  95. <h3>[property:Boolean noZoom]</h3>
  96. <p>
  97. Whether or not zooming is disabled. Default is *false*.
  98. </p>
  99. <h3>[property:Camera object]</h3>
  100. <p>
  101. The camera being controlled.
  102. </p>
  103. <h3>[property:Number panSpeed]</h3>
  104. <p>
  105. The zoom speed. Default is *0.3*.
  106. </p>
  107. <h3>[property:Number rotateSpeed]</h3>
  108. <p>
  109. The rotation speed. Default is *1.0*.
  110. </p>
  111. <h3>[property:Object screen]</h3>
  112. <p>
  113. Represents the properties of the screen. Automatically set when [page:.handleResize handleResize]() is called.
  114. <ul>
  115. <li>left: Represents the offset in pixels to the screen's left boundary.</li>
  116. <li>top: Represents the offset in pixels to the screen's top boundary.</li>
  117. <li>width: Represents the screen width in pixels.</li>
  118. <li>height: Represents the screen height in pixels.</li>
  119. </ul>
  120. </p>
  121. <h3>[property:Boolean staticMoving]</h3>
  122. <p>
  123. Whether or not damping is disabled. Default is *false*.
  124. </p>
  125. <h3>[property:Number zoomSpeed]</h3>
  126. <p>
  127. The zoom speed. Default is *1.2*.
  128. </p>
  129. <h2>Methods</h2>
  130. <h3>[method:null checkDistances] ()</h3>
  131. <p>
  132. Ensures the controls stay in the range [minDistance, maxDistance]. Called by [page:.update update]().
  133. </p>
  134. <h3>[method:null dispose] ()</h3>
  135. <p>
  136. Should be called if the controls is no longer required.
  137. </p>
  138. <h3>[method:null handleResize] ()</h3>
  139. <p>
  140. Should be called if the application window is resized.
  141. </p>
  142. <h3>[method:null panCamera] ()</h3>
  143. <p>
  144. Performs panning if necessary. Called by [page:.update update]().
  145. </p>
  146. <h3>[method:null reset] ()</h3>
  147. <p>
  148. Resets the controls to its initial state.
  149. </p>
  150. <h3>[method:null rotateCamera] ()</h3>
  151. <p>
  152. Rotates the camera if necessary. Called by [page:.update update]().
  153. </p>
  154. <h3>[method:null update] ()</h3>
  155. <p>
  156. Updates the controls. Usually called in the animation loop.
  157. </p>
  158. <h3>[method:null zoomCamera] ()</h3>
  159. <p>
  160. Performs zooming if necessary. Called by [page:.update update]().
  161. </p>
  162. <h2>Source</h2>
  163. <p>
  164. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/TrackballControls.js examples/jsm/controls/TrackballControls.js]
  165. </p>
  166. </body>
  167. </html>