BoxLineGeometry.html 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>BoxLineGeometry - 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="BufferGeometry.html">BufferGeometry</a> → </p>
  13. <h1 translate="no">BoxLineGeometry</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A special type of box geometry intended for <a href="LineSegments.html">LineSegments</a>.</p></div>
  17. <h2>Code Example</h2>
  18. <div translate="no"><pre><code class="language-js">const geometry = new THREE.BoxLineGeometry();
  19. const material = new THREE.LineBasicMaterial( { color: 0x00ff00 } );
  20. const lines = new THREE.LineSegments( geometry, material );
  21. scene.add( lines );
  22. </code></pre></div>
  23. </header>
  24. <article>
  25. <h2 class="subsection-title">Import</h2>
  26. <p><span translate="no">BoxLineGeometry</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  27. <pre><code class="language-js">import { BoxLineGeometry } from 'three/addons/geometries/BoxLineGeometry.js';</code></pre>
  28. <div class="container-overview">
  29. <h2>Constructor</h2>
  30. <h3 class="name name-method" id="BoxLineGeometry" translate="no">new <a href="#BoxLineGeometry">BoxLineGeometry</a><span class="signature">( width : <span class="param-type">number</span>, height : <span class="param-type">number</span>, depth : <span class="param-type">number</span>, widthSegments : <span class="param-type">number</span>, heightSegments : <span class="param-type">number</span>, depthSegments : <span class="param-type">number</span> )</span> </h3>
  31. <div class="method">
  32. <div class="description">
  33. <p>Constructs a new box line geometry.</p>
  34. </div>
  35. <table class="params">
  36. <tbody>
  37. <tr>
  38. <td class="name"><code>width</code></td>
  39. <td class="description last"><p>The width. That is, the length of the edges parallel to the X axis.<br/>Default is <code>1</code>.</p></td>
  40. </tr>
  41. <tr>
  42. <td class="name"><code>height</code></td>
  43. <td class="description last"><p>The height. That is, the length of the edges parallel to the Y axis.<br/>Default is <code>1</code>.</p></td>
  44. </tr>
  45. <tr>
  46. <td class="name"><code>depth</code></td>
  47. <td class="description last"><p>The depth. That is, the length of the edges parallel to the Z axis.<br/>Default is <code>1</code>.</p></td>
  48. </tr>
  49. <tr>
  50. <td class="name"><code>widthSegments</code></td>
  51. <td class="description last"><p>Number of segmented rectangular sections along the width of the sides.<br/>Default is <code>1</code>.</p></td>
  52. </tr>
  53. <tr>
  54. <td class="name"><code>heightSegments</code></td>
  55. <td class="description last"><p>Number of segmented rectangular sections along the height of the sides.<br/>Default is <code>1</code>.</p></td>
  56. </tr>
  57. <tr>
  58. <td class="name"><code>depthSegments</code></td>
  59. <td class="description last"><p>Number of segmented rectangular sections along the depth of the sides.<br/>Default is <code>1</code>.</p></td>
  60. </tr>
  61. </tbody>
  62. </table>
  63. </div>
  64. </div>
  65. <h2 class="subsection-title">Source</h2>
  66. <p>
  67. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/BoxLineGeometry.js" target="_blank" rel="noopener" translate="no">examples/jsm/geometries/BoxLineGeometry.js</a>
  68. </p>
  69. </article>
  70. </section>
  71. <script src="../scripts/linenumber.js"></script>
  72. <script src="../scripts/page.js"></script>
  73. </body>
  74. </html>
粤ICP备19079148号