Class: InteractionData

InteractionData

Holds all information related to an Interaction event

new Tiny.interaction.InteractionData()

Members

globalTiny.Point

This point stores the global coords of where the touch/mouse event happened

identifiernumber

Unique identifier for this interaction

originalEventMouseEvent TouchEvent PointerEvent

When passed to an event handler, this will be the original DOM Event that was captured

See:

readonlypointerIdnumber

The unique identifier of the pointer. It will be the same as identifier.

See:

The target DisplayObject that was interacted with

Methods

Copies properties from normalized event data.

Name Type Description
event Touch | MouseEvent | PointerEvent

The normalized event data

Version:
  • 1.2.0

getLocalPosition(displayObject, point, globalPos){Tiny.Point}

This will return the local coordinates of the specified displayObject for this InteractionData

Name Type Description
displayObject Tiny.DisplayObject

The DisplayObject that you would like the local coords off

point Tiny.Point optional

A Point object in which to store the value, optional (otherwise will create a new point)

globalPos Tiny.Point optional

A Point object containing your custom global coords, optional (otherwise will use the current global coords)

Returns:
Type Description
Tiny.Point A point containing the coordinates of the InteractionData position relative to the DisplayObject

Resets the data for pooling.

Version:
  • 1.2.0
Documentation generated by JSDoc 3.4.3 on Mon Dec 03 2018 17:48:52 GMT+0800 (CST)