diff --git a/docs/api/en/core/Object3D.html b/docs/api/en/core/Object3D.html index 89bbc2c74efcbd6c32ea175839375fe2f0e9d1f7..6536c58f44ffe37ac56e598f3e2ba9c98de6571c 100644 --- a/docs/api/en/core/Object3D.html +++ b/docs/api/en/core/Object3D.html @@ -347,6 +347,17 @@ Method Assumes no rotated parent.
+
+ point -- The point to rotate around.
+ axis -- A normalized vector in world space.
+ angle -- The angle in radians.
+
+ Rotate the object around an axis in world space. (The axis passes through point.) The axis is assumed to be normalized.
+
+ This method does not support objects having rotated parent(s).
+
rad - the angle to rotate in radians.
diff --git a/docs/api/ko/core/Object3D.html b/docs/api/ko/core/Object3D.html
index a4f95b683b9ffc00e325962a7af4ce47ae40a889..2438092403c6b2f02ee8a1dfed66fd7c7373796c 100644
--- a/docs/api/ko/core/Object3D.html
+++ b/docs/api/ko/core/Object3D.html
@@ -335,6 +335,17 @@
부모의 회전은 고려하지 않습니다.
+ point -- The point to rotate around.
+ axis -- A normalized vector in world space.
+ angle -- The angle in radians.
+
+ Rotate the object around an axis in world space. (The axis passes through point.) The axis is assumed to be normalized.
+
+ This method does not support objects having rotated parent(s).
+
rad - 회전시킬 라디안 각도입니다.
diff --git a/docs/api/zh/core/Object3D.html b/docs/api/zh/core/Object3D.html
index 4188ebbd9ef6f22b239ddd8509608d59bdde4f90..994ce3650b785783109abb4a13195e5469080508 100644
--- a/docs/api/zh/core/Object3D.html
+++ b/docs/api/zh/core/Object3D.html
@@ -321,6 +321,17 @@
方法假设该物体没有旋转过的父级。
+ point -- The point to rotate around.
+ axis -- A normalized vector in world space.
+ angle -- The angle in radians.
+
+ Rotate the object around an axis in world space. (The axis passes through point.) The axis is assumed to be normalized.
+
+ This method does not support objects having rotated parent(s).
+
rad - 将要旋转的角度(以弧度来表示)。
diff --git a/src/core/Object3D.js b/src/core/Object3D.js
index 3c9be51a036a18ad75c787687ce21a773b0c9f33..de8a6dd61ef2a9311bfde5b45e59e4d2dd2614f8 100644
--- a/src/core/Object3D.js
+++ b/src/core/Object3D.js
@@ -191,6 +191,20 @@ class Object3D extends EventDispatcher {
}
+ rotateAroundWorldAxis( point, axis, angle ) {
+
+ _q1.setFromAxisAngle( axis, angle );
+
+ this.applyQuaternion( _q1 );
+
+ this.position.sub( point );
+ this.position.applyQuaternion( _q1 );
+ this.position.add( point );
+
+ return this;
+
+ }
+
rotateX( angle ) {
return this.rotateOnAxis( _xAxis, angle );