Selectively show/hide portions of lines in BufferGeometry line example

Referring to this official example:

Suppose I had like 50,000 such lines in logical sets of around 10. Most of the time I would like to show all of them, but sometimes I’d like to show one set of 10 and hide the other 49,990, and then go back to showing all, etc.

Is there a way to do this?

Any help appreciated!

Hi!
Have a look at this method of buffer geometry: https://threejs.org/docs/index.html#api/en/core/BufferGeometry.setDrawRange

This requires the sets to be contiguous in the array, right? That can’t be done, in this case, if so