RenderTexture update
RenderTexture added (webGL and Canvas) WebGL Render rearchitected - a little faster :) Pivot added to DisplayObject docs updated grunt file updated
This commit is contained in:
parent
ba5a79c606
commit
88b863155a
82 changed files with 14133 additions and 6332 deletions
|
@ -67,6 +67,8 @@
|
|||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/RenderTexture.html">RenderTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
@ -165,17 +167,27 @@ PIXI.DisplayObjectContainer.prototype.addChild = function(child)
|
|||
{
|
||||
if(child.parent != undefined)
|
||||
{
|
||||
child.parent.removeChild(child)
|
||||
child.parent.removeChild(child);
|
||||
}
|
||||
|
||||
child.parent = this;
|
||||
child.childIndex = this.children.length;
|
||||
|
||||
this.children.push(child);
|
||||
|
||||
if(this.stage)
|
||||
{
|
||||
this.stage.__addChild(child);
|
||||
}
|
||||
|
||||
// need to remove any render groups..
|
||||
if(this.__renderGroup)
|
||||
{
|
||||
// being used by a renderTexture.. if it exists then it must be from a render texture;
|
||||
if(child.__renderGroup)child.__renderGroup.removeDisplayObjectAndChildren(child);
|
||||
// add them to the new render group..
|
||||
this.__renderGroup.addDisplayObjectAndChildren(child);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -215,6 +227,12 @@ PIXI.DisplayObjectContainer.prototype.addChildAt = function(child, index)
|
|||
{
|
||||
this.stage.__addChild(child);
|
||||
}
|
||||
|
||||
// little webGL!
|
||||
if(this.__renderGroup)
|
||||
{
|
||||
this.__renderGroup.addDisplayObjectAndChildren(child);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -290,12 +308,23 @@ PIXI.DisplayObjectContainer.prototype.getChildAt = function(index)
|
|||
PIXI.DisplayObjectContainer.prototype.removeChild = function(child)
|
||||
{
|
||||
var index = this.children.indexOf( child );
|
||||
|
||||
|
||||
if ( index !== -1 )
|
||||
{
|
||||
if(this.stage)this.stage.__removeChild(child);
|
||||
if(this.stage)
|
||||
{
|
||||
this.stage.__removeChild(child);
|
||||
}
|
||||
// console.log(child.__renderGroup);
|
||||
if(child.__renderGroup)
|
||||
{
|
||||
// console.log(">?")
|
||||
child.__renderGroup.removeDisplayObjectAndChildren(child);
|
||||
}
|
||||
|
||||
// console.log(">" + child.__renderGroup)
|
||||
child.parent = undefined;
|
||||
//child.childIndex = 0
|
||||
|
||||
this.children.splice( index, 1 );
|
||||
|
||||
// update in dexs!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue