Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(
geometry?: THREE.BufferGeometry,
material?: HighPrecisionLineMaterial,
positions?: number[] | THREE.Vector3[],
color?: THREE.Color,
opacity?: number
) {
super(geometry === undefined ? new THREE.BufferGeometry() : geometry, material);
if (material === undefined) {
material = new HighPrecisionLineMaterial({
color: color ? color : HighPrecisionLineMaterial.DEFAULT_COLOR,
opacity: opacity !== undefined ? opacity : HighPrecisionLineMaterial.DEFAULT_OPACITY
});
}
this.matrixWorldInverse = new THREE.Matrix4();
if (positions) {
this.setPositions(positions);
}
}