CSS3DSprite.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CSS3DSprite - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Object3D.html">Object3D</a> → <a href="CSS3DObject.html">CSS3DObject</a> → </p>
  13. <h1 translate="no">CSS3DSprite</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A specialized version of <a href="CSS3DObject.html">CSS3DObject</a> that represents
  17. DOM elements as sprites.</p></div>
  18. </header>
  19. <article>
  20. <h2 class="subsection-title">Import</h2>
  21. <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>
  22. <pre><code class="language-js">import { CSS3DSprite } from 'three/addons/renderers/CSS3DRenderer.js';</code></pre>
  23. <div class="container-overview">
  24. <h2>Constructor</h2>
  25. <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>
  26. <div class="method">
  27. <div class="description">
  28. <p>Constructs a new CSS3D sprite object.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name">
  34. <strong>element</strong>
  35. </td>
  36. <td class="description last">
  37. <p>The DOM element.</p>
  38. </td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. </div>
  43. </div>
  44. <h2 class="subsection-title">Properties</h2>
  45. <div class="member">
  46. <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>
  47. <div class="description">
  48. <p>This flag can be used for type testing.</p>
  49. <p>Default is <code>true</code>.</p>
  50. </div>
  51. </div>
  52. <div class="member">
  53. <h3 class="name" id="rotation2D" translate="no">.<a href="#rotation2D">rotation2D</a><span class="type-signature"> : number</span> </h3>
  54. <div class="description">
  55. <p>The sprite's rotation in radians.</p>
  56. <p>Default is <code>0</code>.</p>
  57. </div>
  58. </div>
  59. <h2 class="subsection-title">Source</h2>
  60. <p>
  61. <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>
  62. </p>
  63. </article>
  64. </section>
  65. <script src="../scripts/linenumber.js"></script>
  66. <script src="../scripts/page.js"></script>
  67. </body>
  68. </html>
粤ICP备19079148号