new UGizmoControls(opt)
| Name | Type | Default | Description |
|---|---|---|---|
opt |
UGizmoControlsCO | {} |
optional
생성 옵션 |
Methods
-
attach(object)
-
대상 객체를 연결하고 포인터 이벤트 수신을 시작한다.
Name Type Description objectObject3D 편집 대상 객체
Returns:
대상이 연결된 이 컨트롤 자신. 부모 계약이 this 타입이므로 반환 타입은 추론에 맡긴다. -
detach()
-
대상 객체를 분리하고 포인터 이벤트 수신을 중단한다.
Returns:
대상이 분리된 이 컨트롤 자신. 부모 계약이 this 타입이므로 반환 타입은 추론에 맡긴다. -
getMode()string
-
현재 변환 모드를 반환한다.
Returns:
Type Description string 'translate' | 'rotate' | 'scale' -
pointerDown(pointer)
-
포인터가 눌리면 기즈모 평면과의 교차 여부로 제어 중 상태를 갱신한다.
Name Type Description pointerUGizmoControlsPointer | null 정규화 좌표와 버튼 정보
-
pointerUp(pointer)
-
포인터가 떼어지면 제어 중 상태를 해제한다.
Name Type Description pointerUGizmoControlsPointer | null 정규화 좌표와 버튼 정보
-
setMode(mode)
-
변환 모드를 지정한다.
Name Type Description modestring 'translate' | 'rotate' | 'scale'
-
setPosition(world)
-
기즈모의 위치를 지정한다.
Name Type Description worldVector3Like 기즈모를 놓을 월드 좌표
-
updateMatrixWorld(force)
-
대상 객체가 scene graph에서 제거되었으면 기즈모를 분리하고, 아니면 부모의 갱신을 수행한다.
Name Type Description forceboolean optional 부모 갱신 여부와 무관하게 강제 갱신할지 여부