API Documentation

for 0.0.1
Show:

TouchObject Class

Object that represent what defines a Touch. Touch Class returns this type of objets when events are fired. This class is used internally and is documented for consultation purpose. Users should not make new instances from it.

Constructor

TouchObject

(
  • x
)
private

Parameters:

  • x Number

    the x coordinate of the touch

Methods

setX

(
  • x
)

Set a new x coordinate and compute the new xDelta and offsetX

Parameters:

  • x Object

setY

(
  • y
)

Set a new y coordinate and compute the new yDelta and offsetY

Parameters:

  • y Object

Properties

id

Object

id used internally to manage the touch list in Touch Class

index

Number

index

offsetX

Number

offset on the X coordinate (difference between startX and current x)

offsetY

Number

offset on the Y coordinate (difference between startY and current y)

pX

Number

pX pevious x coordinate of the touch

pY

Number

pY previous y coordinate of the touch

startX

Number

startX x coordinate where the touch began

startY

Number

startY x coordinate where the touch began

x

Number

x coordinate of the touch

xDelta

Number

xDelta delta on x coordinate (difference between pevious and current x)

y

Number

y coordinate of the touch

yDelta

Number

yDelta delta on y coordinate (difference between pevious and current y)

Events

pressedchanged

Fired when the pressed state changed (ie a touch is on screen)

tapchanged

Fired when the tap count changed

touchend

Fired when a touch ends

touchmoved

Fired when a touch moved

touchstart

Fired when a touch starts