tldraw/packages
David Sheldrick 82b6287ab3
Hot elbows (#2258)
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>
2023-11-29 11:56:47 +00:00
..
assets Update CHANGELOG.md [skip ci] 2023-11-10 10:49:37 +00:00
editor Replace getters in examples (#2261) 2023-11-28 17:33:10 +00:00
state Replace getters in examples (#2261) 2023-11-28 17:33:10 +00:00
store No impure getters pt10 (#2235) 2023-11-16 12:07:33 +00:00
tldraw Hot elbows (#2258) 2023-11-29 11:56:47 +00:00
tlschema Add prettier caching (#2212) 2023-11-14 09:06:52 +00:00
utils no impure getters pt 11 (#2236) 2023-11-16 15:34:56 +00:00
validate Update CHANGELOG.md [skip ci] 2023-11-10 10:49:37 +00:00