craftyjs/Crafty — pull request #846 by heniotierra (2014-12-17 11:55:35+00:00)
Title: implemented multitouch

This PR implements basic multitouch functionality. The downside is it breaks compatibility with mouse dependent components.

The changes in this PR include:
1. Refactored **Crafty.touchDispatch**;
2. Added **Crafty.fingers** array, which keeps track of currently touching fingers;
3. Added **Touch** component;
4. Added **AreaMap** component, which is used by Mouse and Touch;
5. Added **Button** component, which just selects either Mouse or Touch for an entity based on device;
6. Added function **Crafty.findClosestEntityByComponent**, which is used internally by Mouse and Touch.