diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index e8e74a7..12e0a82 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -80,14 +80,14 @@ * @param transpose {boolean} Whether we need to transpose the matrix or not * @return {number[]} the newly created array which contains the matrix */ -Matrix.prototype.toArray = function (transpose) +Matrix.prototype.toArray = function (transpose, out) { if (!this.array) { this.array = new Float32Array(9); } - var array = this.array; + var array = out || this.array; if (transpose) {