From 224c9525e1c5ed97053d344c04bebbcebe9cb87a Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Sat, 18 Apr 2020 11:38:08 +0200 Subject: [PATCH] feat(core): Expose Bezier-js via utils Since the bezier-js library is bundled with @freesewing/core, we now expose it via utils. This way, people who want to use this in their plugins or other code are not forced to import it again. --- packages/core/src/utils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/src/utils.js b/packages/core/src/utils.js index a3c5b8346cf..3da2d554247 100644 --- a/packages/core/src/utils.js +++ b/packages/core/src/utils.js @@ -88,10 +88,7 @@ export function pointOnCurve(start, cp1, cp2, end, check) { /** Splits a curve on a point */ export function splitCurve(start, cp1, cp2, end, split) { - let [c1, c2] = new Path() - .move(start) - .curve(cp1, cp2, end) - .split(split) + let [c1, c2] = new Path().move(start).curve(cp1, cp2, end).split(split) return [ { @@ -335,3 +332,6 @@ export function deg2rad(degrees) { export function rad2deg(radians) { return (radians / Math.PI) * 180 } + +// Export bezier-js so plugins can use it +export { default as Bezier } from 'bezier-js'