A series of lines drawn between pairs of vertices.
This adds functionality beyond [page:LineSegments], like arbitrary line width and changing width to be in world units. The [page:Line2] extends this object, forming a polyline instead of individual segments.
[name] is an add-on, and therefore must be imported explicitly. See [link:#manual/introduction/Installation Installation / Addons].
import { LineSegments2 } from 'three/addons/lines/LineSegments2.js';
[example:webgl_lines_fat_raycasting WebGL / lines / fat / raycasting ]
[page:LineSegmentsGeometry geometry] — (optional) Pair(s) of vertices representing each line segment.
[page:Material material] — (optional) Material for the line. Default is a [page:LineMaterial] with random color.
See the base [page:Mesh] class for common properties.
Read-only flag to check if a given object is of type [name].
See the base [page:Mesh] class for common methods.
Called by the framework to update the material's resolution property, needed for screen-scaled widths.
If your object is not visible to a camera (e.g. by [page:Object3D.layers layers] or [page:Object3D.visible visible],) you must call this manually whenever the viewport changes.
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/lines/LineSegments2.js examples/jsm/lines/LineSegments2.js]