@@ -32,56 +32,16 @@ PIXI.Stage = function(backgroundColor)
3232 */
3333 this . worldTransform = new PIXI . Matrix ( ) ;
3434
35- /**
36- * Whether or not the stage is interactive
37- *
38- * @property interactive
39- * @type Boolean
40- */
41- this . interactive = true ;
42-
43- /**
44- * The interaction manage for this stage, manages all interactive activity on the stage
45- *
46- * @property interactionManager
47- * @type InteractionManager
48- */
49- this . interactionManager = new PIXI . InteractionManager ( this ) ;
50-
51- /**
52- * Whether the stage is dirty and needs to have interactions updated
53- *
54- * @property dirty
55- * @type Boolean
56- * @private
57- */
58- this . dirty = true ;
59-
6035 //the stage is its own stage
6136 this . stage = this ;
6237
63- //optimize hit detection a bit
64- this . stage . hitArea = new PIXI . Rectangle ( 0 , 0 , 100000 , 100000 ) ;
65-
6638 this . setBackgroundColor ( backgroundColor ) ;
6739} ;
6840
6941// constructor
7042PIXI . Stage . prototype = Object . create ( PIXI . DisplayObjectContainer . prototype ) ;
7143PIXI . Stage . prototype . constructor = PIXI . Stage ;
7244
73- /**
74- * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element.
75- * This is useful for when you have other DOM elements on top of the Canvas element.
76- *
77- * @method setInteractionDelegate
78- * @param domElement {DOMElement} This new domElement which will receive mouse/touch events
79- */
80- PIXI . Stage . prototype . setInteractionDelegate = function ( domElement )
81- {
82- this . interactionManager . setTargetDomElement ( domElement ) ;
83- } ;
84-
8545/*
8646 * Updates the object transform for rendering
8747 *
@@ -92,19 +52,10 @@ PIXI.Stage.prototype.updateTransform = function()
9252{
9353 this . worldAlpha = 1 ;
9454
95- for ( var i = 0 , j = this . children . length ; i < j ; i ++ )
55+ for ( var i = 0 ; i < this . children . length ; i ++ )
9656 {
9757 this . children [ i ] . updateTransform ( ) ;
9858 }
99-
100- if ( this . dirty )
101- {
102- this . dirty = false ;
103- // update interactive!
104- this . interactionManager . dirty = true ;
105- }
106-
107- if ( this . interactive ) this . interactionManager . update ( ) ;
10859} ;
10960
11061/**
@@ -122,14 +73,3 @@ PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor)
12273 hex = '000000' . substr ( 0 , 6 - hex . length ) + hex ;
12374 this . backgroundColorString = '#' + hex ;
12475} ;
125-
126- /**
127- * This will return the point containing global coordinates of the mouse.
128- *
129- * @method getMousePosition
130- * @return {Point } A point containing the coordinates of the global InteractionData position.
131- */
132- PIXI . Stage . prototype . getMousePosition = function ( )
133- {
134- return this . interactionManager . mouse . global ;
135- } ;
0 commit comments