processPointerUp(interactionEvent, displayObject, hit)
    {
        const e = interactionEvent.data.originalEvent;

        const id = interactionEvent.data.identifier;

        const trackingData = displayObject.trackedPointers[id];

        const isTouch = (e.type === 'touchend' || e.pointerType === 'touch');

        const isMouse = (e.type.indexOf('mouse') === 0 || e.pointerType === 'mouse');

        // Mouse only
        if (isMouse)
        {
            const isRightButton = e.button === 2 || e.which === 3;

            const flags = InteractionTrackingData.FLAGS;

            const test = isRightButton ? flags.RIGHT_DOWN : flags.LEFT_DOWN;

            const isDown = trackingData !== undefined && (trackingData.flags & test);

            if (hit)
            {
                this.dispatchEvent(displayObject, isRightButton ? 'rightup' : 'mouseup', interactionEvent);

                if (isDown)
                {
                    this.dispatchEvent(displayObject, isRightButton ? 'rightclick' : 'click', interactionEvent);
                }
            }
            else if (isDown)
            {
                this.dispatchEvent(displayObject, isRightButton ? 'rightupoutside' : 'mouseupoutside', interactionEvent);
            }
            // update the down state of the tracking data
            if (trackingData)
            {
                if (isRightButton)
                {
                    trackingData.rightDown = false;
                }
                else
                {
                    trackingData.leftDown = false;
                }
            }
        }

        // Pointers and Touches, and Mouse
        if (hit)
        {
            this.dispatchEvent(displayObject, 'pointerup', interactionEvent);
            if (isTouch) this.dispatchEvent(displayObject, 'touchend', interactionEvent);

            if (trackingData)
            {
                this.dispatchEvent(displayObject, 'pointertap', interactionEvent);
                if (isTouch)
                {
                    this.dispatchEvent(displayObject, 'tap', interactionEvent);
                    // touches are no longer over (if they ever were) when we get the touchend
                    // so we should ensure that we don't keep pretending that they are
                    trackingData.over = false;
                }
            }
        }
        else if (trackingData)
        {
            this.dispatchEvent(displayObject, 'pointerupoutside', interactionEvent);
            if (isTouch) this.dispatchEvent(displayObject, 'touchendoutside', interactionEvent);
        }
        // Only remove the tracking data if there is no over/down state still associated with it
        if (trackingData && trackingData.none)
        {
            delete displayObject.trackedPointers[id];
        }
    }
/**
     * Processes the result of the pointer up check and dispatches the event if need be
     *
     * @private
     * @param {InteractionEvent} interactionEvent - The interaction event wrapping the DOM event
     * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested
     * @param {boolean} hit - the result of the hit test on the display object
     */
Processes the result of the pointer up check and dispatches the event if need be
@private
@param {InteractionEvent} interactionEvent - The interaction event wrapping the DOM event
@param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested
@param {boolean} hit - the result of the hit test on the display object
Processes the result of the pointer up check and dispatches the event if need be @private @param { InteractionEvent } interactionEvent - The interaction event wrapping the DOM event @param { PIXI . Container|PIXI . Sprite|PIXI . extras . TilingSprite } displayObject - The display object that was tested @param { boolean } hit - the result of the hit test on the display object
processPointerUp(interactionEvent, displayObject, hit)
    {
        const e = interactionEvent.data.originalEvent;
        const id = interactionEvent.data.identifier;
        const trackingData = displayObject.trackedPointers[id];
        const isTouch = (e.type === 'touchend' || e.pointerType === 'touch');
        const isMouse = (e.type.indexOf('mouse') === 0 || e.pointerType === 'mouse');
        if (isMouse)
        {
            const isRightButton = e.button === 2 || e.which === 3;
            const flags = InteractionTrackingData.FLAGS;
            const test = isRightButton ? flags.RIGHT_DOWN : flags.LEFT_DOWN;
            const isDown = trackingData !== undefined && (trackingData.flags & test);
            if (hit)
            {
                this.dispatchEvent(displayObject, isRightButton ? 'rightup' : 'mouseup', interactionEvent);
                if (isDown)
                {
                    this.dispatchEvent(displayObject, isRightButton ? 'rightclick' : 'click', interactionEvent);
                }
            }
            else if (isDown)
            {
                this.dispatchEvent(displayObject, isRightButton ? 'rightupoutside' : 'mouseupoutside', interactionEvent);
            }
            if (trackingData)
            {
                if (isRightButton)
                {
                    trackingData.rightDown = false;
                }
                else
                {
                    trackingData.leftDown = false;
                }
            }
        }
        if (hit)
        {
            this.dispatchEvent(displayObject, 'pointerup', interactionEvent);
            if (isTouch) this.dispatchEvent(displayObject, 'touchend', interactionEvent);
            if (trackingData)
            {
                this.dispatchEvent(displayObject, 'pointertap', interactionEvent);
                if (isTouch)
                {
                    this.dispatchEvent(displayObject, 'tap', interactionEvent);
                    trackingData.over = false;
                }
            }
        }
        else if (trackingData)
        {
            this.dispatchEvent(displayObject, 'pointerupoutside', interactionEvent);
            if (isTouch) this.dispatchEvent(displayObject, 'touchendoutside', interactionEvent);
        }
        if (trackingData && trackingData.none)
        {
            delete displayObject.trackedPointers[id];
        }
    }
processPointerUp ( interactionEvent , displayObject , hit ) { const e = interactionEvent . data . originalEvent ; const id = interactionEvent . data . identifier ; const trackingData = displayObject . trackedPointers [ id ] ; const isTouch = ( e . type === 'touchend' || e . pointerType === 'touch' ) ; const isMouse = ( e . type . indexOf ( 'mouse' ) === 0 || e . pointerType === 'mouse' ) ; if ( isMouse ) { const isRightButton = e . button === 2 || e . which === 3 ; const flags = InteractionTrackingData . FLAGS ; const test = isRightButton ? flags . RIGHT_DOWN : flags . LEFT_DOWN ; const isDown = trackingData !== undefined && ( trackingData . flags & test ) ; if ( hit ) { this . dispatchEvent ( displayObject , isRightButton ? 'rightup' : 'mouseup' , interactionEvent ) ; if ( isDown ) { this . dispatchEvent ( displayObject , isRightButton ? 'rightclick' : 'click' , interactionEvent ) ; } } else if ( isDown ) { this . dispatchEvent ( displayObject , isRightButton ? 'rightupoutside' : 'mouseupoutside' , interactionEvent ) ; } if ( trackingData ) { if ( isRightButton ) { trackingData . rightDown = false ; } else { trackingData . leftDown = false ; } } } if ( hit ) { this . dispatchEvent ( displayObject , 'pointerup' , interactionEvent ) ; if ( isTouch ) this . dispatchEvent ( displayObject , 'touchend' , interactionEvent ) ; if ( trackingData ) { this . dispatchEvent ( displayObject , 'pointertap' , interactionEvent ) ; if ( isTouch ) { this . dispatchEvent ( displayObject , 'tap' , interactionEvent ) ; trackingData . over = false ; } } } else if ( trackingData ) { this . dispatchEvent ( displayObject , 'pointerupoutside' , interactionEvent ) ; if ( isTouch ) this . dispatchEvent ( displayObject , 'touchendoutside' , interactionEvent ) ; } if ( trackingData && trackingData . none ) { delete displayObject . trackedPointers [ id ] ; } }
Processes the result of the pointer up check and dispatches the event if need be
 @private
 @param {InteractionEvent} interactionEvent - The interaction event wrapping the DOM event
 @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested
 @param {boolean} hit - the result of the hit test on the display object
Processes the result of the pointer up check and dispatches the event if need be @private @param { InteractionEvent } interactionEvent - The interaction event wrapping the DOM event @param { PIXI . Container|PIXI . Sprite|PIXI . extras . TilingSprite } displayObject - The display object that was tested @param { boolean } hit - the result of the hit test on the display object
// Mouse only // update the down state of the tracking data // Pointers and Touches, and Mouse // touches are no longer over (if they ever were) when we get the touchend // so we should ensure that we don't keep pretending that they are // Only remove the tracking data if there is no over/down state still associated with it