IPointer
Type interface
Represents pointer, i.e. mouse cursor or touch point.
Sources
IPointer is an interface: it describes a shape of data and is not imported on its own.
Properties
Type
numberFor mousedown events, we need to know which mouse button was clicked:
1 - left button 2 - middle button 3 - right button
dragStartEventsType
Array<AMEvent["dragstart"]>A reference to "dragstart" event if it's necessary. Normally we don't execute this event on draggable sprites immediately on DOWN event. We wait until it is actually moved to do it.
dragTargetType
InteractionObjectContains reference to InteractionObject which is currently being dragged by this pointer. This is used to run checks if we should trigger hovers on other elements when element is being dragged.
hitTimeoutType
numberHolds a timeout identifier for HIT event.
This is used to delay HIT event so that we can catch DOUBLEHIT. (if enabled)
idType
stringAn ID of the pointer.
Mouse is always "0".
lastDownEventType
MouseEvent|TouchEventA reference to last "down" event in case we need to access it for some other operation, such as initiating drag on a different object.
lastEventType
MouseEvent|TouchA reference to the last encountered event object.
lastUpEventType
MouseEvent|TouchEventA reference to last "up" event in case we need to access it for some other operation, such as initiating drag on a different object.
pointType
IPointCurrent position of the pointer.
startPointType
IPointA
IPointto where pointer position was when it was created.startTimeType
numberA timestamp of when the pointer was created.
swipeCanceledType
booleanHolds indicator if swipe gesture was canceled.
swipeTimeoutType
numberHolds a reference to a swipe timeout.
touchType
booleanIs that a touch pointer?
trackType
IBreadcrumb[]Holds information about trail of the pointer movement.
It's an array of
IBreadcrumbitems, indicating where pointer has been at any particular time in its movement.