Non-continuous LineGeometry?

All the examples I’ve come across for LineGeometry show a continuous line.
Is it possible to create a line geometry that acts more like gl.lines where two points denote the start/end, and can have multiple pairs of points in the linegeometry? I want to use LineGeometry so that I can have thick lines, but also want to use pairs of points so that I can create space between the pairs (not dashed), and have then start and end at different locations in the scene.

example of LineGeometry: Edit fiddle - JSFiddle - Code Playground

Hi!
Use line segments: Edit fiddle - JSFiddle - Code Playground

thanks, yes- I just discovered that too and I updated the example:
https://jsfiddle.net/u2v3dbh6/
:slight_smile:

edit: in-case anyone runs into this issue, if the length of positions is 0 and you use setPositions with an empty array, it will stop working (even if you set the lines with position data afterwards).

1 Like

Any alternatives to linesegmentgeometry? It is too buggy and is unusable.