Closed TodePond closed 2 years ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
perfect-freehand-example | ✅ Ready (Inspect) | Visit Preview | Aug 22, 2022 at 3:17PM (UTC) |
pf-dev | ✅ Ready (Inspect) | Visit Preview | Aug 22, 2022 at 3:17PM (UTC) |
Works for me!
See: https://github.com/steveruizok/perfect-freehand/issues/48
This fixes a bug where sharp corners would sometimes cause a "dot" to appear at the end of a line. The bug happened because some sharp corners were not getting detected. To detect them, I made it also check the dot-product of the current point and previous point (not just the next point). Maybe a cleaner fix here, but maybe it can solve it for now.
Line 212 and 213 could be better - I made them kinda messy to avoid typescript complaining but there's probably a better way of structuring it?