提交 6c513a06 编写于 作者: T Tristan VALCKE

Fix Quaternion accessors

上级 e0f85269
......@@ -89,61 +89,81 @@ Object.assign( Quaternion, {
} );
Object.assign( Quaternion.prototype, {
Object.defineProperties( Quaternion.prototype, {
constructor: Quaternion,
"x" : {
get x () {
get: function () {
return this._x;
return this._x;
},
},
set x ( value ) {
set: function ( 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 w () {
"w" : {
return this._w;
get: function () {
},
return this._w;
set w ( value ) {
},
this._w = value;
this.onChangeCallback();
set: function ( value ) {
},
this._w = value;
this.onChangeCallback();
}
}
});
Object.assign( Quaternion.prototype, {
constructor: Quaternion,
set: function ( x, y, z, w ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册