2019-08-03 15:03:33 +02:00
|
|
|
import freesewing from '@freesewing/core'
|
|
|
|
import Brian from '@freesewing/brian'
|
|
|
|
import plugins from '@freesewing/plugin-bundle'
|
|
|
|
import flipPlugin from '@freesewing/plugin-flip'
|
|
|
|
import buttonPlugin from '@freesewing/plugin-buttons'
|
|
|
|
import config from '../config'
|
2018-12-21 18:19:21 +01:00
|
|
|
// Parts
|
2019-08-03 15:03:33 +02:00
|
|
|
import draftBack from './back'
|
|
|
|
import draftFront from './front'
|
|
|
|
import draftFrontRight from './frontright'
|
|
|
|
import draftButtonPlacket from './buttonplacket'
|
|
|
|
import draftFrontLeft from './frontleft'
|
|
|
|
import draftButtonholePlacket from './buttonholeplacket'
|
|
|
|
import draftYoke from './yoke'
|
|
|
|
import draftSleeve from './sleeve'
|
|
|
|
import draftCollarStand from './collarstand'
|
|
|
|
import draftCollar from './collar'
|
|
|
|
import draftSleevePlacketUnderlap from './sleeveplacket-underlap'
|
|
|
|
import draftSleevePlacketOverlap from './sleeveplacket-overlap'
|
|
|
|
import draftCuff from './cuff'
|
2018-12-21 18:19:21 +01:00
|
|
|
|
2019-02-16 11:41:53 +01:00
|
|
|
// Create design
|
2022-06-14 13:09:16 +02:00
|
|
|
const Simon = new freesewing.Design(config, [plugins, flipPlugin, buttonPlugin])
|
2018-12-21 18:19:21 +01:00
|
|
|
|
2019-02-16 11:41:53 +01:00
|
|
|
// Attach draft methods to prototype
|
2022-06-14 13:09:16 +02:00
|
|
|
Simon.prototype.draftBase = function (part) {
|
2019-08-03 15:03:33 +02:00
|
|
|
return new Brian(this.settings).draftBase(part)
|
|
|
|
}
|
2022-06-14 13:09:16 +02:00
|
|
|
Simon.prototype.draftFrontBase = function (part) {
|
2019-08-03 15:03:33 +02:00
|
|
|
return new Brian(this.settings).draftFront(part)
|
|
|
|
}
|
2022-06-14 13:09:16 +02:00
|
|
|
Simon.prototype.draftBackBase = function (part) {
|
2019-08-03 15:03:33 +02:00
|
|
|
return new Brian(this.settings).draftBack(part)
|
|
|
|
}
|
2022-06-14 13:09:16 +02:00
|
|
|
Simon.prototype.draftSleeveBase = function (part) {
|
2021-09-12 15:29:59 +02:00
|
|
|
const brian = new Brian(this.settings)
|
2019-08-03 15:03:33 +02:00
|
|
|
return brian.draftSleeve(brian.draftSleevecap(part))
|
|
|
|
}
|
2022-06-14 13:09:16 +02:00
|
|
|
Simon.prototype.draftBack = draftBack
|
|
|
|
Simon.prototype.draftFront = draftFront
|
|
|
|
Simon.prototype.draftFrontRight = draftFrontRight
|
|
|
|
Simon.prototype.draftButtonPlacket = draftButtonPlacket
|
|
|
|
Simon.prototype.draftFrontLeft = draftFrontLeft
|
|
|
|
Simon.prototype.draftButtonholePlacket = draftButtonholePlacket
|
|
|
|
Simon.prototype.draftYoke = draftYoke
|
|
|
|
Simon.prototype.draftSleeve = draftSleeve
|
|
|
|
Simon.prototype.draftCollarStand = draftCollarStand
|
|
|
|
Simon.prototype.draftCollar = draftCollar
|
|
|
|
Simon.prototype.draftSleevePlacketUnderlap = draftSleevePlacketUnderlap
|
|
|
|
Simon.prototype.draftSleevePlacketOverlap = draftSleevePlacketOverlap
|
|
|
|
Simon.prototype.draftCuff = draftCuff
|
2018-12-21 18:19:21 +01:00
|
|
|
|
2022-06-14 13:09:16 +02:00
|
|
|
// Named exports
|
|
|
|
export { config, Simon }
|
|
|
|
|
|
|
|
// Default export
|
|
|
|
export default Simon
|