switch(event.type) {
case 'touchstart': case 'touchmove': {
event.preventDefault();
var touches = [];
// Clear out any touchstart events that we've already processed
if (event.type === 'touchstart') {
for (var i = 0; i < event.touches.length; i++) {
var touch = event.touches[i];
if (SDL.downFingers[touch.identifier] != true) {
SDL.downFingers[touch.identifier] = true;
touches.push(touch);
}
}
} else {
touches = event.touches;
}
var firstTouch = touches[0];
if (event.type == 'touchstart') {
SDL.DOMButtons[0] = 1;
}
var mouseEventType;
switch(event.type) {
case 'touchstart': mouseEventType = 'mousedown'; break;
case 'touchmove': mouseEventType = 'mousemove'; break;
}
var mouseEvent = {
type: mouseEventType,
button: 0,
pageX: firstTouch.clientX,
pageY: firstTouch.clientY
};
var firstTouch = touches[0];
--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.