TransformControls.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. 해당 클래스는 DCC 툴인 블렌더의 상호 작용 모델과 비슷한 기능을 3D 공간에서 객체를 변환하는데 사용할 수 있습니다.
  14. 다른 컨트롤과 달리, 해당 기능은 카메라의 장면 변환을 의미하지 않습니다.<br /><br />
  15. [name] 는 연결된 3D 객체가 씬(scene) 그래프의 일부 입니다.
  16. </p>
  17. <h2>예시</h2>
  18. <p>[example:misc_controls_transform misc / controls / transform ]</p>
  19. <h2>생성자</h2>
  20. <h3>[name]( [param:Camera camera], [param:HTMLDOMElement domElement] )</h3>
  21. <p>
  22. <p>
  23. [page:Camera camera]: 렌더링 된 장면의 카메라입니다.
  24. </p>
  25. <p>
  26. [page:HTMLDOMElement domElement]: 이벤트 리스너에 사용되는 HTML 엘리먼트입니다.
  27. <p>
  28. 새로운 [name] 객체를 생성합니다.
  29. </p>
  30. </p>
  31. <h2>이벤트</h2>
  32. <h3>change</h3>
  33. <p>
  34. Fires if any type of change (object or property change) is performed. Property changes
  35. are separate events you can add event listeners to. The event type is "propertyname-changed".
  36. </p>
  37. <h3>mouseDown</h3>
  38. <p>
  39. Fires if a pointer (mouse/touch) becomes active.
  40. </p>
  41. <h3>mouseUp</h3>
  42. <p>
  43. Fires if a pointer (mouse/touch) is no longer active.
  44. </p>
  45. <h3>objectChange</h3>
  46. <p>
  47. Fires if the controlled 3D object is changed.
  48. </p>
  49. <h2>Properties</h2>
  50. <p>See the base [page:Object3D] class for common properties.</p>
  51. <h3>[property:String axis]</h3>
  52. <p>
  53. The current transformation axis.
  54. </p>
  55. <h3>[property:Camera camera]</h3>
  56. <p>
  57. The camera of the rendered scene.
  58. </p>
  59. <h3>[property:HTMLDOMElement domElement]</h3>
  60. <p>
  61. The HTMLDOMElement used to listen for mouse / touch events. This must be passed in the constructor; changing it here will
  62. not set up new event listeners.
  63. </p>
  64. <h3>[property:Boolean dragging]</h3>
  65. <p>
  66. Whether or not dragging is currently performed. Read-only property.
  67. </p>
  68. <h3>[property:Boolean enabled]</h3>
  69. <p>
  70. Whether or not the controls are enabled.
  71. </p>
  72. <h3>[property:String mode]</h3>
  73. <p>
  74. The current transformation mode. Possible values are "translate", "rotate" and "scale". Default is *translate*.
  75. </p>
  76. <h3>[property:Object3D object]</h3>
  77. <p>
  78. The 3D object being controlled.
  79. </p>
  80. <h3>[property:Number rotationSnap]</h3>
  81. <p>
  82. By default, 3D objects are continously rotated. If you set this property to a numeric value (radians), you can define in which
  83. steps the 3D object should be rotated. Deault is *null*.
  84. </p>
  85. <h3>[property:Boolean showX]</h3>
  86. <p>
  87. Whether or not the x-axis helper should be visible. Default is *true*.
  88. </p>
  89. <h3>[property:Boolean showY]</h3>
  90. <p>
  91. Whether or not the y-axis helper should be visible. Default is *true*.
  92. </p>
  93. <h3>[property:Boolean showZ]</h3>
  94. <p>
  95. Whether or not the z-axis helper should be visible. Default is *true*.
  96. </p>
  97. <h3>[property:Number size]</h3>
  98. <p>
  99. The size of the helper UI (axes/planes). Default is *1*.
  100. </p>
  101. <h3>[property:String space]</h3>
  102. <p>
  103. Defines in which coordinate space transformations should be performed. Possible values are "world" and "local". Default is *world*.
  104. </p>
  105. <h3>[property:Number translationSnap]</h3>
  106. <p>
  107. By default, 3D objects are continously translated. If you set this property to a numeric value (world units), you can define in which
  108. steps the 3D object should be translated. Deault is *null*.
  109. </p>
  110. <h2>Methods</h2>
  111. <p>See the base [page:Object3D] class for common methods.</p>
  112. <h3>[method:TransformControls attach] ( [param:Object3D object] )</h3>
  113. <p>
  114. <p>
  115. [page:Object3D object]: The 3D object that should be transformed.
  116. </p>
  117. <p>
  118. Sets the 3D object that should be transformed and ensures the controls UI is visible.
  119. </p>
  120. </p>
  121. <h3>[method:TransformControls detach] ()</h3>
  122. <p>
  123. Removes the current 3D object from the controls and makes the helper UI is invisible.
  124. </p>
  125. <h3>[method:null dispose] ()</h3>
  126. <p>
  127. Should be called if the controls is no longer required.
  128. </p>
  129. <h3>[method:String getMode] ()</h3>
  130. <p>
  131. Returns the transformation mode.
  132. </p>
  133. <h3>[method:null setMode] ( [param:String mode] )</h3>
  134. <p>
  135. <p>
  136. [page:String mode]: The transformation mode.
  137. </p>
  138. <p>
  139. Sets the transformation mode.
  140. </p>
  141. </p>
  142. <h3>[method:null setRotationSnap] ( [param:Number rotationSnap] )</h3>
  143. <p>
  144. <p>
  145. [page:Number rotationSnap]: The rotation snap.
  146. </p>
  147. <p>
  148. Sets the rotation snap.
  149. </p>
  150. </p>
  151. <h3>[method:null setSize] ( [param:Number size] )</h3>
  152. <p>
  153. <p>
  154. [page:Number size]: The size of the helper UI.
  155. </p>
  156. <p>
  157. Sets the size of the helper UI.
  158. </p>
  159. </p>
  160. <h3>[method:null setSpace] ( [param:String space] )</h3>
  161. <p>
  162. <p>
  163. [page:String space]: The coordinate space in which transformations are applied.
  164. </p>
  165. <p>
  166. Sets the coordinate space in which transformations are applied.
  167. </p>
  168. </p>
  169. <h3>[method:null setTranslationSnap] ( [param:Number translationSnap] )</h3>
  170. <p>
  171. <p>
  172. [page:Number translationSnap]: The translation snap.
  173. </p>
  174. <p>
  175. Sets the translation snap.
  176. </p>
  177. </p>
  178. <h2>Source</h2>
  179. <p>
  180. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/TransformControls.js examples/jsm/controls/TransformControls.js]
  181. </p>
  182. </body>
  183. </html>