未验证 提交 03cc77fd 编写于 作者: L linbingquan 提交者: GitHub

Euler: Default value for ES6. (#21961)

上级 5bd6f6d9
......@@ -69,12 +69,12 @@ class Euler {
}
set( x, y, z, order ) {
set( x, y, z, order = this._order ) {
this._x = x;
this._y = y;
this._z = z;
this._order = order || this._order;
this._order = order;
this._onChangeCallback();
......@@ -101,7 +101,7 @@ class Euler {
}
setFromRotationMatrix( m, order, update ) {
setFromRotationMatrix( m, order = this._order, update = true ) {
// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)
......@@ -110,8 +110,6 @@ class Euler {
const m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ];
const m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ];
order = order || this._order;
switch ( order ) {
case 'XYZ':
......@@ -230,7 +228,7 @@ class Euler {
this._order = order;
if ( update !== false ) this._onChangeCallback();
if ( update ) this._onChangeCallback();
return this;
......@@ -244,9 +242,9 @@ class Euler {
}
setFromVector3( v, order ) {
setFromVector3( v, order = this._order ) {
return this.set( v.x, v.y, v.z, order || this._order );
return this.set( v.x, v.y, v.z, order );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册