mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 12:43:26 +00:00
Don't create the temp parentMatrix
if all we're doing is making a local matrix
This commit is contained in:
parent
f7f70ac63b
commit
bfb3008efe
1 changed files with 5 additions and 1 deletions
|
@ -512,7 +512,6 @@ var Transform = {
|
|||
getWorldTransformMatrix: function (tempMatrix, parentMatrix)
|
||||
{
|
||||
if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }
|
||||
if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }
|
||||
|
||||
var parent = this.parentContainer;
|
||||
|
||||
|
@ -521,6 +520,11 @@ var Transform = {
|
|||
return this.getLocalTransformMatrix(tempMatrix);
|
||||
}
|
||||
|
||||
if (!parentMatrix)
|
||||
{
|
||||
parentMatrix = new TransformMatrix();
|
||||
}
|
||||
|
||||
tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);
|
||||
|
||||
while (parent)
|
||||
|
|
Loading…
Reference in a new issue