src/gamejs/event.js
function w3cTouchConvert(touchList) {
      var canvasOffset = display._getCanvasOffset();
      var tList = [];
      for (var i = 0; i < touchList.length; i++) {
         var touchEvent = touchList.item(i);
         tList.push({
            identifier: touchEvent.identifier,
            pos: [touchEvent.clientX - canvasOffset[0], touchEvent.clientY - canvasOffset[1]]
         });
      }
      return tList;
   }
function w3cTouchConvert(touchList) {
      var canvasOffset = display._getCanvasOffset();
      var tList = [];
      for (var i = 0; i < touchList.length; i++) {
         var touchEvent = touchList.item(i);
         tList.push({
            identifier: touchEvent.identifier,
            pos: [touchEvent.clientX - canvasOffset[0], touchEvent.clientY - canvasOffset[1]]
         });
      }
      return tList;
   }
function w3cTouchConvert ( touchList ) { var canvasOffset = display . _getCanvasOffset ( ) ; var tList = [ ] ; for ( var i = 0 ; i < touchList . length ; i ++ ) { var touchEvent = touchList . item ( i ) ; tList . push ( { identifier : touchEvent . identifier , pos : [ touchEvent . clientX - canvasOffset [ 0 ] , touchEvent . clientY - canvasOffset [ 1 ] ] } ) ; } return tList ; }
convert a w3c touch event into gamejs event
convert a w3c touch event into gamejs event