1
0

Line2.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:Object3D] &rarr; [page:Mesh] &rarr; [page:LineSegments2] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. A polyline drawn between vertices.
  14. </p>
  15. <p class="desc">
  16. This adds functionality beyond [page:Line], like arbitrary line width and changing width to be in world units.
  17. It extends [page:LineSegments2], simplifying constructing segments from a chain of points.
  18. </p>
  19. <h2>Import</h2>
  20. <p>
  21. [name] is an add-on, and therefore must be imported explicitly.
  22. See [link:#manual/introduction/Installation Installation / Addons].
  23. </p>
  24. <code>
  25. import { Line2 } from 'three/addons/lines/Line2.js';
  26. </code>
  27. <h2>Examples</h2>
  28. <p>
  29. [example:webgl_lines_fat WebGL / lines / fat ]<br />
  30. [example:webgl_lines_fat_raycasting WebGL / lines / fat / raycasting ]<br />
  31. [example:webgpu_lines_fat WebGPU / lines / fat / raycasting ]
  32. </p>
  33. <h2>Constructor</h2>
  34. <h3>[name]( [param:LineGeometry geometry], [param:LineMaterial material] )</h3>
  35. <p>
  36. [page:LineGeometry geometry] — (optional) Pair(s) of vertices representing each line segment.<br />
  37. [page:Material material] — (optional) Material for the line. Default is a [page:LineMaterial] with random color.
  38. </p>
  39. <h2>Properties</h2>
  40. <p>See the base [page:LineSegments2] class for common properties.</p>
  41. <h3>[property:Boolean isLine2]</h3>
  42. <p>Read-only flag to check if a given object is of type [name].</p>
  43. <h2>Methods</h2>
  44. <p>See the base [page:LineSegments2] class for common methods.</p>
  45. <h2>Source</h2>
  46. <p>
  47. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/lines/Line2.js examples/jsm/lines/Line2.js]
  48. </p>
  49. </body>
  50. </html>