82b6287ab3
Our ink has kinda homely elbows sometimes. This PR believes elbows can and should be beautiful. The way this is achieved is by partitioning the points fed into perfect-freehand at elbow points, and then rendering each partition separately. Doing this naively ballooned the size of the SVG path data so I also did a tiny bit of refactoring to allow us to use the SVG arc command. At the same time we are able to easily omit some of the points around the beginnings and ends of segments thanks to the nature of the corners. All of this results in an average 13% reduction in SVG path data size over the current version. ![Kapture 2023-11-27 at 14 39 57](https://github.com/tldraw/tldraw/assets/1242537/44882d93-f06b-4956-af97-0113b2d8e8ef) ### Change Type - [x] `patch` — Bug fix --------- Co-authored-by: Steve Ruiz <steveruizok@gmail.com> |
||
---|---|---|
.. | ||
assets | ||
editor | ||
state | ||
store | ||
tldraw | ||
tlschema | ||
utils | ||
validate |