diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index 87db233..47bbad5 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -284,15 +284,17 @@ { // I'm assuming that skewing is not going to be very common // With that in mind, we can do a full setTransform using the temp matrix - _tempMatrix.setTransform(this.position.x - ,this.position.y - ,this.pivot.x - ,this.pivot.y - ,this.scale.x - ,this.scale.y - ,this.rotation - ,this.skew.x - ,this.skew.y ); + _tempMatrix.setTransform( + this.position.x, + this.position.y, + this.pivot.x, + this.pivot.y, + this.scale.x, + this.scale.y, + this.rotation, + this.skew.x, + this.skew.y + ); // now concat the matrix (inlined so that we can avoid using copy) wt.a = _tempMatrix.a * pt.a + _tempMatrix.b * pt.c; diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index 87db233..47bbad5 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -284,15 +284,17 @@ { // I'm assuming that skewing is not going to be very common // With that in mind, we can do a full setTransform using the temp matrix - _tempMatrix.setTransform(this.position.x - ,this.position.y - ,this.pivot.x - ,this.pivot.y - ,this.scale.x - ,this.scale.y - ,this.rotation - ,this.skew.x - ,this.skew.y ); + _tempMatrix.setTransform( + this.position.x, + this.position.y, + this.pivot.x, + this.pivot.y, + this.scale.x, + this.scale.y, + this.rotation, + this.skew.x, + this.skew.y + ); // now concat the matrix (inlined so that we can avoid using copy) wt.a = _tempMatrix.a * pt.a + _tempMatrix.b * pt.c; diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index d642dce..4e7fe99 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -1,3 +1,7 @@ +// @todo - ignore the too many parameters warning for now +// should either fix it or change the jshint config +// jshint -W072 + var Point = require('./Point'); /** @@ -84,7 +88,7 @@ * @param {number} d * @param {number} tx * @param {number} ty - * + * * @return {PIXI.Matrix} This matrix. Good for chaining method calls. */ Matrix.prototype.set = function (a, b, c, d, tx, ty) @@ -96,7 +100,7 @@ this.tx = tx; this.ty = ty; - return this + return this; }; @@ -104,6 +108,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not + * @param [out] {Array} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) @@ -283,12 +288,12 @@ * @param {number} rotation * @param {number} skewX * @param {number} skewY - * + * * @return {PIXI.Matrix} This matrix. Good for chaining method calls. */ Matrix.prototype.setTransform = function (x, y, pivotX, pivotY, scaleX, scaleY, rotation, skewX, skewY) { - var a, b, c, d, tx, ty, sr, cr; + var a, b, c, d, sr, cr, cy, sy, nsx, cx; sr = Math.sin(rotation); cr = Math.cos(rotation);