SelectionHelper.html 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>SelectionHelper - 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. <h1 translate="no">SelectionHelper</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>A helper for <a href="SelectionBox.html">SelectionBox</a>.</p>
  16. <p>It visualizes the current selection box with a <code>div</code> container element.</p></div>
  17. </header>
  18. <article>
  19. <h2 class="subsection-title">Import</h2>
  20. <p><span translate="no">SelectionHelper</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  21. <pre><code class="language-js">import { SelectionHelper } from 'three/addons/interactive/SelectionHelper.js';</code></pre>
  22. <div class="container-overview">
  23. <h2>Constructor</h2>
  24. <h3 class="name name-method" id="SelectionHelper" translate="no">new <a href="#SelectionHelper">SelectionHelper</a><span class="signature">( renderer : <span class="param-type">WebGPURenderer | WebGLRenderer</span>, cssClassName : <span class="param-type">string</span> )</span> </h3>
  25. <div class="method">
  26. <div class="description">
  27. <p>Constructs a new selection helper.</p>
  28. </div>
  29. <table class="params">
  30. <tbody>
  31. <tr>
  32. <td class="name"><code>renderer</code></td>
  33. <td class="description last"><p>The renderer.</p></td>
  34. </tr>
  35. <tr>
  36. <td class="name"><code>cssClassName</code></td>
  37. <td class="description last"><p>The CSS class name of the <code>div</code>.</p></td>
  38. </tr>
  39. </tbody>
  40. </table>
  41. </div>
  42. </div>
  43. <h2 class="subsection-title">Properties</h2>
  44. <div class="member">
  45. <h3 class="name" id="element" translate="no">.<a href="#element">element</a><span class="type-signature"> : HTMLDivElement</span> </h3>
  46. <div class="description">
  47. <p>The visualization of the selection box.</p>
  48. </div>
  49. </div>
  50. <div class="member">
  51. <h3 class="name" id="enabled" translate="no">.<a href="#enabled">enabled</a><span class="type-signature"> : boolean</span> </h3>
  52. <div class="description">
  53. <p>Whether helper is enabled or not.<br/>Default is <code>true</code>.</p>
  54. </div>
  55. </div>
  56. <div class="member">
  57. <h3 class="name" id="isDown" translate="no">.<a href="#isDown">isDown</a><span class="type-signature"> : boolean</span> </h3>
  58. <div class="description">
  59. <p>Whether the mouse or pointer is pressed down.<br/>Default is <code>false</code>.</p>
  60. </div>
  61. </div>
  62. <div class="member">
  63. <h3 class="name" id="renderer" translate="no">.<a href="#renderer">renderer</a><span class="type-signature"> : <a href="WebGPURenderer.html">WebGPURenderer</a> | <a href="WebGLRenderer.html">WebGLRenderer</a></span> </h3>
  64. <div class="description">
  65. <p>A reference to the renderer.</p>
  66. </div>
  67. </div>
  68. <h2 class="subsection-title">Methods</h2>
  69. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  70. <div class="method">
  71. <div class="description">
  72. <p>Call this method if you no longer want use to the controls. It frees all internal
  73. resources and removes all event listeners.</p>
  74. </div>
  75. </div>
  76. <h2 class="subsection-title">Source</h2>
  77. <p>
  78. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/interactive/SelectionHelper.js" target="_blank" rel="noopener" translate="no">examples/jsm/interactive/SelectionHelper.js</a>
  79. </p>
  80. </article>
  81. </section>
  82. <script src="../scripts/linenumber.js"></script>
  83. <script src="../scripts/page.js"></script>
  84. </body>
  85. </html>
粤ICP备19079148号