1
0
Fork 0
freesewing/designs/yuri/src/index.js

46 lines
1.4 KiB
JavaScript
Raw Normal View History

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
const Yuri = new freesewing.Design(config, plugins)
2021-07-25 19:56:42 +02:00
// Attach draft methods from Brian to prototype
Yuri.prototype.draftBase = function (part) {
2021-07-25 19:56:42 +02:00
return new Brian(this.settings).draftBase(part)
}
Yuri.prototype.draftFrontBase = function (part) {
2021-07-25 19:56:42 +02:00
return new Brian(this.settings).draftFront(part)
}
Yuri.prototype.draftBackBase = function (part) {
2021-07-25 19:56:42 +02:00
return new Brian(this.settings).draftBack(part)
}
Yuri.prototype.draftSleevecap = function (part) {
2021-07-25 19:56:42 +02:00
return new Brian(this.settings).draftSleevecap(part)
}
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
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
// Named exports
export { config, Yuri }
// Default export
export default Yuri