API Reference

Class List

pc.ElementTouchEvent

Extends: pc.ElementInputEvent

Represents a TouchEvent fired on a pc.ElementComponent.

Summary

Properties

changedTouchesThe Touch objects representing individual points of contact whose states changed between the previous touch event and this one.
touchesThe Touch objects representing all current points of contact with the surface, regardless of target or changed status.

Inherited

Properties

elementThe ElementComponent that this event was originally raised on.
eventThe MouseEvent or TouchEvent that was originally raised.

Methods

stopPropagationStop propagation of the event to parent pc.ElementComponents.

Details

Constructor

ElementTouchEvent(event, element, camera, x, y, input)

Create an instance of a pc.ElementTouchEvent.

Parameters

eventTouchEventThe TouchEvent that was originally raised.
elementpc.ElementComponentThe ElementComponent that this event was originally raised on.
camerapc.CameraComponentThe CameraComponent that this event was originally raised via.
xNumberThe x coordinate of the touch that triggered the event
yNumberThe y coordinate of the touch that triggered the event
inputpc.ElementInputThe pc.ElementInput instance

Properties

Touch[]changedTouches

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

Touch[]touches

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

Inherited

Properties

pc.ElementComponentelement

The ElementComponent that this event was originally raised on.

MouseEvent, TouchEventevent

The MouseEvent or TouchEvent that was originally raised.

Methods

stopPropagation()

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