2022-09-04 19:48:15 +02:00
|
|
|
import { gorePlugin } from '@freesewing/plugin-gore'
|
|
|
|
import { base } from './base.mjs'
|
|
|
|
|
2023-04-15 10:27:31 +02:00
|
|
|
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,
|
2022-01-18 18:56:45 +01:00
|
|
|
gores: options.goreGoreNumber,
|
2022-01-18 09:13:18 +01:00
|
|
|
extraLength: options.goreExtraLength,
|
|
|
|
})
|
2023-04-11 19:25:41 +02:00
|
|
|
macro('bannerbox', {
|
|
|
|
topLeft: new Point(15, 5),
|
|
|
|
bottomRight: new Point(45, 5),
|
2023-04-15 10:27:31 +02:00
|
|
|
text: 'macro = gore',
|
|
|
|
...store.get('bannerbox.macro'),
|
2023-04-11 19:25:41 +02:00
|
|
|
})
|
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,
|
|
|
|
}
|