two.js icon indicating copy to clipboard operation
two.js copied to clipboard

Add ability to change stroke width for one point

Open sami8github opened this issue 7 years ago • 3 comments

If there is possibility add ability to change stroke width for one point. image

sami8github avatar Oct 21 '18 05:10 sami8github

Unfortunately not at the moment. From an API standpoint I think there are a number of ways we could tackle this. If you have any preferences please don't hesitate to share your thoughts!

jonobr1 avatar Oct 21 '18 17:10 jonobr1

Thank you, from user point of view I think its good to have the ability to switch between normal stroke and shaped stroke: the shaped stroke is a shape with a form of line , to change the width of one point increase the distance between the red points under the hood (the user don't see the red dots just have the width parameter), and the curvature of the shaped stroke follow the same of the original shape:

image

image

sami8github avatar Oct 21 '18 21:10 sami8github

Cool, thanks for the input. I agree that it would make sense to enhance the Two.Anchor to have info on the weight of the stroke for that point. Then Two.js behind the scenes can interpolate between.

As far as I know this type of functionality is not part of the SVG or canvas spec. So it'll take a bit more time to include.

jonobr1 avatar Oct 21 '18 21:10 jonobr1