2019-08-03 15:03:33 +02:00
|
|
|
import freesewing from '@freesewing/core'
|
|
|
|
import plugins from '@freesewing/plugin-bundle'
|
|
|
|
import config from '../config'
|
2018-12-19 12:14:48 +01:00
|
|
|
// Parts
|
2019-08-03 15:03:33 +02:00
|
|
|
import draftBack from './back'
|
|
|
|
import draftSide from './side'
|
|
|
|
import draftFront from './front'
|
|
|
|
import draftInset from './inset'
|
2018-12-19 12:14:48 +01:00
|
|
|
|
2019-02-16 11:23:45 +01:00
|
|
|
// Create design
|
2019-08-03 15:03:33 +02:00
|
|
|
const Pattern = new freesewing.Design(config, plugins)
|
2018-09-04 16:51:39 +02:00
|
|
|
|
2019-02-16 11:23:45 +01:00
|
|
|
// Attach draft methods to prototype
|
2019-08-03 15:03:33 +02:00
|
|
|
Pattern.prototype.draftBack = part => draftBack(part)
|
|
|
|
Pattern.prototype.draftSide = part => draftSide(part)
|
|
|
|
Pattern.prototype.draftInset = part => draftInset(part)
|
|
|
|
Pattern.prototype.draftFront = part => draftFront(part)
|
2018-09-04 16:51:39 +02:00
|
|
|
|
2019-08-03 15:03:33 +02:00
|
|
|
export default Pattern
|