2019-08-03 15:03:33 +02:00
|
|
|
import freesewing from '@freesewing/core'
|
|
|
|
import plugins from '@freesewing/plugin-bundle'
|
|
|
|
import Brian from '@freesewing/brian'
|
|
|
|
import config from '../config'
|
2019-02-26 17:46:07 +01:00
|
|
|
// Parts
|
2019-08-03 15:03:33 +02:00
|
|
|
import draftSleeve from './sleeve'
|
|
|
|
import draftTopSleeve from './topsleeve'
|
|
|
|
import draftUnderSleeve from './undersleeve'
|
2019-02-26 17:46:07 +01:00
|
|
|
|
|
|
|
// Create new design
|
2019-08-03 15:03:33 +02:00
|
|
|
const Pattern = new freesewing.Design(config, plugins)
|
2019-02-26 17:46:07 +01:00
|
|
|
|
|
|
|
// Attach draft methods from Brian to prototype
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBase = function(part) {
|
2019-08-03 15:03:33 +02:00
|
|
|
return new Brian(this.settings).draftBase(part)
|
|
|
|
}
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftFront = function(part) {
|
2019-08-03 15:03:33 +02:00
|
|
|
return new Brian(this.settings).draftFront(part)
|
|
|
|
}
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBack = function(part) {
|
2019-08-03 15:03:33 +02:00
|
|
|
return new Brian(this.settings).draftBack(part)
|
|
|
|
}
|
2019-02-26 17:46:07 +01:00
|
|
|
|
|
|
|
// Attach own draft methods to prototype
|
2019-08-03 15:03:33 +02:00
|
|
|
Pattern.prototype.draftSleeve = draftSleeve
|
|
|
|
Pattern.prototype.draftTopSleeve = draftTopSleeve
|
|
|
|
Pattern.prototype.draftUnderSleeve = draftUnderSleeve
|
2019-02-26 17:46:07 +01:00
|
|
|
|
2019-08-03 15:03:33 +02:00
|
|
|
export default Pattern
|