提交 e0f85269 编写于 作者: T Tristan VALCKE

Fix Euler accessors

上级 d4ee2921
......@@ -22,63 +22,83 @@ Euler.RotationOrders = [ 'XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX' ];
Euler.DefaultOrder = 'XYZ';
Object.assign( Euler.prototype, {
Object.defineProperties( Euler.prototype, {
constructor: Euler,
"x" : {
isEuler: true,
get: function () {
get x () {
return this._x;
return this._x;
},
},
set: function ( value ) {
set x ( value ) {
this._x = value;
this.onChangeCallback();
this._x = value;
this.onChangeCallback();
}
},
get y () {
"y" : {
return this._y;
get: function () {
},
return this._y;
set y ( value ) {
},
this._y = value;
this.onChangeCallback();
set: function ( value ) {
this._y = value;
this.onChangeCallback();
}
},
get z () {
"z" : {
return this._z;
get: function () {
},
return this._z;
set z ( value ) {
},
this._z = value;
this.onChangeCallback();
set: function ( value ) {
this._z = value;
this.onChangeCallback();
}
},
get order () {
"order" : {
return this._order;
get: function () {
},
return this._order;
set order ( value ) {
},
this._order = value;
this.onChangeCallback();
set: function ( value ) {
},
this._order = value;
this.onChangeCallback();
}
}
});
Object.assign( Euler.prototype, {
constructor: Euler,
isEuler: true,
set: function ( x, y, z, order ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册