2018-07-26 10:03:19 +00:00
|
|
|
import freesewing from "freesewing";
|
2018-12-22 11:29:15 +01:00
|
|
|
import plugins from "@freesewing/plugin-bundle";
|
2018-07-26 10:03:19 +00:00
|
|
|
import config from "../config/config";
|
2018-12-17 14:42:28 +01:00
|
|
|
// 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
|
|
|
|
2018-12-22 11:29:15 +01: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;
|
2018-12-10 14:08:10 +01:00
|
|
|
};
|
2018-12-07 15:56:48 +01:00
|
|
|
|
2018-12-22 11:29:15 +01:00
|
|
|
// Set up inheritance
|
2018-12-10 14:08:10 +01:00
|
|
|
Brian.prototype = Object.create(freesewing.Pattern.prototype);
|
|
|
|
Brian.prototype.constructor = Brian;
|
2018-07-15 18:57:27 +02:00
|
|
|
|
2018-12-17 14:42:28 +01:00
|
|
|
// 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;
|
2018-12-10 14:08:10 +01:00
|
|
|
|
|
|
|
export default Brian;
|