diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index 84326a3..82d5366 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -87,15 +87,6 @@ this.renderable = false; /** - * [read-only] The visibility of the object based on world (parent) factors. - * - * @property worldVisible - * @type Boolean - * @readOnly - */ - this.worldVisible = false; - - /** * [read-only] The display object container that contains this display object. * * @property parent @@ -251,17 +242,6 @@ // constructor PIXI.DisplayObject.prototype.constructor = PIXI.DisplayObject; -//TODO make visible a getter setter -/* -Object.defineProperty(PIXI.DisplayObject.prototype, 'visible', { - get: function() { - return this._visible; - }, - set: function(value) { - this._visible = value; - } -});*/ - /** * [Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default * Instead of using this function you can now simply set the interactive property to true or false @@ -334,12 +314,10 @@ if(this.filter)return; this.filter = true; - // insert a filter block.. var start = new PIXI.FilterBlock(); var end = new PIXI.FilterBlock(); - start.mask = mask; end.mask = mask; @@ -349,9 +327,7 @@ start.open = true; /* - * * insert start - * */ var childFirst = start @@ -382,9 +358,7 @@ // now insert the end filter block.. /* - * * insert end filter - * */ var childFirst = end var childLast = end @@ -460,8 +434,6 @@ previousObject._iNext = nextObject; // this is always true too! -// if(this.last == lastBlock) - //{ var tempLast = lastBlock._iPrev; // need to make sure the parents last is updated too var updateLast = this; @@ -480,7 +452,6 @@ { this.__renderGroup.removeFilterBlocks(startBlock, lastBlock); } - //} } /* diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index 84326a3..82d5366 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -87,15 +87,6 @@ this.renderable = false; /** - * [read-only] The visibility of the object based on world (parent) factors. - * - * @property worldVisible - * @type Boolean - * @readOnly - */ - this.worldVisible = false; - - /** * [read-only] The display object container that contains this display object. * * @property parent @@ -251,17 +242,6 @@ // constructor PIXI.DisplayObject.prototype.constructor = PIXI.DisplayObject; -//TODO make visible a getter setter -/* -Object.defineProperty(PIXI.DisplayObject.prototype, 'visible', { - get: function() { - return this._visible; - }, - set: function(value) { - this._visible = value; - } -});*/ - /** * [Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default * Instead of using this function you can now simply set the interactive property to true or false @@ -334,12 +314,10 @@ if(this.filter)return; this.filter = true; - // insert a filter block.. var start = new PIXI.FilterBlock(); var end = new PIXI.FilterBlock(); - start.mask = mask; end.mask = mask; @@ -349,9 +327,7 @@ start.open = true; /* - * * insert start - * */ var childFirst = start @@ -382,9 +358,7 @@ // now insert the end filter block.. /* - * * insert end filter - * */ var childFirst = end var childLast = end @@ -460,8 +434,6 @@ previousObject._iNext = nextObject; // this is always true too! -// if(this.last == lastBlock) - //{ var tempLast = lastBlock._iPrev; // need to make sure the parents last is updated too var updateLast = this; @@ -480,7 +452,6 @@ { this.__renderGroup.removeFilterBlocks(startBlock, lastBlock); } - //} } /* diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 8ae41d7..01b566d 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -61,7 +61,7 @@ this.children.push(child); - // updae the stage refference.. + // update the stage refference.. if(this.stage) { @@ -96,7 +96,6 @@ nextObject = previousObject._iNext; // always true in this case - //this.last = child.last; // need to make sure the parents last is updated too var updateLast = this; var prevLast = previousObject; @@ -160,7 +159,7 @@ } // modify the list.. - var childFirst = child.first + var childFirst = child.first; var childLast = child.last; var nextObject; var previousObject; @@ -168,7 +167,7 @@ if(index == this.children.length) { previousObject = this.last; - var updateLast = this;//.parent; + var updateLast = this; var prevLast = this.last; while(updateLast) { @@ -297,7 +296,7 @@ { // unlink // // modify the list.. - var childFirst = child.first + var childFirst = child.first; var childLast = child.last; var nextObject = childLast._iNext; diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index 84326a3..82d5366 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -87,15 +87,6 @@ this.renderable = false; /** - * [read-only] The visibility of the object based on world (parent) factors. - * - * @property worldVisible - * @type Boolean - * @readOnly - */ - this.worldVisible = false; - - /** * [read-only] The display object container that contains this display object. * * @property parent @@ -251,17 +242,6 @@ // constructor PIXI.DisplayObject.prototype.constructor = PIXI.DisplayObject; -//TODO make visible a getter setter -/* -Object.defineProperty(PIXI.DisplayObject.prototype, 'visible', { - get: function() { - return this._visible; - }, - set: function(value) { - this._visible = value; - } -});*/ - /** * [Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default * Instead of using this function you can now simply set the interactive property to true or false @@ -334,12 +314,10 @@ if(this.filter)return; this.filter = true; - // insert a filter block.. var start = new PIXI.FilterBlock(); var end = new PIXI.FilterBlock(); - start.mask = mask; end.mask = mask; @@ -349,9 +327,7 @@ start.open = true; /* - * * insert start - * */ var childFirst = start @@ -382,9 +358,7 @@ // now insert the end filter block.. /* - * * insert end filter - * */ var childFirst = end var childLast = end @@ -460,8 +434,6 @@ previousObject._iNext = nextObject; // this is always true too! -// if(this.last == lastBlock) - //{ var tempLast = lastBlock._iPrev; // need to make sure the parents last is updated too var updateLast = this; @@ -480,7 +452,6 @@ { this.__renderGroup.removeFilterBlocks(startBlock, lastBlock); } - //} } /* diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 8ae41d7..01b566d 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -61,7 +61,7 @@ this.children.push(child); - // updae the stage refference.. + // update the stage refference.. if(this.stage) { @@ -96,7 +96,6 @@ nextObject = previousObject._iNext; // always true in this case - //this.last = child.last; // need to make sure the parents last is updated too var updateLast = this; var prevLast = previousObject; @@ -160,7 +159,7 @@ } // modify the list.. - var childFirst = child.first + var childFirst = child.first; var childLast = child.last; var nextObject; var previousObject; @@ -168,7 +167,7 @@ if(index == this.children.length) { previousObject = this.last; - var updateLast = this;//.parent; + var updateLast = this; var prevLast = this.last; while(updateLast) { @@ -297,7 +296,7 @@ { // unlink // // modify the list.. - var childFirst = child.first + var childFirst = child.first; var childLast = child.last; var nextObject = childLast._iNext; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 7a77856..40a0a18 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -131,7 +131,9 @@ if(!this.playing)return; this.currentFrame += this.animationSpeed; + var round = (this.currentFrame + 0.5) | 0; + if(this.loop || round < this.textures.length) { this.setTexture(this.textures[round % this.textures.length]); diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index 84326a3..82d5366 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -87,15 +87,6 @@ this.renderable = false; /** - * [read-only] The visibility of the object based on world (parent) factors. - * - * @property worldVisible - * @type Boolean - * @readOnly - */ - this.worldVisible = false; - - /** * [read-only] The display object container that contains this display object. * * @property parent @@ -251,17 +242,6 @@ // constructor PIXI.DisplayObject.prototype.constructor = PIXI.DisplayObject; -//TODO make visible a getter setter -/* -Object.defineProperty(PIXI.DisplayObject.prototype, 'visible', { - get: function() { - return this._visible; - }, - set: function(value) { - this._visible = value; - } -});*/ - /** * [Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default * Instead of using this function you can now simply set the interactive property to true or false @@ -334,12 +314,10 @@ if(this.filter)return; this.filter = true; - // insert a filter block.. var start = new PIXI.FilterBlock(); var end = new PIXI.FilterBlock(); - start.mask = mask; end.mask = mask; @@ -349,9 +327,7 @@ start.open = true; /* - * * insert start - * */ var childFirst = start @@ -382,9 +358,7 @@ // now insert the end filter block.. /* - * * insert end filter - * */ var childFirst = end var childLast = end @@ -460,8 +434,6 @@ previousObject._iNext = nextObject; // this is always true too! -// if(this.last == lastBlock) - //{ var tempLast = lastBlock._iPrev; // need to make sure the parents last is updated too var updateLast = this; @@ -480,7 +452,6 @@ { this.__renderGroup.removeFilterBlocks(startBlock, lastBlock); } - //} } /* diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 8ae41d7..01b566d 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -61,7 +61,7 @@ this.children.push(child); - // updae the stage refference.. + // update the stage refference.. if(this.stage) { @@ -96,7 +96,6 @@ nextObject = previousObject._iNext; // always true in this case - //this.last = child.last; // need to make sure the parents last is updated too var updateLast = this; var prevLast = previousObject; @@ -160,7 +159,7 @@ } // modify the list.. - var childFirst = child.first + var childFirst = child.first; var childLast = child.last; var nextObject; var previousObject; @@ -168,7 +167,7 @@ if(index == this.children.length) { previousObject = this.last; - var updateLast = this;//.parent; + var updateLast = this; var prevLast = this.last; while(updateLast) { @@ -297,7 +296,7 @@ { // unlink // // modify the list.. - var childFirst = child.first + var childFirst = child.first; var childLast = child.last; var nextObject = childLast._iNext; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 7a77856..40a0a18 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -131,7 +131,9 @@ if(!this.playing)return; this.currentFrame += this.animationSpeed; + var round = (this.currentFrame + 0.5) | 0; + if(this.loop || round < this.textures.length) { this.setTexture(this.textures[round % this.textures.length]); diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index 681c91b..c70deff 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -119,35 +119,3 @@ { return this.interactionManager.mouse.global; } -/* -PIXI.Stage.prototype.__addChild = function(child) -{ - if(child.interactive)this.dirty = true; - - child.stage = this; - - if(child.children) - { - for (var i=0; i < child.children.length; i++) - { - this.__addChild(child.children[i]); - }; - } - -} - - -PIXI.Stage.prototype.__removeChild = function(child) -{ - if(child.interactive)this.dirty = true; - - child.stage = undefined; - - if(child.children) - { - for(var i=0,j=child.children.length; i 0) - { - this.checkVisibility(child, child.worldVisible); - } - }; -}*/ - -/** * Updates a webgl texture * * @method updateTexture diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index 84326a3..82d5366 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -87,15 +87,6 @@ this.renderable = false; /** - * [read-only] The visibility of the object based on world (parent) factors. - * - * @property worldVisible - * @type Boolean - * @readOnly - */ - this.worldVisible = false; - - /** * [read-only] The display object container that contains this display object. * * @property parent @@ -251,17 +242,6 @@ // constructor PIXI.DisplayObject.prototype.constructor = PIXI.DisplayObject; -//TODO make visible a getter setter -/* -Object.defineProperty(PIXI.DisplayObject.prototype, 'visible', { - get: function() { - return this._visible; - }, - set: function(value) { - this._visible = value; - } -});*/ - /** * [Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default * Instead of using this function you can now simply set the interactive property to true or false @@ -334,12 +314,10 @@ if(this.filter)return; this.filter = true; - // insert a filter block.. var start = new PIXI.FilterBlock(); var end = new PIXI.FilterBlock(); - start.mask = mask; end.mask = mask; @@ -349,9 +327,7 @@ start.open = true; /* - * * insert start - * */ var childFirst = start @@ -382,9 +358,7 @@ // now insert the end filter block.. /* - * * insert end filter - * */ var childFirst = end var childLast = end @@ -460,8 +434,6 @@ previousObject._iNext = nextObject; // this is always true too! -// if(this.last == lastBlock) - //{ var tempLast = lastBlock._iPrev; // need to make sure the parents last is updated too var updateLast = this; @@ -480,7 +452,6 @@ { this.__renderGroup.removeFilterBlocks(startBlock, lastBlock); } - //} } /* diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 8ae41d7..01b566d 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -61,7 +61,7 @@ this.children.push(child); - // updae the stage refference.. + // update the stage refference.. if(this.stage) { @@ -96,7 +96,6 @@ nextObject = previousObject._iNext; // always true in this case - //this.last = child.last; // need to make sure the parents last is updated too var updateLast = this; var prevLast = previousObject; @@ -160,7 +159,7 @@ } // modify the list.. - var childFirst = child.first + var childFirst = child.first; var childLast = child.last; var nextObject; var previousObject; @@ -168,7 +167,7 @@ if(index == this.children.length) { previousObject = this.last; - var updateLast = this;//.parent; + var updateLast = this; var prevLast = this.last; while(updateLast) { @@ -297,7 +296,7 @@ { // unlink // // modify the list.. - var childFirst = child.first + var childFirst = child.first; var childLast = child.last; var nextObject = childLast._iNext; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 7a77856..40a0a18 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -131,7 +131,9 @@ if(!this.playing)return; this.currentFrame += this.animationSpeed; + var round = (this.currentFrame + 0.5) | 0; + if(this.loop || round < this.textures.length) { this.setTexture(this.textures[round % this.textures.length]); diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index 681c91b..c70deff 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -119,35 +119,3 @@ { return this.interactionManager.mouse.global; } -/* -PIXI.Stage.prototype.__addChild = function(child) -{ - if(child.interactive)this.dirty = true; - - child.stage = this; - - if(child.children) - { - for (var i=0; i < child.children.length; i++) - { - this.__addChild(child.children[i]); - }; - } - -} - - -PIXI.Stage.prototype.__removeChild = function(child) -{ - if(child.interactive)this.dirty = true; - - child.stage = undefined; - - if(child.children) - { - for(var i=0,j=child.children.length; i 0) - { - this.checkVisibility(child, child.worldVisible); - } - }; -}*/ - -/** * Updates a webgl texture * * @method updateTexture diff --git a/src/pixi/renderers/webgl/WebGLRenderer.js b/src/pixi/renderers/webgl/WebGLRenderer.js index 276426b..f05c162 100644 --- a/src/pixi/renderers/webgl/WebGLRenderer.js +++ b/src/pixi/renderers/webgl/WebGLRenderer.js @@ -134,7 +134,6 @@ { // TODO make this work // dont think this is needed any more? - //if(this.__stage)this.checkVisibility(this.__stage, false) this.__stage = stage; this.stageRenderGroup.setRenderable(stage); } @@ -151,9 +150,6 @@ // update any textures PIXI.WebGLRenderer.updateTextures(); - // recursivly loop through all items! - //this.checkVisibility(stage, true); - // update the scene graph PIXI.visibleCount++; stage.updateTransform(); @@ -164,16 +160,12 @@ gl.colorMask(true, true, true, this.transparent); gl.viewport(0, 0, this.width, this.height); - // set the correct matrix.. - // gl.uniformMatrix4fv(this.shaderProgram.mvMatrixUniform, false, this.projectionMatrix); - gl.bindFramebuffer(gl.FRAMEBUFFER, null); gl.clearColor(stage.backgroundColorSplit[0],stage.backgroundColorSplit[1],stage.backgroundColorSplit[2], !this.transparent); gl.clear(gl.COLOR_BUFFER_BIT); // HACK TO TEST - //PIXI.projectionMatrix = this.projectionMatrix; this.stageRenderGroup.backgroundColor = stage.backgroundColorSplit; this.stageRenderGroup.render(PIXI.projection);