From 8d25672591ecb246605e002d99575b5cb53464d7 Mon Sep 17 00:00:00 2001 From: Benji Visser Date: Tue, 19 Mar 2024 00:26:16 +0000 Subject: [PATCH 1/5] Upgrade dependencies --- package-lock.json | 26 +++++++++++++++++++------- package.json | 2 +- src/generator.ts | 2 +- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 73e3a80..d28a2fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "hachure-fill": "^0.5.2", "path-data-parser": "^0.1.0", - "points-on-curve": "^0.2.0", + "points-on-curve": "^1.0.1", "points-on-path": "^0.2.1" }, "devDependencies": { @@ -1639,9 +1639,9 @@ } }, "node_modules/points-on-curve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz", - "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-1.0.1.tgz", + "integrity": "sha512-3nmX4/LIiyuwGLwuUrfhTlDeQFlAhi7lyK/zcRNGhalwapDWgAGR82bUpmn2mA03vII3fvNCG8jAONzKXwpxAg==" }, "node_modules/points-on-path": { "version": "0.2.1", @@ -1652,6 +1652,11 @@ "points-on-curve": "0.2.0" } }, + "node_modules/points-on-path/node_modules/points-on-curve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz", + "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==" + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -3418,9 +3423,9 @@ "dev": true }, "points-on-curve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz", - "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-1.0.1.tgz", + "integrity": "sha512-3nmX4/LIiyuwGLwuUrfhTlDeQFlAhi7lyK/zcRNGhalwapDWgAGR82bUpmn2mA03vII3fvNCG8jAONzKXwpxAg==" }, "points-on-path": { "version": "0.2.1", @@ -3429,6 +3434,13 @@ "requires": { "path-data-parser": "0.1.0", "points-on-curve": "0.2.0" + }, + "dependencies": { + "points-on-curve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz", + "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==" + } } }, "prelude-ls": { diff --git a/package.json b/package.json index 112971e..1090b3e 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "dependencies": { "hachure-fill": "^0.5.2", "path-data-parser": "^0.1.0", - "points-on-curve": "^0.2.0", + "points-on-curve": "^1.0.1", "points-on-path": "^0.2.1" } } \ No newline at end of file diff --git a/src/generator.ts b/src/generator.ts index c0ee53a..41bb810 100644 --- a/src/generator.ts +++ b/src/generator.ts @@ -154,7 +154,7 @@ export class RoughGenerator { points[0], points[1], points[2], - ]), 10, (1 + o.roughness) / 2)); + ]).map(p => [...p]), 10, (1 + o.roughness) / 2)); } else { polyPoints.push(...pointsOnBezierCurves(curveToBezier(points), 10, (1 + o.roughness) / 2)); } From ed530421305a07c532c6b40734b62501c95851e6 Mon Sep 17 00:00:00 2001 From: Benji Visser Date: Tue, 19 Mar 2024 00:26:29 +0000 Subject: [PATCH 2/5] Upgrade dependencies --- src/generator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generator.ts b/src/generator.ts index 41bb810..2bdffcb 100644 --- a/src/generator.ts +++ b/src/generator.ts @@ -154,7 +154,7 @@ export class RoughGenerator { points[0], points[1], points[2], - ]).map(p => [...p]), 10, (1 + o.roughness) / 2)); + ]).map(p => ({...p})), 10, (1 + o.roughness) / 2)); } else { polyPoints.push(...pointsOnBezierCurves(curveToBezier(points), 10, (1 + o.roughness) / 2)); } From 79d41112cd8997bd2a872f0919309b9bacc381b8 Mon Sep 17 00:00:00 2001 From: Benji Visser Date: Tue, 19 Mar 2024 00:26:40 +0000 Subject: [PATCH 3/5] Upgrade dependencies --- src/generator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generator.ts b/src/generator.ts index 2bdffcb..fe2c4d3 100644 --- a/src/generator.ts +++ b/src/generator.ts @@ -154,7 +154,7 @@ export class RoughGenerator { points[0], points[1], points[2], - ]).map(p => ({...p})), 10, (1 + o.roughness) / 2)); + ]).map(p => [p[0], p[1]] as Point), 10, (1 + o.roughness) / 2)); } else { polyPoints.push(...pointsOnBezierCurves(curveToBezier(points), 10, (1 + o.roughness) / 2)); } From bcbeb442d177d1951252fbc80c5379aa58ddeefa Mon Sep 17 00:00:00 2001 From: Benji Visser Date: Tue, 19 Mar 2024 00:26:52 +0000 Subject: [PATCH 4/5] Upgrade dependencies --- src/generator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generator.ts b/src/generator.ts index fe2c4d3..0054280 100644 --- a/src/generator.ts +++ b/src/generator.ts @@ -154,7 +154,7 @@ export class RoughGenerator { points[0], points[1], points[2], - ]).map(p => [p[0], p[1]] as Point), 10, (1 + o.roughness) / 2)); + ]).map(p => [p[0], p[1]] as Point), 10, (1 + o.roughness) / 2).map(p => [p[0], p[1]] as Point)); } else { polyPoints.push(...pointsOnBezierCurves(curveToBezier(points), 10, (1 + o.roughness) / 2)); } From 4dd12f089fb31f833ab1c39afbf668a75adc4039 Mon Sep 17 00:00:00 2001 From: Benji Visser Date: Tue, 19 Mar 2024 00:27:02 +0000 Subject: [PATCH 5/5] Upgrade dependencies --- src/generator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generator.ts b/src/generator.ts index 0054280..1a34c38 100644 --- a/src/generator.ts +++ b/src/generator.ts @@ -156,7 +156,7 @@ export class RoughGenerator { points[2], ]).map(p => [p[0], p[1]] as Point), 10, (1 + o.roughness) / 2).map(p => [p[0], p[1]] as Point)); } else { - polyPoints.push(...pointsOnBezierCurves(curveToBezier(points), 10, (1 + o.roughness) / 2)); + polyPoints.push(...pointsOnBezierCurves(curveToBezier(points), 10, (1 + o.roughness) / 2).map(p => [p[0], p[1]] as Point)); } } }