I’m trying to solve the problem using a line with width (Line2 currently) and I need to update the line, like driving a car passing several points and leaving the trajectory.
One solution is to recreate the geometry of the line, not the line itself:
// creating the Line2 instance
var line = new Line2( new LineGeometry( ), material );
// at some later point, updating the line
// by recreating only its geometry
line.geometry = new LineGeometry( );
line.geometry.setPositions( points );
Another alternative, I guess, is to start with a large vertex buffer, but use only a part of it. Thus you will have preallocated space for all future vertices, but will use only the ones that are visible. This will eliminate the need to recreate of the geometry.