# Class TwinfinityTargetCameraMouseRotationInput

Manage the mouse inputs to control the movement of a PivotTargetCamera.

#### See

http://doc.babylonjs.com/how_to/customizing_camera_inputs

#### Implements

- ICameraInput<TargetCamera>

##### Index

### Constructors

constructor

### Properties

buttons
camera
onPointerMovedObservable

### Accessors

isRotating

### Methods

attachControl
detachControl
getClassName
getSimpleName
onContextMenu

## Constructors

### constructor

- new TwinfinityTargetCameraMouseRotationInput(
  _cameraOptions: CameraOptions,
  ): TwinfinityTargetCameraMouseRotationInput

  Manages the mouse inputs to control the movement of a PivotTargetCamera.

  #### Parameters

  - _cameraOptions: CameraOptions

  #### Returns TwinfinityTargetCameraMouseRotationInput

  #### See

  http://doc.babylonjs.com/how_to/customizing_camera_inputs

## Properties

### buttons

buttons: number[] = ...

Defines the buttons associated with the input to handle camera move. Left mouse button is used as default for Rotation. 0: No button or un-initialized 1: Primary button (usually the left button) 2: Secondary button (usually the right button) 4: Auxiliary button (usually the mouse wheel button or middle button) 8: 4th button (typically the "Browser Back" button) 16 : 5th button (typically the "Browser Forward" button) A button number can represent multiple buttons. For example button left and right is represented by 1 + 2 = 3.

### camera

camera: TargetCamera

Defines the camera the input is attached to.

Implementation of ICameraInput.camera

### onPointerMovedObservable

onPointerMovedObservable: Observable<{ offsetX: number; offsetY: number }> = ...

Observable for when a pointer move event occurs containing the move offset

## Accessors

### isRotating

- get isRotating(): boolean

  Checks if user is rotating the camera.

  #### Returns boolean

## Methods

### attachControl

- attachControl(noPreventDefault?: boolean): void

  Attaches the input controls to a specific dom element to get the input from.

  #### Parameters

  - `Optional` noPreventDefault: boolean

    Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)

  #### Returns void

  Implementation of ICameraInput.attachControl

### detachControl

- detachControl(): void

  Detaches the current controls from the specified DOM element.

  #### Returns void

  Implementation of ICameraInput.detachControl

### getClassName

- getClassName(): string

  Gets the class name of the current input.

  #### Returns string

  the class name

  Implementation of ICameraInput.getClassName

### getSimpleName

- getSimpleName(): string

  Gets the friendly name associated with the input class.

  #### Returns string

  the input friendly name

  Implementation of ICameraInput.getSimpleName

### `Protected` onContextMenu

- onContextMenu(evt: PointerEvent): void

  Is called by JS contextmenu event. Override this method to provide functionality.

  #### Parameters

  - evt: PointerEvent

  #### Returns void