|
@@ -171,23 +171,23 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
|
|
}(),
|
|
}(),
|
|
|
|
|
|
rotateOnWorldAxis: function () {
|
|
rotateOnWorldAxis: function () {
|
|
-
|
|
|
|
|
|
+
|
|
// rotate object on axis in world space
|
|
// rotate object on axis in world space
|
|
// axis is assumed to be normalized
|
|
// axis is assumed to be normalized
|
|
// method assumes no rotated parent
|
|
// method assumes no rotated parent
|
|
|
|
|
|
var q1 = new Quaternion();
|
|
var q1 = new Quaternion();
|
|
-
|
|
|
|
|
|
+
|
|
return function rotateOnWorldAxis( axis, angle ) {
|
|
return function rotateOnWorldAxis( axis, angle ) {
|
|
-
|
|
|
|
|
|
+
|
|
q1.setFromAxisAngle( axis, angle );
|
|
q1.setFromAxisAngle( axis, angle );
|
|
-
|
|
|
|
|
|
+
|
|
this.quaternion.premultiply( q1 );
|
|
this.quaternion.premultiply( q1 );
|
|
-
|
|
|
|
|
|
+
|
|
return this;
|
|
return this;
|
|
-
|
|
|
|
|
|
+
|
|
};
|
|
};
|
|
-
|
|
|
|
|
|
+
|
|
}(),
|
|
}(),
|
|
|
|
|
|
rotateX: function () {
|
|
rotateX: function () {
|