Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/examples/en/controls/OrbitControls.html
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ <h3>[method:radians getPolarAngle] ()</h3>
Get the current vertical rotation, in radians.
</p>

<h3>[method:radians getDistance] ()</h3>
<p>
Get the current dolly distance ( [page:PerspectiveCamera] only ).
</p>

<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.
Expand Down
5 changes: 5 additions & 0 deletions docs/examples/ko/controls/OrbitControls.html
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ <h3>[method:radians getPolarAngle] ()</h3>
라디안 단위로 현재 수직 회전값을 가져옵니다.
</p>

<h3>[method:radians getDistance] ()</h3>
<p>
Get the current dolly distance ( [page:PerspectiveCamera] only ).
</p>

<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.
Expand Down
5 changes: 5 additions & 0 deletions docs/examples/zh/controls/OrbitControls.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@ <h3>[method:radians getPolarAngle] ()</h3>
获得当前的垂直旋转,单位为弧度。
</p>

<h3>[method:radians getDistance] ()</h3>
<p>
Get the current dolly distance ( [page:PerspectiveCamera] only ).
</p>

<h3>[method:void listenToKeyEvents] ( [param:HTMLDOMElement domElement] )</h3>
<p>
为指定的DOM元素添加按键监听。推荐将window作为指定的DOM元素。
Expand Down
6 changes: 6 additions & 0 deletions examples/jsm/controls/OrbitControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ class OrbitControls extends EventDispatcher {

};

this.getDistance = function () {

return spherical.radius;

};

this.listenToKeyEvents = function ( domElement ) {

domElement.addEventListener( 'keydown', onKeyDown );
Expand Down