Commit Graph

13 Commits

Author SHA1 Message Date
Francesco Balestrieri 992ba4d0d3 If the device supports touch input, set default controls to TOUCH 2014-08-22 08:28:36 +03:00
Elliot Smith 27c4b94d38 Be more discriminating when handling touch events
Check the position and type of the touch event to determine
whether acceleration is being applied.

The only issue with this is that if a touch moves from the right
of the screen to the left, if a touchend event occurs in the left
side of the screen, it won't stop the acceleration. But it's a
better solution than counting the number of touches.

Also added a check on touch move events, so that only moves which
occur on the left of the screen are counted as turns. The reason
for this is that in some cases, the touch identifier was being
incorrectly applied: so a touch which started on the left of
the screen could accidentally be continued by a touchmove
occurring on the right of the screen, resulting in a violent right
turn. (It appears as though the touch ID can mistakenly
transfer between touches with different fingers.)

By testing where the touchmove occurs, the violent turn effect
can be removed, as only a finger on the left-hand side of the
screen can cause moves.
2014-05-30 16:16:49 +01:00
Thibaut Despoulain fdc7e913fc Add support for newer Gamepad API. Fix left stick handling. 2014-05-24 16:17:47 -07:00
mahesh.kk 6100ecf394 Add gamepad controller support for the game 2014-05-19 15:59:52 -04:00
BKcore 40aafe04c8 Latest local changes for branching (3). 2013-03-16 16:13:06 +01:00
BKcore 28046f4a66 Latest local changes for branching. 2013-03-16 16:10:48 +01:00
BKcore 9214a94f81 Updated TouchControls and ShipControls with mobile fixes. 2013-01-29 18:45:30 +01:00
BKcore b7ea7a25a0 Added TouchController class 2013-01-23 22:21:48 +01:00
BKcore caa452b215 Added missing exports in Particles 2012-12-23 23:37:33 +01:00
BKcore d58e4cb4eb Added coffee version of bkcore.threejs.Particles 2012-12-23 23:31:18 +01:00
BKcore 36be5b56c1 Added coffee version of bkcore.Utils and added rev53 of Three.js in libs. 2012-12-20 20:35:39 +01:00
BKcore 25bffdddcd Added coffee version of bkcore.ImageData and added missing doc 2012-12-20 16:22:48 +01:00
BKcore 52e6bd0b93 Started CoffeeScript port. Moved third-party libs from js/ to libs/. 2012-12-20 14:31:13 +01:00