WireframeHelper.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Line] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">Creates a wireframe object that shows the edges of another object's geometry. To draw a wireframe image showing only "hard" edges (edges between non-coplanar faces), see [page:EdgesHelper].</div>
  14. <h2>Example</h2>
  15. <code>
  16. geometry = new THREE.BoxGeometry( 10, 10, 10, 2, 2, 2 );
  17. material = new THREE.MeshBasicMaterial( { color: 0xff0000 } );
  18. object = new THREE.Mesh( geometry, material );
  19. wireframe = new THREE.WireframeHelper( object, 0x00ff00 );
  20. scene.add( object );
  21. scene.add( wireframe );
  22. </code>
  23. [example:webgl_helpers Example using various helpers], [example:webgl_materials_wireframe Alternative approach using a shader.]
  24. <h2>Constructor</h2>
  25. <h3>[name]( [page:Object3D object], [page:Color color] )</h3>
  26. <div>
  27. object -- Object of which to draw edges <br />
  28. color -- Color of the edges.
  29. </div>
  30. <div>
  31. Creates a [page:Line], showing only the edges between vertices of an object.
  32. </div>
  33. <h2>Properties</h2>
  34. <div>none</div>
  35. <h2>Methods</h2>
  36. <div>none</div>
  37. <h2>Source</h2>
  38. <h2>Source</h2>
  39. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  40. </body>
  41. </html>