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:
Mat Groves 2013-05-22 18:44:20 +01:00
parent ba5a79c606
commit 88b863155a
82 changed files with 14133 additions and 6332 deletions

View file

@ -67,6 +67,8 @@
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -153,6 +155,13 @@ PIXI.DisplayObject = function()
*&#x2F;
this.scale = new PIXI.Point(1,1);&#x2F;&#x2F;{x:1, y:1};
&#x2F;**
* The pivot point of the displayObject that it rotates around
* @property pivot
* @type Point
*&#x2F;
this.pivot = new PIXI.Point(0,0);
&#x2F;**
* The rotation of the object in radians.
* @property rotation
@ -173,7 +182,7 @@ PIXI.DisplayObject = function()
* @type Boolean
*&#x2F;
this.visible = true;
this.cacheVisible = false;
this.worldVisible = false;
&#x2F;**
* [read-only] The display object container that contains this display object.
@ -334,9 +343,16 @@ PIXI.DisplayObject.prototype.updateTransform = function()
localTransform[4] = this._cr * this.scale.y;
&#x2F;&#x2F;&#x2F;AAARR GETTER SETTTER!
localTransform[2] = this.position.x;
localTransform[5] = this.position.y;
&#x2F;&#x2F;localTransform[2] = this.position.x;
&#x2F;&#x2F;localTransform[5] = this.position.y;
var px = this.pivot.x;
var py = this.pivot.y;
&#x2F;&#x2F;&#x2F;AAARR GETTER SETTTER!
localTransform[2] = this.position.x - localTransform[0] * px - py * localTransform[1];
localTransform[5] = this.position.y - localTransform[4] * py - px * localTransform[3];
&#x2F;&#x2F; Cache the matrix values (makes for huge speed increases!)
var a00 = localTransform[0], a01 = localTransform[1], a02 = localTransform[2],
a10 = localTransform[3], a11 = localTransform[4], a12 = localTransform[5],
@ -354,7 +370,9 @@ PIXI.DisplayObject.prototype.updateTransform = function()
&#x2F;&#x2F; because we are using affine transformation, we can optimise the matrix concatenation process.. wooo!
&#x2F;&#x2F; mat3.multiply(this.localTransform, this.parent.worldTransform, this.worldTransform);
this.worldAlpha = this.alpha * this.parent.worldAlpha;
this.worldAlpha = this.alpha * this.parent.worldAlpha;
}
</pre>