File: LineSegmentsGeometry.md | Updated: 11/15/2025
A series of vertex pairs, forming line segments.
This is used in LineSegments2 to describe the shape.
LineSegmentsGeometry is an addon, and must be imported explicitly, see Installation#Addons.
import { LineSegmentsGeometry } from 'three/addons/lines/LineSegmentsGeometry.js';
Constructs a new line segments geometry.
This flag can be used for type testing.
Default is true.
Applies the given 4x4 transformation matrix to the geometry.
matrix | The matrix to apply.
---|---
Returns: A reference to this instance.
Setups this line segments geometry from the given edges geometry.
geometry | The geometry that should be used as a data source for this geometry.
---|---
Returns: A reference to this geometry.
Setups this line segments geometry from the given line segments.
lineSegments | The line segments that should be used as a data source for this geometry. Assumes the source geometry is not using indices.
---|---
Returns: A reference to this geometry.
Setups this line segments geometry from the given mesh.
mesh | The mesh geometry that should be used as a data source for this geometry.
---|---
Returns: A reference to this geometry.
Setups this line segments geometry from the given wireframe geometry.
geometry | The geometry that should be used as a data source for this geometry.
---|---
Returns: A reference to this geometry.
Sets the given line colors for this geometry. The length must be a multiple of six since each line segment is defined by a start end color in the pattern (rgb rgb).
array | The position data to set.
---|---
Returns: A reference to this geometry.
Sets the given line positions for this geometry. The length must be a multiple of six since each line segment is defined by a start end vertex in the pattern (xyz xyz).
array | The position data to set.
---|---
Returns: A reference to this geometry.