Removed the matrix.

This commit is contained in:
Richard Davey 2016-10-07 03:34:42 +01:00
parent 35fd29a45a
commit 5b4280d694
6 changed files with 7 additions and 13 deletions

View file

@ -46,11 +46,11 @@ Phaser.Stage = function (game) {
this.exists = true;
/**
* @property {PIXI.Matrix} worldTransform - Current transform of the object based on world (parent) factors
* @property {Phaser.Matrix} worldTransform - Current transform of the object based on world (parent) factors
* @private
* @readOnly
*/
this.worldTransform = new PIXI.Matrix();
this.worldTransform = new Phaser.Matrix();
/**
* @property {Phaser.Stage} stage - The stage reference (the Stage is its own stage)

View file

@ -50,7 +50,7 @@ Phaser.Component.ScaleMinMax.prototype = {
*
* @method
* @private
* @param {PIXI.Matrix} wt - The updated worldTransform matrix.
* @param {Phaser.Matrix} wt - The updated worldTransform matrix.
*/
checkTransform: function (wt) {

View file

@ -385,10 +385,4 @@ Phaser.Matrix.prototype = {
};
Phaser.identityMatrix = new Phaser.Matrix();
Phaser.tempMatrix = new Phaser.Matrix();
// Because PIXI uses its own type, we'll replace it with ours to avoid duplicating code or confusion.
PIXI.Matrix = Phaser.Matrix;
PIXI.identityMatrix = Phaser.identityMatrix;

View file

@ -142,10 +142,10 @@ PIXI.DisplayObject = function () {
* that happens this property will contain values based on the previous frame. Be mindful of this if
* accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.
*
* @property {PIXI.Matrix} worldTransform
* @property {Phaser.Matrix} worldTransform
* @readOnly
*/
this.worldTransform = new PIXI.Matrix();
this.worldTransform = new Phaser.Matrix();
/**
* The coordinates, in pixels, of this DisplayObject within the world.

View file

@ -308,7 +308,7 @@ PIXI.DisplayObjectContainer.prototype.getBounds = function (targetCoordinateSpac
{
var matrixCache = targetCoordinateSpace.worldTransform;
targetCoordinateSpace.worldTransform = PIXI.identityMatrix;
targetCoordinateSpace.worldTransform = Phaser.identityMatrix;
for (i = 0; i < targetCoordinateSpace.children.length; i++)
{

View file

@ -322,7 +322,7 @@ PIXI.Sprite.prototype.getLocalBounds = function () {
var matrixCache = this.worldTransform;
this.worldTransform = PIXI.identityMatrix;
this.worldTransform = Phaser.identityMatrix;
for (var i = 0; i < this.children.length; i++)
{