# Class TwinfinityCameraTouchInput

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

#### See

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

#### Hierarchy

- BaseCameraPointersInput
  - TwinfinityCameraTouchInput

##### Index

### Constructors

constructor

### Properties

camera

### Methods

checkInputs
getClassName
getPointers
getSimpleName
onButtonDown
onButtonUp
onDoubleTap
onLostFocus
onMultiTouch
onTouch

## Constructors

### constructor

- new TwinfinityCameraTouchInput(
  _cameraOptions: CameraOptions,
  ): TwinfinityCameraTouchInput

  #### Parameters

  - _cameraOptions: CameraOptions

  #### Returns TwinfinityCameraTouchInput

  Overrides BaseCameraPointersInput.constructor

## Properties

### camera

camera: PivotTargetCamera

Defines the camera the input is attached to.

Overrides BaseCameraPointersInput.camera

## Methods

### checkInputs

- checkInputs(): void

  #### Returns void

### getClassName

- getClassName(): string

  Gets the class name of the current input.

  #### Returns string

  the class name

  Overrides BaseCameraPointersInput.getClassName

### getPointers

- getPointers(pointers: PointerTouch[]): PointerTouch[]

  #### Parameters

  - pointers: PointerTouch[]

  #### Returns PointerTouch[]

### getSimpleName

- getSimpleName(): string

  Get the friendly name associated with the input class.

  #### Returns string

  the input friendly name

  Overrides BaseCameraPointersInput.getSimpleName

### onButtonDown

- onButtonDown(evt: PointerEvent): void

  Called each time a new POINTERDOWN event occurs. Ie, for each button press. Override this method to provide functionality.

  #### Parameters

  - evt: PointerEvent

  #### Returns void

  Overrides BaseCameraPointersInput.onButtonDown

### onButtonUp

- onButtonUp(evt: PointerEvent): void

  Called each time a new POINTERUP event occurs. Ie, for each button release. Override this method to provide functionality.

  #### Parameters

  - evt: PointerEvent

  #### Returns void

  Overrides BaseCameraPointersInput.onButtonUp

### onDoubleTap

- onDoubleTap(type: string): void

  Called on pointer POINTERDOUBLETAP event. Override this method to provide functionality on POINTERDOUBLETAP event.

  #### Parameters

  - type: string

    type of event

  #### Returns void

  Overrides BaseCameraPointersInput.onDoubleTap

### onLostFocus

- onLostFocus(): void

  Called when window becomes inactive. Override this method to provide functionality.

  #### Returns void

  Overrides BaseCameraPointersInput.onLostFocus

### onMultiTouch

- onMultiTouch(
  pointA: Nullable<PointerTouch>,
  pointB: Nullable<PointerTouch>,
  previousPinchSquaredDistance: number,
  pinchSquaredDistance: number,
  previousMultiTouchPanPosition: Nullable<PointerTouch>,
  multiTouchPanPosition: Nullable<PointerTouch>,
  ): void

  Called on pointer POINTERMOVE event if multiple touches are active. Override this method to provide functionality.

  #### Parameters

  - pointA: Nullable<PointerTouch>
  - pointB: Nullable<PointerTouch>
  - previousPinchSquaredDistance: number

    Sqr Distance between the points the last time this event was fired (by this input)

  - pinchSquaredDistance: number

    Sqr Distance between the points this time

  - previousMultiTouchPanPosition: Nullable<PointerTouch>

    Previous center point between the points

  - multiTouchPanPosition: Nullable<PointerTouch>

    Current center point between the points

  #### Returns void

  Overrides BaseCameraPointersInput.onMultiTouch

### onTouch

- onTouch(point: Nullable<PointerTouch>, offsetX: number, offsetY: number): void

  Called on pointer POINTERMOVE event if only a single touch is active. Override this method to provide functionality.

  #### Parameters

  - point: Nullable<PointerTouch>

    The current position of the pointer

  - offsetX: number

    The offsetX of the pointer when the event occurred

  - offsetY: number

    The offsetY of the pointer when the event occurred

  #### Returns void

  Overrides BaseCameraPointersInput.onTouch