提交 f8579eb0 编写于 作者: W Wandalen

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

上级 a53d5d20
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册