You should be able to this with decent performance via gpu picking.
There was a post a while back (GPU picking demo) that demos this (pg) for an instanced mesh.
I’ve modified that pg a bit to use an async version of readPixels
here, which improves performance somewhat (dramatically for some mobile/laptop gpus). This works for webgl2 only though, using engine._readPixelsAsync
. It will however fallback to synchronous readPixels for webgl1.
You should be able to modify this method to work with the LineSystem - though picking may be a bit hard for 1px wide lines. In the past I’ve dealt with this by widening lines for picking (so pickable area is larger than visible line), but this won’t work for the LineSystem as it uses actual GL.Lines as opposed to triangles. The (fairly) new Greased Lines could be used, or tubes, if wider picking is needed.