1
0

Box3Helper.html 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Box3Helper - 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="Line.html">Line</a> → <a href="LineSegments.html">LineSegments</a> → </p>
  13. <h1 translate="no">Box3Helper</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A helper object to visualize an instance of <a href="Box3.html">Box3</a>.</p></div>
  17. <h2>Code Example</h2>
  18. <div translate="no"><pre><code class="language-js">const box = new THREE.Box3();
  19. box.setFromCenterAndSize( new THREE.Vector3( 1, 1, 1 ), new THREE.Vector3( 2, 1, 3 ) );
  20. const helper = new THREE.Box3Helper( box, 0xffff00 );
  21. scene.add( helper )
  22. </code></pre></div>
  23. </header>
  24. <article>
  25. <div class="container-overview">
  26. <h2>Constructor</h2>
  27. <h3 class="name name-method" id="Box3Helper" translate="no">new <a href="#Box3Helper">Box3Helper</a><span class="signature">( box : <span class="param-type"><a href="Box3.html">Box3</a></span>, color : <span class="param-type">number | <a href="Color.html">Color</a> | string</span> )</span> </h3>
  28. <div class="method">
  29. <div class="description">
  30. <p>Constructs a new box3 helper.</p>
  31. </div>
  32. <table class="params">
  33. <tbody>
  34. <tr>
  35. <td class="name">
  36. <strong>box</strong>
  37. </td>
  38. <td class="description last">
  39. <p>The box to visualize.</p>
  40. </td>
  41. </tr>
  42. <tr>
  43. <td class="name">
  44. <strong>color</strong>
  45. </td>
  46. <td class="description last">
  47. <p>The box's color.</p>
  48. <p>Default is <code>0xffff00</code>.</p>
  49. </td>
  50. </tr>
  51. </tbody>
  52. </table>
  53. </div>
  54. </div>
  55. <h2 class="subsection-title">Properties</h2>
  56. <div class="member">
  57. <h3 class="name" id="box" translate="no">.<a href="#box">box</a><span class="type-signature"> : <a href="Box3.html">Box3</a></span> </h3>
  58. <div class="description">
  59. <p>The box being visualized.</p>
  60. </div>
  61. </div>
  62. <h2 class="subsection-title">Methods</h2>
  63. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  64. <div class="method">
  65. <div class="description">
  66. <p>Frees the GPU-related resources allocated by this instance. Call this
  67. method whenever this instance is no longer used in your app.</p>
  68. </div>
  69. </div>
  70. <h2 class="subsection-title">Source</h2>
  71. <p>
  72. <a href="https://github.com/mrdoob/three.js/blob/master/src/helpers/Box3Helper.js" translate="no" target="_blank" rel="noopener">src/helpers/Box3Helper.js</a>
  73. </p>
  74. </article>
  75. </section>
  76. <script src="../scripts/linenumber.js"></script>
  77. <script src="../scripts/page.js"></script>
  78. </body>
  79. </html>
粤ICP备19079148号