Import
LineGeometry is an addon, and must be imported explicitly, see Installation#Addons.
import { LineLineGeometry2 } from 'three/addons/lines/LineGeometry.js';
Properties
.isLineGeometry : boolean (readonly)
This flag can be used for type testing.
Default is true.
Methods
.fromLine( line : Line ) : LineGeometry
Setups this line segments geometry from the given line.
| line |
The line that should be used as a data source for this geometry. |
- Returns: A reference to this geometry.
.setColors( array : Float32Array | Array.<number> ) : LineGeometry
Sets the given line colors for this geometry.
| array |
The position data to set. |
- Overrides: LineSegmentsGeometry#setColors
- Returns: A reference to this geometry.
.setFromPoints( points : Array.<(Vector3|Vector2)> ) : LineGeometry
Setups this line segments geometry from the given sequence of points.
| points |
An array of points in 2D or 3D space. |
- Returns: A reference to this geometry.
.setPositions( array : Float32Array | Array.<number> ) : LineGeometry
Sets the given line positions for this geometry.
| array |
The position data to set. |
- Overrides: LineSegmentsGeometry#setPositions
- Returns: A reference to this geometry.