Visualizing several disconnected line segments

Hello! I would like to visualize the following tree schematic:

  A
  |
  B
 _|_
|   |
C   D

I thought of representing the objects (A, B, C and D) as sphere meshes and the connections between them though fat lines.

I have a question about how to populate the LineGeometry object from the coordinates of the points A, B, C and D. As I understand that by stating:

const geometry = new LineGeometry();
geometry.setPositions(points);
const material = new LineMaterial({color: 0xffffff, linewidth: 5});
material.resolution.set(window.innerWidth, window.innerHeight);
const lines = new Line2(geometry, material);
scene.add(lines);

the geometry is created from a list of consecutive points. If I were to provide the coordinates of A, B, C and D in points object, then C would end up being connected to D, which is not desirable. Does anyone have a suggestion on how the geometry can be differently generated from a list of point coordinates, to allow visualizing such tree representations? Thanks very much in advance.

Figured out the easy solution which would be to simply repeat the branching point (B) coordinates (i.e. points = [A, B, B, C, B, D]) and to use LineSegments2 class:

const geometry = new LineSegmentsGeometry();
geometry.setPositions(points2);

const material = new LineMaterial({color: 0xffffff, linewidth: 5});
material.resolution.set(window.innerWidth, window.innerHeight);

const lineSegments = new LineSegments2(geometry, material);
scene.add(lineSegments);

If someone knows how to avoid repeating the branching point coordinates while building the geometry, please reply!