Browse Source

Added flatten method to Matrix4 to be used in the WebGLRenderer.

Nicolas Garcia Belmonte 15 years ago
parent
commit
ab1d219eda
1 changed files with 9 additions and 0 deletions
  1. 9 0
      src/core/Matrix4.js

+ 9 - 0
src/core/Matrix4.js

@@ -196,6 +196,15 @@ THREE.Matrix4.prototype = {
 		return m;
 
 	},
+	
+	flatten: function() {
+
+	  return [this.n11, this.n21, this.n31, this.n41,
+	      this.n12, this.n22, this.n32, this.n42,
+	      this.n13, this.n23, this.n33, this.n43,
+	      this.n14, this.n24, this.n34, this.n44];
+	 
+	},
 
 	toString: function() {