| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Gyroscope - 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="Object3D.html">Object3D</a> → </p>
- <h1 translate="no">Gyroscope</h1>
- <section>
- <header>
- <div class="class-description"><p>A special type of 3D object that takes a position from the scene graph hierarchy
- but uses its local rotation as world rotation. It works like real-world gyroscope -
- you can move it around using hierarchy while its orientation stays fixed with
- respect to the world.</p></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">Gyroscope</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 { Gyroscope } from 'three/addons/misc/Gyroscope.js';</code></pre>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="Gyroscope" translate="no">new <a href="#Gyroscope">Gyroscope</a><span class="signature">()</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new gyroscope.</p>
- </div>
- </div>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/misc/Gyroscope.js" translate="no" target="_blank" rel="noopener">examples/jsm/misc/Gyroscope.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|