Class Fz2D.Input.Touch.Collection
| Defined in: | src/input/touch_collection.coffee |
Overview
Public: Touch Collection
Instance Method Summary
- ::constructor(bounds, n = 16) Constructor.
- ::find(id) Finds a touch by its id.
- ::first() Returns first touch.
- ::last() Returns last touch.
- ::setFromPointer(pointer) Sets the internal touches.
- ::setFromTouchList(touches) Sets the internal touches.
Constructor Details
::constructor(bounds, n = 16) Source
Public: Constructor.
bounds - bounding rectangle of the element
n - number of touches to pre-allocate (default: 16)
Instance Method Details
::find(id) Source
Public: Finds a touch by its id.
id - touch identifier
Returns a touch.
::first() Source
Public: Returns first touch.
::last() Source
Public: Returns last touch.
::setFromPointer(pointer) Source
Public: Sets the internal touches.
::setFromTouchList(touches) Source
Public: Sets the internal touches.
touches - a native TouchList