1
0
Fork 0
freesewing/designs/plugintest/src/plugin-gore.mjs

34 lines
934 B
JavaScript
Raw Normal View History

2022-09-04 19:48:15 +02:00
import { gorePlugin } from '@freesewing/plugin-gore'
import { base } from './base.mjs'
const pluginGore = ({ points, Point, options, macro, part, store }) => {
2022-01-18 09:13:18 +01:00
if (['gore', 'all'].indexOf(options.plugin) !== -1) {
2022-01-19 16:23:25 +01:00
points.start = new Point(10, 10)
2022-01-18 09:13:18 +01:00
macro('gore', {
from: points.start,
radius: options.goreRadius,
gores: options.goreGoreNumber,
2022-01-18 09:13:18 +01:00
extraLength: options.goreExtraLength,
})
macro('bannerbox', {
topLeft: new Point(15, 5),
bottomRight: new Point(45, 5),
text: 'macro = gore',
...store.get('bannerbox.macro'),
})
2022-01-18 09:13:18 +01:00
}
return part
}
2022-09-04 19:48:15 +02:00
export const gore = {
name: 'plugintest.gore',
plugins: gorePlugin,
after: base,
options: {
goreRadius: { count: 20, min: 10, max: 30, menu: 'gore' },
goreGoreNumber: { count: 6, min: 4, max: 8, menu: 'gore' },
goreExtraLength: { count: 10, min: 0, max: 20, menu: 'gore' },
},
draft: pluginGore,
}