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:
parent
ff82e2568b
commit
224c9525e1
1 changed files with 4 additions and 4 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue