SVG smooth freehand drawing

后端 未结 2 1933
误落风尘
误落风尘 2021-01-31 12:16

I implemented a freehand drawing of a path using native JS. But as expected path edges are little aggressive and not smooth. So I have an option of using simplifyJS to simplify

2条回答
  •  鱼传尺愫
    2021-01-31 12:41

    There are already some implementations for this on github e.g. https://github.com/epistemex/cardinal-spline-js

    You dont have to change anything on your input for that and can only change the draw function, that the line between the points is smooth. With that the points dont slip a bit during the simplification.

提交回复
热议问题