| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>FlyControls - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Controls.html">Controls</a> → </p>
- <h1 translate="no">FlyControls</h1>
- <section>
- <header>
- <div class="class-description"><p>This class enables a navigation similar to fly modes in DCC tools like Blender.
- You can arbitrarily transform the camera in 3D space without any limitations
- (e.g. focus on a specific target).</p></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">FlyControls</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
- <pre><code class="language-js">import { FlyControls } from 'three/addons/controls/FlyControls.js';</code></pre>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="FlyControls" translate="no">new <a href="#FlyControls">FlyControls</a><span class="signature">( object : <span class="param-type"><a href="Object3D.html">Object3D</a></span>, domElement : <span class="param-type">HTMLElement</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new controls instance.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>object</strong>
- </td>
- <td class="description last">
- <p>The object that is managed by the controls.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>domElement</strong>
- </td>
- <td class="description last">
- <p>The HTML element used for event listeners.</p>
- <p>Default is <code>null</code>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="autoForward" translate="no">.<a href="#autoForward">autoForward</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>If set to <code>true</code>, the camera automatically moves forward (and does not stop) when initially translated.</p>
- <p>Default is <code>false</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="dragToLook" translate="no">.<a href="#dragToLook">dragToLook</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>If set to <code>true</code>, you can only look around by performing a drag interaction.</p>
- <p>Default is <code>false</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="movementSpeed" translate="no">.<a href="#movementSpeed">movementSpeed</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>The movement speed.</p>
- <p>Default is <code>1</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="rollSpeed" translate="no">.<a href="#rollSpeed">rollSpeed</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>The rotation speed.</p>
- <p>Default is <code>0.005</code>.</p>
- </div>
- </div>
- <h2 class="subsection-title">Events</h2>
- <h3 class="name name-method" id="event:change" translate="no">.<a href="#event:change">change</a> </h3>
- <div class="method">
- <div class="description">
- <p>Fires when the camera has been transformed by the controls.</p>
- </div>
- <h5>Type:</h5>
- <ul>
- <li>
- <span class="param-type">Object</span>
- </li>
- </ul>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/FlyControls.js" translate="no" target="_blank" rel="noopener">examples/jsm/controls/FlyControls.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|