chore(packages/excalidraw): vendor roughjs as @excalidraw/sloppy (#12832)

* chore(packages/sloppy): vendor roughjs as @excalidraw/sloppy

- port roughjs 4.6.4 with hachure-fill, path-data-parser and points-on-path into packages/sloppy
- move points-on-curve and roughjs's Random into @excalidraw/math
- output is identical to roughjs 4.6.4 (tests/parity.test.ts)

* fix(packages/sloppy): don't change the caller's points in polygon pattern fills

The fillers rotate a polygon's points in place and back, which left float
drift in an element's points every time a sharp, pattern-filled line's
shape was regenerated.
This commit is contained in:
David Luzar authored and GitHub committed 2026-12-03 23:03:24 +01:00
1 parent 548eff0c3d
commit b03c3bb2c6
62 files changed
+3838 -64

No files matched your search

+1
View File
@@ -16,6 +16,7 @@ const getConfig = (outdir) => ({
"@excalidraw/element",
"@excalidraw/history",
"@excalidraw/math",
"@excalidraw/sloppy",
"@excalidraw/fractional-indexing",
],
});
+1
View File
@@ -76,6 +76,7 @@ const getConfig = (outdir) => ({
"@excalidraw/element",
"@excalidraw/history",
"@excalidraw/math",
"@excalidraw/sloppy",
"@excalidraw/fractional-indexing",
],
loader: {
+1
View File
@@ -10,6 +10,7 @@ const PACKAGES = [
"common",
"fractional-indexing",
"math",
"sloppy",
"element",
"history",
"excalidraw",