# MultiTouchSource

Class · extends [`InputSource`](https://api.playcanvas.com/engine/classes/InputSource.md) · category: Input

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/extras/input/sources/multi-touch-source.js#L22

Multi-touch input source class. Attached to an element, it accumulates `touch` deltas for the
movement of the touch points, `count` deltas for changes in the number of touches, and `pinch`
deltas for the change in distance between two touches, which is what an orbiting camera needs
on a touch screen.

## Constructors

### constructor

```ts
new MultiTouchSource()
```

## Methods

### attach

```ts
attach(element: HTMLElement): void
```

**Parameters**

- `element` (`HTMLElement`): The element.

### detach

```ts
detach(): void
```

## Inherited from [InputSource](https://api.playcanvas.com/engine/classes/InputSource.md)

- `protected _element: HTMLElement | null = null`
- `deltas: { count: InputDelta; pinch: InputDelta; touch: InputDelta }`
- `destroy(): void`
- `fire(event: string, ...args: any[]): void`
- `off(event: string, callback: HandleEventCallback): void`
- `on(event: string, callback: HandleEventCallback): void`
- `read(): { count: number[]; pinch: number[]; touch: number[] }`
