# Class TwinfinityTargetCameraMousePanInput<TCamera>

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

#### See

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

#### Type Parameters

- TCamera extends TargetCamera

#### Implements

- ICameraInput<TCamera>

##### Index

### Constructors

constructor

### Properties

buttons
camera

### Accessors

isPanning

### Methods

attachControl
detachControl
getClassName
getSimpleName

## Constructors

### constructor

- new TwinfinityTargetCameraMousePanInput<TCamera extends TargetCamera>(
  _cameraOptions: CameraOptions,
  ): TwinfinityTargetCameraMousePanInput<TCamera>

  #### Type Parameters

  - TCamera extends TargetCamera

  #### Parameters

  - _cameraOptions: CameraOptions

  #### Returns TwinfinityTargetCameraMousePanInput<TCamera>

## Properties

### buttons

buttons: number[] = ...

Defines the buttons associated with the input to handle camera pan. Middle mouse button is used as default (often invoked by pressing scroll wheel). 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: TCamera

Defines the camera the input is attached to.

Implementation of ICameraInput.camera

## Accessors

### isPanning

- get isPanning(): boolean

  Checks if user is panning.

  #### Returns boolean

## Methods

### attachControl

- attachControl(noPreventDefault?: boolean): void

  Attach 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

  Detach 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

  Get the friendly name associated with the input class.

  #### Returns string

  the input friendly name

  Implementation of ICameraInput.getSimpleName