Input
Tracks a single input and contains information about the current, previous, and initial events. Contains the progress of each Input and it's associated gestures.
Test:
Constructor Summary
Public Constructor | ||
public |
constructor(event: Event, identifier: Number) Constructor function for the Input class. |
Member Summary
Public Members | ||
public |
Holds the most current event for this Input, disregarding any other past, current, and future events that other Inputs participate in. |
|
public |
Refers to the event.touches index, or 0 if a simple mouse event occurred. |
|
public |
Holds the initial event object. |
|
public |
Holds the previous event that took place. |
|
public |
Stores internal state between events for each gesture based off of the gesture's id. |
Method Summary
Public Methods | ||
public |
Returns the normalized current Event's type. |
|
public |
getGestureProgress(id: String): Object Returns the progress of the specified gesture. |
|
public |
resetProgress(id: String) Resets a progress/state object of the specified gesture. |
|
public |
Receives an input, updates the internal state of what the input has done next. |
Public Constructors
Public Members
public current: ZingEvent source
Holds the most current event for this Input, disregarding any other past, current, and future events that other Inputs participate in. e.g. This event ended in an 'end' event, but another Input is still participating in events -- this will not be updated in such cases.
Public Methods
public getGestureProgress(id: String): Object source
Returns the progress of the specified gesture.
Params:
Name | Type | Attribute | Description |
id | String | The identifier for each unique Gesture's progress. |
Test:
public resetProgress(id: String) source
Resets a progress/state object of the specified gesture.
Params:
Name | Type | Attribute | Description |
id | String | The identifier of the specified gesture |