WireframeGeometry.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>WireframeGeometry - 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">WireframeGeometry</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Can be used as a helper object to visualize a geometry as a wireframe.</p>
  17. <p>Note: It is not yet possible to serialize/deserialize instances of this class.</p></div>
  18. <h2>Code Example</h2>
  19. <div translate="no"><pre><code class="language-js">const geometry = new THREE.SphereGeometry();
  20. const wireframe = new THREE.WireframeGeometry( geometry );
  21. const line = new THREE.LineSegments( wireframe );
  22. line.material.depthWrite = false;
  23. line.material.opacity = 0.25;
  24. line.material.transparent = true;
  25. scene.add( line );
  26. </code></pre></div>
  27. </header>
  28. <article>
  29. <div class="container-overview">
  30. <h2>Constructor</h2>
  31. <h3 class="name name-method" id="WireframeGeometry" translate="no">new <a href="#WireframeGeometry">WireframeGeometry</a><span class="signature">( geometry : <span class="param-type"><a href="BufferGeometry.html">BufferGeometry</a></span> )</span> </h3>
  32. <div class="method">
  33. <div class="description">
  34. <p>Constructs a new wireframe geometry.</p>
  35. </div>
  36. <table class="params">
  37. <tbody>
  38. <tr>
  39. <td class="name">
  40. <strong>geometry</strong>
  41. </td>
  42. <td class="description last">
  43. <p>The geometry.</p>
  44. <p>Default is <code>null</code>.</p>
  45. </td>
  46. </tr>
  47. </tbody>
  48. </table>
  49. </div>
  50. </div>
  51. <h2 class="subsection-title">Properties</h2>
  52. <div class="member">
  53. <h3 class="name" id="parameters" translate="no">.<a href="#parameters">parameters</a><span class="type-signature"> : Object</span> </h3>
  54. <div class="description">
  55. <p>Holds the constructor parameters that have been
  56. used to generate the geometry. Any modification
  57. after instantiation does not change the geometry.</p>
  58. </div>
  59. </div>
  60. <h2 class="subsection-title">Source</h2>
  61. <p>
  62. <a href="https://github.com/mrdoob/three.js/blob/master/src/geometries/WireframeGeometry.js" translate="no" target="_blank" rel="noopener">src/geometries/WireframeGeometry.js</a>
  63. </p>
  64. </article>
  65. </section>
  66. <script src="../scripts/linenumber.js"></script>
  67. <script src="../scripts/page.js"></script>
  68. </body>
  69. </html>
粤ICP备19079148号