Internal method which dispatches touch events received by Crafty (crafty.stage.elem). The touch events get dispatched to the closest entity to the source of the event (if available).

By default, touch events are treated as mouse events. To change this behaviour (and enable multitouch) you must use Crafty.multitouch.

If using multitouch feature, this method sets the array Crafty.touchHandler.fingers, which holds data of the most recent touches that occured (useful for determining positions of fingers in every frame) as well as last entity touched by each finger. Data is lost as soon as the finger is raised.

You can read about the MouseEvent, which is the parameter passed to the Mouse entity's callback.

You can also read about the TouchEvent.

And about the touch point interface, which is the parameter passed to the Touch entity's callback.