You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently path method accepts data as a string. In the internals it is being parse twice once in pointsOnPath and another time in svgPath. In my case I want to do some preprocessing to the path data before applying roughness. Currently I am basically forced to:
Parse string to segments.
Apply my own transformations to path data.
Convert transformed data back to string.
This string will be parsed twice inside RoughJS library.
The text was updated successfully, but these errors were encountered:
Sorry for the late response. But if you are still interested in this, can you give a bit more details and context. Maybe some example of what you are trying to achieve? thanks!
I want to implement real-time resizing of the shapes. I can't just use scaling because the way RoughJS works is based on the absolute distance values. So for example if you apply roughness to 10px line and then scale it 10x result will not be same as applying roughness to the 100px line. In second case there would be more "roughness" and result looks more natural. So what I am doing is adjusting shape/path data according to a new size and then pass down adjusted data to the RoughJS library. The problem is that RoughJS accepts only a string. This basically results in 3 path data parsing operations. One is my own because I need to adjust data to a new size and another two inside RoughJS(not sure why it happens twice pretty sure this can be optimised to single one). All these additional parsing slows down things quite a bit and for more complex shapes I am seeing performance issues during resize.
Currently
path
method accepts data as a string. In the internals it is being parse twice once inpointsOnPath
and another time insvgPath
. In my case I want to do some preprocessing to the path data before applying roughness. Currently I am basically forced to:The text was updated successfully, but these errors were encountered: