const line = new MeshLine();
line.setPoints(points);
// p is a decimal percentage of the number of points
// ie. point 200 of 250 points, p = 0.8
line.setPoints(geometry, p => 2); // makes width 2 * lineWidth
line.setPoints(geometry, p => 1 - p); // makes width taper
line.setPoints(geometry, p => 2 + Math.sin(50 * p)); // makes width sinusoidal
and it shall be setGeometry instead of setPoints when using a BufferGeometry or Geometry object.
Here is the patch:
const line = new MeshLine();
line.setPoints(points);
// OR
line.setGeometry(geometry);
And
// p is a decimal percentage of the number of points
// ie. point 200 of 250 points, p = 0.8
line.setGeometry(geometry, p => 2); // makes width 2 * lineWidth
line.setGeometry(geometry, p => 1 - p); // makes width taper
line.setGeometry(geometry, p => 2 + Math.sin(50 * p)); // makes width sinusoidal
Really grateful for the work you've done ;) I was struggling with line width of 1 on Windows (Linux was OK).
Hi,
There is an error in the README.md file:
It's written:
and it shall be
setGeometry
instead ofsetPoints
when using a BufferGeometry or Geometry object.Here is the patch:
And
Really grateful for the work you've done ;) I was struggling with line width of 1 on Windows (Linux was OK).
Best regards,
Samy