diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 0b77477..3679860 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -13,45 +13,50 @@ export default class Matrix { /** - * + * @param {number} [a=1] - x scale + * @param {number} [b=0] - y skew + * @param {number} [c=0] - x skew + * @param {number} [d=1] - y scale + * @param {number} [tx=0] - x translation + * @param {number} [ty=0] - y translation */ - constructor() + constructor(a = 1, b = 0, c = 0, d = 1, tx = 0, ty = 0) { /** * @member {number} * @default 1 */ - this.a = 1; + this.a = a; /** * @member {number} * @default 0 */ - this.b = 0; + this.b = b; /** * @member {number} * @default 0 */ - this.c = 0; + this.c = c; /** * @member {number} * @default 1 */ - this.d = 1; + this.d = d; /** * @member {number} * @default 0 */ - this.tx = 0; + this.tx = tx; /** * @member {number} * @default 0 */ - this.ty = 0; + this.ty = ty; this.array = null; }