lib/pixi/src/interaction/InteractionManager.js
function InteractionManager(renderer, options)
{
    options = options || {};

    /**
     * The renderer this interaction manager works for.
     *
     * @member {SystemRenderer}
     */
    this.renderer = renderer;

    /**
     * Should default browser actions automatically be prevented.
     *
     * @member {boolean}
     * @default true
     */
    this.autoPreventDefault = options.autoPreventDefault !== undefined ? options.autoPreventDefault : true;

    /**
     * As this frequency increases the interaction events will be checked more often.
     *
     * @member {number}
     * @default 10
     */
    this.interactionFrequency = options.interactionFrequency || 10;

    /**
     * The mouse data
     *
     * @member {InteractionData}
     */
    this.mouse = new InteractionData();

    /**
     * An event data object to handle all the event tracking/dispatching
     *
     * @member {EventData}
     */
    this.eventData = {
        stopped: false,
        target: null,
        type: null,
        data: this.mouse,
        stopPropagation:function(){
            this.stopped = true;
        }
    };

    /**
     * Tiny little interactiveData pool !
     *
     * @member {Array}
     */
    this.interactiveDataPool = [];

    /**
     * The DOM element to bind to.
     *
     * @member {HTMLElement}
     * @private
     */
    this.interactionDOMElement = null;

    /**
     * Have events been attached to the dom element?
     *
     * @member {boolean}
     * @private
     */
    this.eventsAdded = false;

    //this will make it so that you don't have to call bind all the time

    /**
     * @member {Function}
     */
    this.onMouseUp = this.onMouseUp.bind(this);
    this.processMouseUp = this.processMouseUp.bind( this );


    /**
     * @member {Function}
     */
    this.onMouseDown = this.onMouseDown.bind(this);
    this.processMouseDown = this.processMouseDown.bind( this );

    /**
     * @member {Function}
     */
    this.onMouseMove = this.onMouseMove.bind( this );
    this.processMouseMove = this.processMouseMove.bind( this );

    /**
     * @member {Function}
     */
    this.onMouseOut = this.onMouseOut.bind(this);
    this.processMouseOverOut = this.processMouseOverOut.bind( this );


    /**
     * @member {Function}
     */
    this.onTouchStart = this.onTouchStart.bind(this);
    this.processTouchStart = this.processTouchStart.bind(this);

    /**
     * @member {Function}
     */
    this.onTouchEnd = this.onTouchEnd.bind(this);
    this.processTouchEnd = this.processTouchEnd.bind(this);

    /**
     * @member {Function}
     */
    this.onTouchMove = this.onTouchMove.bind(this);
    this.processTouchMove = this.processTouchMove.bind(this);

    /**
     * @member {number}
     */
    this.last = 0;

    /**
     * The css style of the cursor that is being used
     * @member {string}
     */
    this.currentCursorStyle = 'inherit';

    /**
     * Internal cached var
     * @member {Point}
     * @private
     */
    this._tempPoint = new core.Point();

    /**
     * The current resolution
     * @member {number}
     */
    this.resolution = 1;

    this.setTargetElement(this.renderer.view, this.renderer.resolution);
}
function InteractionManager(renderer, options)
{
    options = options || {};

    /**
     * The renderer this interaction manager works for.
     *
     * @member {SystemRenderer}
     */
    this.renderer = renderer;

    /**
     * Should default browser actions automatically be prevented.
     *
     * @member {boolean}
     * @default true
     */
    this.autoPreventDefault = options.autoPreventDefault !== undefined ? options.autoPreventDefault : true;

    /**
     * As this frequency increases the interaction events will be checked more often.
     *
     * @member {number}
     * @default 10
     */
    this.interactionFrequency = options.interactionFrequency || 10;

    /**
     * The mouse data
     *
     * @member {InteractionData}
     */
    this.mouse = new InteractionData();

    /**
     * An event data object to handle all the event tracking/dispatching
     *
     * @member {EventData}
     */
    this.eventData = {
        stopped: false,
        target: null,
        type: null,
        data: this.mouse,
        stopPropagation:function(){
            this.stopped = true;
        }
    };

    /**
     * Tiny little interactiveData pool !
     *
     * @member {Array}
     */
    this.interactiveDataPool = [];

    /**
     * The DOM element to bind to.
     *
     * @member {HTMLElement}
     * @private
     */
    this.interactionDOMElement = null;

    /**
     * Have events been attached to the dom element?
     *
     * @member {boolean}
     * @private
     */
    this.eventsAdded = false;

    //this will make it so that you don't have to call bind all the time

    /**
     * @member {Function}
     */
    this.onMouseUp = this.onMouseUp.bind(this);
    this.processMouseUp = this.processMouseUp.bind( this );


    /**
     * @member {Function}
     */
    this.onMouseDown = this.onMouseDown.bind(this);
    this.processMouseDown = this.processMouseDown.bind( this );

    /**
     * @member {Function}
     */
    this.onMouseMove = this.onMouseMove.bind( this );
    this.processMouseMove = this.processMouseMove.bind( this );

    /**
     * @member {Function}
     */
    this.onMouseOut = this.onMouseOut.bind(this);
    this.processMouseOverOut = this.processMouseOverOut.bind( this );


    /**
     * @member {Function}
     */
    this.onTouchStart = this.onTouchStart.bind(this);
    this.processTouchStart = this.processTouchStart.bind(this);

    /**
     * @member {Function}
     */
    this.onTouchEnd = this.onTouchEnd.bind(this);
    this.processTouchEnd = this.processTouchEnd.bind(this);

    /**
     * @member {Function}
     */
    this.onTouchMove = this.onTouchMove.bind(this);
    this.processTouchMove = this.processTouchMove.bind(this);

    /**
     * @member {number}
     */
    this.last = 0;

    /**
     * The css style of the cursor that is being used
     * @member {string}
     */
    this.currentCursorStyle = 'inherit';

    /**
     * Internal cached var
     * @member {Point}
     * @private
     */
    this._tempPoint = new core.Point();

    /**
     * The current resolution
     * @member {number}
     */
    this.resolution = 1;

    this.setTargetElement(this.renderer.view, this.renderer.resolution);
}
function InteractionManager ( renderer , options ) { options = options || { } ; /**
     * The renderer this interaction manager works for.
     *
     * @member {SystemRenderer}
     */ this . renderer = renderer ; /**
     * Should default browser actions automatically be prevented.
     *
     * @member {boolean}
     * @default true
     */ this . autoPreventDefault = options . autoPreventDefault !== undefined ? options . autoPreventDefault : true ; /**
     * As this frequency increases the interaction events will be checked more often.
     *
     * @member {number}
     * @default 10
     */ this . interactionFrequency = options . interactionFrequency || 10 ; /**
     * The mouse data
     *
     * @member {InteractionData}
     */ this . mouse = new InteractionData ( ) ; /**
     * An event data object to handle all the event tracking/dispatching
     *
     * @member {EventData}
     */ this . eventData = { stopped : false , target : null , type : null , data : this . mouse , stopPropagation : function ( ) { this . stopped = true ; } } ; /**
     * Tiny little interactiveData pool !
     *
     * @member {Array}
     */ this . interactiveDataPool = [ ] ; /**
     * The DOM element to bind to.
     *
     * @member {HTMLElement}
     * @private
     */ this . interactionDOMElement = null ; /**
     * Have events been attached to the dom element?
     *
     * @member {boolean}
     * @private
     */ this . eventsAdded = false ; //this will make it so that you don't have to call bind all the time /**
     * @member {Function}
     */ this . onMouseUp = this . onMouseUp . bind ( this ) ; this . processMouseUp = this . processMouseUp . bind ( this ) ; /**
     * @member {Function}
     */ this . onMouseDown = this . onMouseDown . bind ( this ) ; this . processMouseDown = this . processMouseDown . bind ( this ) ; /**
     * @member {Function}
     */ this . onMouseMove = this . onMouseMove . bind ( this ) ; this . processMouseMove = this . processMouseMove . bind ( this ) ; /**
     * @member {Function}
     */ this . onMouseOut = this . onMouseOut . bind ( this ) ; this . processMouseOverOut = this . processMouseOverOut . bind ( this ) ; /**
     * @member {Function}
     */ this . onTouchStart = this . onTouchStart . bind ( this ) ; this . processTouchStart = this . processTouchStart . bind ( this ) ; /**
     * @member {Function}
     */ this . onTouchEnd = this . onTouchEnd . bind ( this ) ; this . processTouchEnd = this . processTouchEnd . bind ( this ) ; /**
     * @member {Function}
     */ this . onTouchMove = this . onTouchMove . bind ( this ) ; this . processTouchMove = this . processTouchMove . bind ( this ) ; /**
     * @member {number}
     */ this . last = 0 ; /**
     * The css style of the cursor that is being used
     * @member {string}
     */ this . currentCursorStyle = 'inherit' ; /**
     * Internal cached var
     * @member {Point}
     * @private
     */ this . _tempPoint = new core . Point ( ) ; /**
     * The current resolution
     * @member {number}
     */ this . resolution = 1 ; this . setTargetElement ( this . renderer . view , this . renderer . resolution ) ; }
The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive
if its interactive parameter is set to true
This manager also supports multitouch.

@class
@memberof PIXI.interaction
@param renderer {CanvasRenderer|WebGLRenderer} A reference to the current renderer
@param [options] {object}
@param [options.autoPreventDefault=true] {boolean} Should the manager automatically prevent default browser actions.
@param [options.interactionFrequency=10] {number} Frequency increases the interaction events will be checked.
The interaction manager deals with mouse and touch events . Any DisplayObject can be interactive if its interactive parameter is set to true This manager also supports multitouch .