Browse Source

Color/Euler: fix 'toArray' broken expected behavior #2

Wandalen 10 years ago
parent
commit
f8579eb078
2 changed files with 4 additions and 4 deletions
  1. 1 1
      src/math/Color.js
  2. 3 3
      src/math/Euler.js

+ 1 - 1
src/math/Color.js

@@ -377,7 +377,7 @@ THREE.Color.prototype = {
 		if ( array === undefined ) array = [];
 		if ( offset === undefined ) offset = 0;
 
-		array[ offset + 0 ] = this.r;
+		array[ offset ] = this.r;
 		array[ offset + 1 ] = this.g;
 		array[ offset + 2 ] = this.b;
 

+ 3 - 3
src/math/Euler.js

@@ -280,16 +280,16 @@ THREE.Euler.prototype = {
 
 	},
 
-	toArray: function( array, offset, withoutOrder ) {
+	toArray: function ( array, offset, withoutOrder ) {
 
 		if ( array === undefined ) array = [];
 		if ( offset === undefined ) offset = 0;
 
-		array[ offset + 0 ] = this._x;
+		array[ offset ] = this._x;
 		array[ offset + 1 ] = this._y;
 		array[ offset + 2 ] = this._z;
 
-		if( !withoutOrder ) {
+		if( withoutOrder === true ) {
 			array[ offset + 3 ] = this._order;
 		}