Capítulo 568 de 859
A polyline drawn between vertices.
This adds functionality beyond Line, like arbitrary line width and changing width to be in world units.It extends LineSegments2, simplifying constructing segments from a chain of points.
This module can only be used with WebGLRenderer. When using WebGPURenderer, import the class from lines/webgpu/Line2.js.
const geometry = new LineGeometry();
geometry.setPositions( positions );
geometry.setColors( colors );
const material = new LineMaterial( { linewidth: 5, vertexColors: true } };
const line = new Line2( geometry, material );
scene.add( line );
Constructor
| Signature |
|---|
new Line2( geometry : LineGeometry, material : LineMaterial ) |
Properties
| Property | Description |
|---|---|
.isLine2 : boolean (readonly) | This flag can be used for type testing. |