examples/common/touch-emulator.js
function getChangedTouches(mouseEv, eventName) {
        var touchList = createTouchList(mouseEv);

        // we only want to return the added/removed item on multitouch
        // which is the second pointer, so remove the first pointer from the touchList
        //
        // but when the mouseEv.type is mouseup, we want to send all touches because then
        // no new input will be possible
        if(isMultiTouch && mouseEv.type != 'mouseup' &&
            (eventName == 'touchstart' || eventName == 'touchend')) {
            touchList.splice(0, 1);
        }

        return touchList;
    }
function getChangedTouches(mouseEv, eventName) {
        var touchList = createTouchList(mouseEv);

        // we only want to return the added/removed item on multitouch
        // which is the second pointer, so remove the first pointer from the touchList
        //
        // but when the mouseEv.type is mouseup, we want to send all touches because then
        // no new input will be possible
        if(isMultiTouch && mouseEv.type != 'mouseup' &&
            (eventName == 'touchstart' || eventName == 'touchend')) {
            touchList.splice(0, 1);
        }

        return touchList;
    }
function getChangedTouches ( mouseEv , eventName ) { var touchList = createTouchList ( mouseEv ) ; // we only want to return the added/removed item on multitouch // which is the second pointer, so remove the first pointer from the touchList // // but when the mouseEv.type is mouseup, we want to send all touches because then // no new input will be possible if ( isMultiTouch && mouseEv . type != 'mouseup' && ( eventName == 'touchstart' || eventName == 'touchend' ) ) { touchList . splice ( 0 , 1 ) ; } return touchList ; }
receive a filtered set of touches with only the changed pointers
@param mouseEv
@param eventName
@returns {TouchList}
receive a filtered set of touches with only the changed pointers