Skip to content

Commit

Permalink
FlyControls: Derive from Controls. (#29095)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 authored Aug 9, 2024
1 parent 7b69002 commit 184f214
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 221 deletions.
3 changes: 1 addition & 2 deletions docs/examples/en/controls/Controls.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,11 @@ <h3>[method:undefined dispose] ()</h3>
Call this method if you no longer want use to the controls. It frees all internal resources and removes all event listeners.
</p>

<h3>[method:undefined update] ()</h3>
<h3>[method:undefined update] ( [param:Number delta] )</h3>
<p>
Controls should implement this method if they have to update their internal state per simulation step.
</p>


<h2>Source</h2>

<p>
Expand Down
36 changes: 5 additions & 31 deletions docs/examples/en/controls/FlyControls.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
[page:Controls] &rarr;

<h1>[name]</h1>

Expand Down Expand Up @@ -54,35 +55,21 @@ <h3>change</h3>

<h2>Properties</h2>

<p>See the base [page:Controls] class for common properties.</p>

<h3>[property:Boolean autoForward]</h3>
<p>
If set to `true`, the camera automatically moves forward (and does not stop) when initially translated. Default is `false`.
</p>

<h3>[property:HTMLDOMElement domElement]</h3>
<p>
The HTMLDOMElement used to listen for mouse / touch events. This must be passed in the constructor; changing it here will
not set up new event listeners.
</p>

<h3>[property:Boolean dragToLook]</h3>
<p>
If set to `true`, you can only look around by performing a drag interaction. Default is `false`.
</p>

<h3>[property:Boolean enabled]</h3>
<p>
When set to `false`, the controls will not respond to user input. Default is `true`.
</p>

<h3>[property:Number movementSpeed]</h3>
<p>
The movement speed. Default is *1*.
</p>

<h3>[property:Camera object]</h3>
<p>
The camera to be controlled.
The movement speed. Default is `1`.
</p>

<h3>[property:Number rollSpeed]</h3>
Expand All @@ -92,20 +79,7 @@ <h3>[property:Number rollSpeed]</h3>

<h2>Methods</h2>

<h3>[method:undefined dispose] ()</h3>
<p>
Should be called if the controls is no longer required.
</p>

<h3>[method:undefined update] ( [param:Number delta] )</h3>
<p>
<p>
[page:Number delta]: Time delta value.
</p>
<p>
Updates the controls. Usually called in the animation loop.
</p>
</p>
<p>See the base [page:Controls] class for common methods.</p>

<h2>Source</h2>

Expand Down
Loading

0 comments on commit 184f214

Please sign in to comment.