1
0
Fork 0
freesewing/packages/brian/src/index.js

31 lines
862 B
JavaScript
Raw Normal View History

import freesewing from "freesewing";
import plugins from "@freesewing/plugin-bundle";
import config from "../config/config";
// Parts
import draftBase from "./base";
import draftBack from "./back";
import draftFront from "./front";
import draftSleevecap from "./sleevecap";
import draftSleeve from "./sleeve";
2018-07-26 13:43:45 +00:00
// Constructor
const Brian = function(settings) {
freesewing.Pattern.call(this, config);
this.use(plugins).apply(settings);
2018-12-11 18:50:52 +01:00
return this;
};
// Set up inheritance
Brian.prototype = Object.create(freesewing.Pattern.prototype);
Brian.prototype.constructor = Brian;
// Attach per-part draft methods to prototype
Brian.prototype.draftBase = draftBase;
Brian.prototype.draftBack = draftBack;
Brian.prototype.draftFront = draftFront;
Brian.prototype.draftSleevecap = draftSleevecap;
Brian.prototype.draftSleeve = draftSleeve;
export default Brian;