2019-04-29 09:01:51 +02:00
|
|
|
import freesewing from "@freesewing/core";
|
2019-03-03 16:04:24 +01:00
|
|
|
import plugins from "@freesewing/plugin-bundle";
|
|
|
|
import Brian from "@freesewing/brian";
|
|
|
|
import config from "../config";
|
|
|
|
// Parts
|
|
|
|
import draftBack from "./back";
|
|
|
|
import draftFront from "./front";
|
|
|
|
import draftSleeve from "./sleeve";
|
|
|
|
import draftPocket from "./pocket";
|
|
|
|
import draftHood from "./hood";
|
|
|
|
import draftWaistband from "./waistband";
|
|
|
|
import draftCuff from "./cuff";
|
|
|
|
|
|
|
|
// Create new design
|
2019-05-02 14:33:34 +02:00
|
|
|
const Pattern = new freesewing.Design(config, plugins);
|
2019-03-03 16:04:24 +01:00
|
|
|
|
|
|
|
// Attach draft methods from Brian to prototype
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBase = function(part) {
|
2019-03-03 16:04:24 +01:00
|
|
|
return new Brian(this.settings).draftBase(part);
|
|
|
|
};
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftFrontBase = function(part) {
|
2019-03-03 16:04:24 +01:00
|
|
|
return new Brian(this.settings).draftFront(part);
|
|
|
|
};
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBackBase = function(part) {
|
2019-03-03 16:04:24 +01:00
|
|
|
return new Brian(this.settings).draftBack(part);
|
|
|
|
};
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftSleevecap = function(part) {
|
2019-03-03 16:04:24 +01:00
|
|
|
return new Brian(this.settings).draftSleevecap(part);
|
|
|
|
};
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftSleeveBase = function(part) {
|
2019-03-03 16:04:24 +01:00
|
|
|
return new Brian(this.settings).draftSleeve(part);
|
|
|
|
};
|
|
|
|
|
|
|
|
// Attach own draft methods to prototype
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBack = draftBack;
|
|
|
|
Pattern.prototype.draftFront = draftFront;
|
|
|
|
Pattern.prototype.draftSleeve = draftSleeve;
|
|
|
|
Pattern.prototype.draftPocket = draftPocket;
|
|
|
|
Pattern.prototype.draftHood = draftHood;
|
|
|
|
Pattern.prototype.draftWaistband = draftWaistband;
|
|
|
|
Pattern.prototype.draftCuff = draftCuff;
|
2019-03-03 16:04:24 +01:00
|
|
|
|
2019-05-02 14:33:34 +02:00
|
|
|
export default Pattern;
|