[page:EventDispatcher] →

[name]

[name] 는 [page:OrbitControls] 와 유사하지만, 카메라의 일정한 [page:Object3D.up up] vector 값을 유지하지 않습니다. 이 말인즉슨, 카메라가 위쪽 방향이나 아럐쪽 방향으로 회전할 경우, "오른쪽을 위로" 유지하기 위해 뒤집을 수 없습니다.

예시

[example:misc_controls_trackball misc / controls / trackball ]

생성자

[name]( [param:Camera camera], [param:HTMLDOMElement domElement] )

[page:Camera camera]: 렌더링 된 장면의 카메라입니다.

[page:HTMLDOMElement domElement]: 이벤트 리스너에 사용되는 HTML 엘리먼트입니다.

새로운 [name] 객체를 생성합니다.

이벤트

change

컨트롤에 의해 카메라가 변환될 경우 호출됩니다.

start

처음으로 상호 작용이 실행되면 호출됩니다. (e.g. 터치패드)

end

상호 작용이 완료되면 호출됩니다.

특성

[property:HTMLDOMElement domElement]

마우스 / 터치 이벤트를 수신하는 데 사용되는 HTMLDOMElement입니다. 이것은 생성자에 의해 설정되어야 합니다; 생성자를 통해 설정되지 않을 경우 새 이벤트 리스너에 설정되지 않습니다.

[property:Number dynamicDampingFactor]

댐핑의 강도를 조절합니다. [page:.staticMoving staticMoving] 이 * false * 로 설정된 경우에만 고려됩니다. 기본값은 *0.2* 입니다.

[property:Boolean enabled]

컨트롤이 활성화인지 비활성화인지 나타냅니다.

[property:Array keys]

이 배열은 상호 작용을 제어하기위한 키 코드를 보유합니다.

기본값은 A, S, D를 나타내는 * 65, 83, 68 *입니다.

[property:Number maxDistance]

How far you can zoom out. Default is *Infinity*.

[property:Number minDistance]

How far you can zoom in. Default is *0*.

[property:Object mouseButtons]

This object contains references to the mouse actions used by the controls.

[property:Boolean noPan]

Whether or not panning is disabled. Default is *false*.

[property:Boolean noRotate]

Whether or not rotation is disabled. Default is *false*.

[property:Boolean noZoom]

Whether or not zooming is disabled. Default is *false*.

[property:Camera object]

The camera being controlled.

[property:Number panSpeed]

The zoom speed. Default is *0.3*.

[property:Number rotateSpeed]

The rotation speed. Default is *1.0*.

[property:Object screen]

Represents the properties of the screen. Automatically set when [page:.handleResize handleResize]() is called.

[property:Boolean staticMoving]

Whether or not damping is disabled. Default is *false*.

[property:Number zoomSpeed]

The zoom speed. Default is *1.2*.

Methods

[method:null checkDistances] ()

Ensures the controls stay in the range [minDistance, maxDistance]. Called by [page:.update update]().

[method:null dispose] ()

Should be called if the controls is no longer required.

[method:null handleResize] ()

Should be called if the application window is resized.

[method:null panCamera] ()

Performs panning if necessary. Called by [page:.update update]().

[method:null reset] ()

Resets the controls to its initial state.

[method:null rotateCamera] ()

Rotates the camera if necessary. Called by [page:.update update]().

[method:null update] ()

Updates the controls. Usually called in the animation loop.

[method:null zoomCamera] ()

Performs zooming if necessary. Called by [page:.update update]().

Source

[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/TrackballControls.js examples/jsm/controls/TrackballControls.js]