touch meta more info

beta.r3js.org
-=yb4f310 2018-01-17 12:56:36 +01:00
parent bbd475a2e6
commit c064185fd4
1 changed files with 16 additions and 1 deletions

View File

@ -666,6 +666,11 @@ GameLib.System.Input.prototype.onTouchMove = function (event) {
var pinch = false;
var zoom = false;
var totalUp = 0;
var totalDown = 0;
var totalLeft = 0;
var totalRight = 0;
for (var t = 0; t < event.changedTouches.length; t++) {
id = event.changedTouches[t].identifier;
@ -704,6 +709,11 @@ GameLib.System.Input.prototype.onTouchMove = function (event) {
this.touches[id].lastTouchY = event.changedTouches[t].pageY;
this.touches[id].pageX = event.changedTouches[t].pageX;
this.touches[id].pageY = event.changedTouches[t].pageY;
totalLeft += left;
totalRight += right;
totalUp += up;
totalDown += down;
}
}
@ -747,7 +757,11 @@ GameLib.System.Input.prototype.onTouchMove = function (event) {
inward : inward,
outward : outward,
pinch : pinch,
zoom : zoom
zoom : zoom,
totalLeft : totalLeft,
totalRight : totalRight,
totalUp : totalUp,
totalDown : totalDown
};
// if (this.sensitivityCounter >= this.touchSensitivity) {
@ -757,6 +771,7 @@ GameLib.System.Input.prototype.onTouchMove = function (event) {
GameLib.Event.Emit(
GameLib.Event.TOUCH_MOVE,
this.touches
);
// }