# ElementTouchEvent

Class · extends [`ElementInputEvent`](https://api.playcanvas.com/engine/classes/ElementInputEvent.md) · category: User Interface

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/framework/input/element-input.js#L274

Represents a TouchEvent fired on a [ElementComponent](https://api.playcanvas.com/engine/classes/ElementComponent.md). It carries the browser's own
TouchEvent and Touch objects.

## Constructors

### constructor

```ts
new ElementTouchEvent(event: TouchEvent, element: ElementComponent, camera: CameraComponent, x: number, y: number, touch: Touch)
```

Create an instance of an ElementTouchEvent.

**Parameters**

- `event` (`TouchEvent`): The browser TouchEvent that was originally raised.
- `element` ([`ElementComponent`](https://api.playcanvas.com/engine/classes/ElementComponent.md)): The
  ElementComponent that this event was originally raised on.
- `camera` ([`CameraComponent`](https://api.playcanvas.com/engine/classes/CameraComponent.md)): The
  CameraComponent that this event was originally raised via.
- `x` (`number`): The x coordinate of the touch that triggered the event.
- `y` (`number`): The y coordinate of the touch that triggered the event.
- `touch` (`Touch`): The browser Touch that triggered the event.

## Properties

### changedTouches

```ts
changedTouches: TouchList
```

The Touch objects representing individual points of contact whose states changed between
the previous touch event and this one.

### touch

```ts
touch: Touch
```

The browser Touch that triggered the event. Match a touch across events by its
`identifier`.

### touches

```ts
touches: TouchList
```

The Touch objects representing all current points of contact with the surface,
regardless of target or changed status.

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

- `camera: CameraComponent`
- `element: ElementComponent`
- `event: MouseEvent | TouchEvent | XRInputSourceEvent | null`
- `stopPropagation(): void`
