2021-07-25 19:56:42 +02:00
|
|
|
import freesewing from '@freesewing/core'
|
|
|
|
import plugins from '@freesewing/plugin-bundle'
|
|
|
|
import Brian from '@freesewing/brian'
|
|
|
|
import config from '../config'
|
|
|
|
// Parts
|
|
|
|
import draftBack from './back'
|
|
|
|
import draftFront from './front'
|
|
|
|
import draftSleeve from './sleeve'
|
|
|
|
import draftGusset from './gusset'
|
|
|
|
import draftHoodSide from './hoodside'
|
|
|
|
import draftHoodCenter from './hoodcenter'
|
|
|
|
|
|
|
|
// Create new design
|
2022-06-14 13:09:18 +02:00
|
|
|
const Yuri = new freesewing.Design(config, plugins)
|
2021-07-25 19:56:42 +02:00
|
|
|
|
|
|
|
// Attach draft methods from Brian to prototype
|
2022-06-14 13:09:18 +02:00
|
|
|
Yuri.prototype.draftBase = function (part) {
|
2021-07-25 19:56:42 +02:00
|
|
|
return new Brian(this.settings).draftBase(part)
|
|
|
|
}
|
2022-06-14 13:09:18 +02:00
|
|
|
Yuri.prototype.draftFrontBase = function (part) {
|
2021-07-25 19:56:42 +02:00
|
|
|
return new Brian(this.settings).draftFront(part)
|
|
|
|
}
|
2022-06-14 13:09:18 +02:00
|
|
|
Yuri.prototype.draftBackBase = function (part) {
|
2021-07-25 19:56:42 +02:00
|
|
|
return new Brian(this.settings).draftBack(part)
|
|
|
|
}
|
2022-06-14 13:09:18 +02:00
|
|
|
Yuri.prototype.draftSleevecap = function (part) {
|
2021-07-25 19:56:42 +02:00
|
|
|
return new Brian(this.settings).draftSleevecap(part)
|
|
|
|
}
|
2022-06-14 13:09:18 +02:00
|
|
|
Yuri.prototype.draftSleeveBase = function (part) {
|
2021-07-25 19:56:42 +02:00
|
|
|
return new Brian(this.settings).draftSleeve(part)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Attach own draft methods to prototype
|
2022-06-14 13:09:18 +02:00
|
|
|
Yuri.prototype.draftBack = draftBack
|
|
|
|
Yuri.prototype.draftFront = draftFront
|
|
|
|
Yuri.prototype.draftSleeve = draftSleeve
|
|
|
|
Yuri.prototype.draftGusset = draftGusset
|
|
|
|
Yuri.prototype.draftHoodSide = draftHoodSide
|
|
|
|
Yuri.prototype.draftHoodCenter = draftHoodCenter
|
2021-07-25 19:56:42 +02:00
|
|
|
|
2022-06-14 13:09:18 +02:00
|
|
|
// Named exports
|
|
|
|
export { config, Yuri }
|
|
|
|
|
|
|
|
// Default export
|
|
|
|
export default Yuri
|