| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>CSS3DSprite - 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> → <a href="CSS3DObject.html">CSS3DObject</a> → </p>
- <h1 translate="no">CSS3DSprite</h1>
- <section>
- <header>
- <div class="class-description"><p>A specialized version of <a href="CSS3DObject.html">CSS3DObject</a> that represents
- DOM elements as sprites.</p></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">CSS3DSprite</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 { CSS3DSprite } from 'three/addons/renderers/CSS3DRenderer.js';</code></pre>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="CSS3DSprite" translate="no">new <a href="#CSS3DSprite">CSS3DSprite</a><span class="signature">( element : <span class="param-type">HTMLElement</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new CSS3D sprite object.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>element</strong>
- </td>
- <td class="description last">
- <p>The DOM element.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="isCSS3DSprite" translate="no">.<a href="#isCSS3DSprite">isCSS3DSprite</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
- <div class="description">
- <p>This flag can be used for type testing.</p>
- <p>Default is <code>true</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="rotation2D" translate="no">.<a href="#rotation2D">rotation2D</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>The sprite's rotation in radians.</p>
- <p>Default is <code>0</code>.</p>
- </div>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/CSS3DRenderer.js" translate="no" target="_blank" rel="noopener">examples/jsm/renderers/CSS3DRenderer.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|