1
0
Fork 0

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.
This commit is contained in:
Joost De Cock 2020-04-18 11:38:08 +02:00
parent ff82e2568b
commit 224c9525e1

View file

@ -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'