Class Fz2D.Input.Touch.Collection

Defined in: src/input/touch_collection.coffee

Overview

Public: Touch Collection

Instance Method Summary

Constructor Details

::constructor(bounds, n = 16) Source

Public: Constructor. bounds - bounding rectangle of the element n - number of touches to pre-allocate (default: 16)

Parameters:

  • boundsbounding rectangle of the element
  • nnumber 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.

Parameters:

  • idtouch identifier

Returns:

  • 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

Parameters:

  • touchesa native TouchList