Skip to content

Commit

Permalink
Merge pull request #21134 from 1993heqiang/local_dev
Browse files Browse the repository at this point in the history
Docs: Modify the description of autoRotateSpeed.
  • Loading branch information
mrdoob committed Jan 25, 2021
2 parents a295496 + e5d85f6 commit b15bd85
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/examples/en/controls/OrbitControls.html
Expand Up @@ -87,7 +87,7 @@ <h3>[property:Boolean autoRotate]</h3>
<h3>[property:Float autoRotateSpeed]</h3>
<p>
How fast to rotate around the target if [page:.autoRotate] is true. Default is 2.0, which equates to 30 seconds
per rotation at 60fps.<br> Note that if [page:.autoRotate] is enabled, you must call [page:.update]
per orbit at 60fps.<br> Note that if [page:.autoRotate] is enabled, you must call [page:.update]
() in your animation loop.
</p>

Expand Down
19 changes: 8 additions & 11 deletions docs/examples/zh/controls/OrbitControls.html
Expand Up @@ -86,7 +86,7 @@ <h3>[property:Boolean autoRotate]</h3>

<h3>[property:Float autoRotateSpeed]</h3>
<p>
当[page:.autoRotate]为true时,围绕目标旋转的速度将有多快,默认值为2.0,相当于在60fps时每旋转一次需要30秒<br>
当[page:.autoRotate]为true时,围绕目标旋转的速度将有多快,默认值为2.0,相当于在60fps时每旋转一周需要30秒<br>
请注意,如果[page:.autoRotate]被启用,你必须在你的动画循环里调用[page:.update]()。
</p>

Expand All @@ -104,7 +104,7 @@ <h3>[property:HTMLDOMElement domElement]</h3>

<h3>[property:Boolean enabled]</h3>
<p>
When set to *false*, the controls will not respond to user input. Default is *true*.
当设置为false时,控制器将不会响应用户的操作。默认值为true。
</p>

<h3>[property:Boolean enableDamping]</h3>
Expand Down Expand Up @@ -151,7 +151,7 @@ <h3>[property:Object keys]</h3>

<h3>[property:Float maxAzimuthAngle]</h3>
<p>
How far you can orbit horizontally, upper limit. If set, the interval [ min, max ] must be a sub-interval of [ - 2 PI, 2 PI ], with ( max - min < 2 PI ). Default is Infinity.
你能够水平旋转的角度上限。如果设置,其有效值范围为[-2 * Math.PI,2 * Math.PI],且旋转角度的上限和下限差值小于2 * Math.PI。默认值为无穷大。
</p>

<h3>[property:Float maxDistance]</h3>
Expand All @@ -171,7 +171,7 @@ <h3>[property:Float maxZoom]</h3>

<h3>[property:Float minAzimuthAngle]</h3>
<p>
How far you can orbit horizontally, lower limit. If set, the interval [ min, max ] must be a sub-interval of [ - 2 PI, 2 PI ], with ( max - min < 2 PI ). Default is Infinity.
你能够水平旋转的角度下限。如果设置,其有效值范围为[-2 * Math.PI,2 * Math.PI],且旋转角度的上限和下限差值小于2 * Math.PI。默认值为无穷大。
</p>

<h3>[property:Float minDistance]</h3>
Expand Down Expand Up @@ -225,10 +225,8 @@ <h3>[property:Float rotateSpeed]</h3>
<h3>[property:Boolean screenSpacePanning]</h3>
<p>
定义当平移的时候摄像机的位置将如何移动。如果为true,摄像机将在屏幕空间内平移。
否则,摄像机将在与摄像机向上方向垂直的平面中平移。
Defines how the camera's position is translated when panning. If true, the camera pans in screen space.
Otherwise, the camera pans in the plane orthogonal to the camera's up direction.
Default is true for OrbitControls; false for MapControls.
否则,摄像机将在与摄像机向上方向垂直的平面中平移。当使用 OrbitControls 时,
默认值为true;当使用 MapControls 时,默认值为false。
</p>

<h3>[property:Vector3 target0]</h3>
Expand All @@ -244,7 +242,7 @@ <h3>[property:Vector3 target]</h3>

<h3>[property:Object touches]</h3>
<p>
This object contains references to the touch actions used by the controls.
该对象包含由控件所使用的触摸操作的引用。
<code>
controls.touches = {
ONE: THREE.TOUCH.ROTATE,
Expand All @@ -261,7 +259,6 @@ <h3>[property:Float zoom0]</h3>
<h3>[property:Float zoomSpeed]</h3>
<p>
摄像机缩放的速度,其默认值为1。
Speed of zooming / dollying. Default is 1.
</p>


Expand All @@ -285,7 +282,7 @@ <h3>[method:radians getPolarAngle] ()</h3>

<h3>[method:void listenToKeyEvents] ( [param:HTMLDOMElement domElement] )</h3>
<p>
Adds key event listeners to the given DOM element. *window* is a recommended argument for using this method.
为指定的DOM元素添加按键监听。推荐将window作为指定的DOM元素。
</p>

<h3>[method:null reset] ()</h3>
Expand Down
2 changes: 1 addition & 1 deletion examples/js/controls/OrbitControls.js
Expand Up @@ -60,7 +60,7 @@ THREE.OrbitControls = function ( object, domElement ) {
// Set to true to automatically rotate around the target
// If auto-rotate is enabled, you must call controls.update() in your animation loop
this.autoRotate = false;
this.autoRotateSpeed = 2.0; // 30 seconds per round when fps is 60
this.autoRotateSpeed = 2.0; // 30 seconds per orbit when fps is 60

// The four arrow keys
this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 };
Expand Down

0 comments on commit b15bd85

Please sign in to comment.