38 lines
730 B
JavaScript
38 lines
730 B
JavaScript
|
import { Line } from './Line.js';
|
||
|
|
||
|
/**
|
||
|
* A continuous line. This is nearly the same as {@link Line} the only difference
|
||
|
* is that the last vertex is connected with the first vertex in order to close
|
||
|
* the line to form a loop.
|
||
|
*
|
||
|
* @augments Line
|
||
|
*/
|
||
|
class LineLoop extends Line {
|
||
|
|
||
|
/**
|
||
|
* Constructs a new line loop.
|
||
|
*
|
||
|
* @param {BufferGeometry} [geometry] - The line geometry.
|
||
|
* @param {Material|Array<Material>} [material] - The line material.
|
||
|
*/
|
||
|
constructor( geometry, material ) {
|
||
|
|
||
|
super( geometry, material );
|
||
|
|
||
|
/**
|
||
|
* This flag can be used for type testing.
|
||
|
*
|
||
|
* @type {boolean}
|
||
|
* @readonly
|
||
|
* @default true
|
||
|
*/
|
||
|
this.isLineLoop = true;
|
||
|
|
||
|
this.type = 'LineLoop';
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
export { LineLoop };
|