setDrawRange on THREE.Line2

Hello,
I am animating a line step by step using the setDrawRange-Solution from West Langley as described here: https://stackoverflow.com/questions/31399856/drawing-a-line-with-three-js-dynamically/31411794#31411794

Now with the introduction of THREE.Line2 this doesnt work anymore.
The Line is now just “filling up” like getting more dense, but I want the illusion of drawing, increasing the length step by step.
Any hints?

The new line implementation uses instanced rendering so drawRange won’t work. Try the following instead:

line.geometry.maxInstancedCount = value;

This will limit the number of rendered segments.

2 Likes

Solved, thanks!