Add option for line thickness
tboerstad opened this issue · 2 comments
Is your feature request related to a problem? Please describe.
I would like to be able to specify the thickness of a line.
Describe the solution you'd like
const thickness = 2;
const line = new WebglLine(color, numX, thickness); // line with double thickness
Describe alternatives you've considered
I've briefly tried scaleX/scaleY, without being able to achieve what I want in an easy way.
I apologize for not seing that this was addressed in the README.
Thank you for webgl-plot!
@tboerstad I understand the need for thick lines and I will implement it when I get some time. The problem with thick lines is that it needs to be created with triangles, hence using 3x more datapoint, 3x more bandwidth, and also the additional computation to calculate the traiangles. So not a good idea if you have a lot of data to plot!
You can create multiple WebglLine
and then offset them in X or Y, to create an illusion of a thick line. Let me know if you manage to do that 😃