Line.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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:Object3D] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">A continuous line.</div>
  14. <h2>Example</h2>
  15. <code>var material = new THREE.LineBasicMaterial({
  16. color: 0x0000ff
  17. });
  18. var geometry = new THREE.Geometry();
  19. geometry.vertices.push(
  20. new THREE.Vector3( -10, 0, 0 ),
  21. new THREE.Vector3( 0, 10, 0 ),
  22. new THREE.Vector3( 10, 0, 0 )
  23. );
  24. var line = new THREE.Line( geometry, material );
  25. scene.add( line );
  26. </code>
  27. <h2>Constructor</h2>
  28. <h3>[name]( [page:Geometry geometry], [page:Material material] )</h3>
  29. <div>
  30. geometry — Vertices representing the line segment(s).<br />
  31. material — Material for the line. Default is [page:LineBasicMaterial LineBasicMaterial].<br />
  32. </div>
  33. <div>If no material is supplied, a randomized line material will be created and assigned to the object.</div>
  34. <h2>Properties</h2>
  35. <h3>[property:Geometry geometry]</h3>
  36. <div>
  37. Vertices representing the line segment(s).
  38. </div>
  39. <h3>[property:Material material]</h3>
  40. <div>
  41. Material for the line.
  42. </div>
  43. <h2>Methods</h2>
  44. <h3>[method:Array raycast]( [page:Raycaster raycaster], [page:Array intersects] )</h3>
  45. <div>
  46. Get intersections between a casted ray and this Line. [page:Raycaster.intersectObject] will call this method.
  47. </div>
  48. <h3>[method:Line clone]()</h3>
  49. <div>
  50. Returns a clone of this Line object and its descendants.
  51. </div>
  52. <h2>Source</h2>
  53. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  54. </body>
  55. </html>