2019-04-29 09:01:51 +02:00
|
|
|
import freesewing from "@freesewing/core";
|
2018-12-20 11:41:35 +01:00
|
|
|
import Brian from "@freesewing/brian";
|
2018-12-22 11:49:56 +01:00
|
|
|
import plugins from "@freesewing/plugin-bundle";
|
2018-12-29 12:26:03 +01:00
|
|
|
import config from "../config";
|
2018-12-20 11:41:35 +01:00
|
|
|
// Parts
|
|
|
|
import draftBack from "./back";
|
|
|
|
import draftFront from "./front";
|
|
|
|
import draftSleeve from "./sleeve";
|
|
|
|
import draftPocket from "./pocket";
|
|
|
|
import draftPocketFacing from "./pocketfacing";
|
|
|
|
import draftHoodSide from "./hoodside";
|
|
|
|
import draftHoodCenter from "./hoodcenter";
|
|
|
|
import draftWaistband from "./waistband";
|
|
|
|
import draftCuff from "./cuff";
|
|
|
|
|
2019-02-16 11:38:29 +01:00
|
|
|
// Create design
|
2019-05-02 14:33:34 +02:00
|
|
|
const Pattern = new freesewing.Design(config, plugins);
|
2018-12-20 11:41:35 +01:00
|
|
|
|
2019-02-16 11:38:29 +01:00
|
|
|
// Attach draft methods to prototype
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBase = function(part) {
|
2018-12-20 11:41:35 +01:00
|
|
|
return new Brian(this.settings).draftBase(part);
|
2019-02-16 11:38:29 +01:00
|
|
|
};
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftFrontBase = function(part) {
|
2018-12-20 11:41:35 +01:00
|
|
|
return new Brian(this.settings).draftFront(part);
|
2019-02-16 11:38:29 +01:00
|
|
|
};
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBackBase = function(part) {
|
2018-12-20 11:41:35 +01:00
|
|
|
return new Brian(this.settings).draftBack(part);
|
2019-02-16 11:38:29 +01:00
|
|
|
};
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftSleeveBase = function(part) {
|
2018-12-20 11:41:35 +01:00
|
|
|
return new Brian(this.settings).draftSleeve(part);
|
2019-02-16 11:38:29 +01:00
|
|
|
};
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftSleevecap = function(part) {
|
2018-12-20 11:41:35 +01:00
|
|
|
return new Brian(this.settings).draftSleevecap(part);
|
2019-02-16 11:38:29 +01:00
|
|
|
};
|
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.draftPocketFacing = draftPocketFacing;
|
|
|
|
Pattern.prototype.draftHoodSide = draftHoodSide;
|
|
|
|
Pattern.prototype.draftHoodCenter = draftHoodCenter;
|
|
|
|
Pattern.prototype.draftWaistband = draftWaistband;
|
|
|
|
Pattern.prototype.draftCuff = draftCuff;
|
2018-12-20 11:41:35 +01:00
|
|
|
|
2019-05-02 14:33:34 +02:00
|
|
|
export default Pattern;
|