1
0
Fork 0
freesewing/packages/aaron/src/index.js
2021-01-31 09:22:15 +01:00

20 lines
619 B
JavaScript

import freesewing from '@freesewing/core'
import Brian from '@freesewing/brian'
import plugins from '@freesewing/plugin-bundle'
import config from '../config'
// Parts
import draftBack from './back'
import draftFront from './front'
// Create design
const Pattern = new freesewing.Design(config, plugins)
// Attach draft methods to prototype
Pattern.prototype.draftBase = function (part) {
// Getting the base part from Brian
return new Brian(this.settings).draftBase(part)
}
Pattern.prototype.draftFront = (part) => draftFront(part)
Pattern.prototype.draftBack = (part) => draftBack(part)
export default Pattern