Browse Source

Merge branch 'dev' of https://github.com/martinwicke/three.js into dev

Mr.doob 11 years ago
parent
commit
4f48e72676
1 changed files with 21 additions and 1 deletions
  1. 21 1
      src/math/Matrix3.js

+ 21 - 1
src/math/Matrix3.js

@@ -148,7 +148,7 @@ THREE.Matrix3.prototype = {
 
 
 			if ( throwOnInvertible || false ) {
 			if ( throwOnInvertible || false ) {
 
 
-				throw new Error( msg ); 
+				throw new Error( msg );
 
 
 			} else {
 			} else {
 
 
@@ -208,6 +208,26 @@ THREE.Matrix3.prototype = {
 
 
 	},
 	},
 
 
+	fromArray: function ( array ) {
+
+		this.elements.set( array );
+
+		return this;
+
+	},
+
+	toArray: function () {
+
+		var te = this.elements;
+
+		return [
+			te[ 0 ], te[ 1 ], te[ 2 ],
+			te[ 3 ], te[ 4 ], te[ 5 ],
+			te[ 6 ], te[ 7 ], te[ 8 ]
+		];
+
+	},
+
 	clone: function () {
 	clone: function () {
 
 
 		var te = this.elements;
 		var te = this.elements;