From f8579eb07893b5f9fdf5f4bb2610f5575dea215e Mon Sep 17 00:00:00 2001 From: Wandalen Date: Wed, 28 Jan 2015 23:21:59 +0200 Subject: [PATCH] Color/Euler: fix 'toArray' broken expected behavior #2 --- src/math/Color.js | 2 +- src/math/Euler.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/math/Color.js b/src/math/Color.js index b7e3afba3e..3cc3cf5780 100644 --- a/src/math/Color.js +++ b/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; diff --git a/src/math/Euler.js b/src/math/Euler.js index 8d44cba79b..ec46f976d6 100644 --- a/src/math/Euler.js +++ b/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; } -- GitLab