Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Improve OrbitControls page. #26541

Merged
merged 3 commits into from
Aug 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/examples/en/controls/OrbitControls.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h2>Properties</h2>
<h3>[property:Boolean autoRotate]</h3>
<p>
Set to true to automatically rotate around the target.<br> Note that if this is enabled, you must call [page:.update]
() in your animation loop.
() in your animation loop. If you want the animation to be frame rate independent, apply a time delta value to [page:.update]().
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about something like this, instead...

If you want the auto-rotate speed to be independent of the frame rate (the refresh rate of the display), you must pass the time deltaTime, in seconds, to page.update().

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good to me! Do you mind updating the doc pages with your suggestion?

</p>

<h3>[property:Float autoRotateSpeed]</h3>
Expand Down Expand Up @@ -320,10 +320,11 @@ <h3>[method:undefined stopListenToKeyEvents] ()</h3>
Removes the key event listener previously defined with [page:.listenToKeyEvents]().
</p>

<h3>[method:Boolean update] ()</h3>
<h3>[method:Boolean update] ( [param:Number deltaTime] )</h3>
<p>
Update the controls. Must be called after any manual changes to the camera's transform,
or in the update loop if [page:.autoRotate] or [page:.enableDamping] are set.
or in the update loop if [page:.autoRotate] or [page:.enableDamping] are set. `deltaTime` is optional
and only required if you want [page:.autoRotate] to be frame rate independent.
</p>

<h2>Source</h2>
Expand Down
5 changes: 3 additions & 2 deletions docs/examples/ko/controls/OrbitControls.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h2>특성</h2>
<h3>[property:Boolean autoRotate]</h3>
<p>
대상 주위를 자동으로 회전하려면 true로 설정합니다.<br> autoRotate를 활성할 경우, 애니메이션 루프에서 [page:.update()]를 호출해야 합니다.

If you want the animation to be frame rate independent, apply a time delta value to [page:.update]().
</p>

<h3>[property:Float autoRotateSpeed]</h3>
Expand Down Expand Up @@ -317,9 +317,10 @@ <h3>[method:undefined stopListenToKeyEvents] ()</h3>
Removes the key event listener previously defined with [page:.listenToKeyEvents]().
</p>

<h3>[method:Boolean update] ()</h3>
<h3>[method:Boolean update] ( [param:Number deltaTime] )</h3>
<p>
컨트롤을 업데이트합니다. 카메라를 수동으로 변환하거나, [page:.autoRotate] 또는 [page:.enableDamping]을 설정할 경우 업데이트 루프에서 호출해야 합니다.
`deltaTime` is optional and only required if you want [page:.autoRotate] to be frame rate independent.
</p>

<h2>Source</h2>
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/zh/controls/OrbitControls.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ <h3>[property:Boolean autoRotate]</h3>
<p>
将其设为true,以自动围绕目标旋转。<br>
请注意,如果它被启用,你必须在你的动画循环里调用[page:.update]()。
If you want the animation to be frame rate independent, apply a time delta value to [page:.update]().
</p>

<h3>[property:Float autoRotateSpeed]</h3>
Expand Down Expand Up @@ -319,10 +320,11 @@ <h3>[method:undefined stopListenToKeyEvents] ()</h3>
Removes the key event listener previously defined with [page:.listenToKeyEvents]().
</p>

<h3>[method:Boolean update] ()</h3>
<h3>[method:Boolean update] ( [param:Number deltaTime] )</h3>
<p>
更新控制器。必须在摄像机的变换发生任何手动改变后调用,
或如果[page:.autoRotate]或[page:.enableDamping]被设置时,在update循环里调用。
`deltaTime` is optional and only required if you want [page:.autoRotate] to be frame rate independent.
</p>

<h2>源代码</h2>
Expand Down
Binary file modified examples/screenshots/webgl2_volume_instancing.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions test/e2e/puppeteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const exceptionList = [
'webgl_shadowmap_progressive',
'webgl_test_memory2',
'webgl_tiled_forward',
'webgl2_volume_instancing',

// TODO: implement determinism for setTimeout and setInterval
// could it fix some examples from above?
Expand Down