Mirror Engine
V7
How To
Mirror Engine Logo

Mirror Engine API


Mirror Engine API / ElementTouchEvent

Class: ElementTouchEvent

Represents a TouchEvent fired on a ElementComponent.

Extends

Constructors

new ElementTouchEvent()

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

Create an instance of an ElementTouchEvent.

Parameters

event

TouchEvent

The TouchEvent that was originally raised.

element

ElementComponent

The ElementComponent that this event was originally raised on.

camera

CameraComponent

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 touch object that triggered the event.

Returns

ElementTouchEvent

Overrides

ElementInputEvent.constructor

Properties

camera

camera: CameraComponent

The CameraComponent that this event was originally raised via.

Inherited from

ElementInputEvent.camera


changedTouches

changedTouches: Touch[];

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


element

element: ElementComponent

The ElementComponent that this event was originally raised on.

Inherited from

ElementInputEvent.element


event

event: MouseEvent | TouchEvent

MouseEvent or TouchEvent that was originally raised.

Inherited from

ElementInputEvent.event


touch

touch: Touch

The touch object that triggered the event.


touches

touches: Touch[];

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

Methods

stopPropagation()

stopPropagation(): void

Stop propagation of the event to parent ElementComponents. This also stops propagation of the event to other event listeners of the original DOM Event.

Returns

void

Inherited from

ElementInputEvent.stopPropagation

Mirror Engine Logo