2019-04-29 09:01:51 +02:00
|
|
|
import freesewing from "@freesewing/core";
|
2019-02-26 17:46:07 +01:00
|
|
|
import plugins from "@freesewing/plugin-bundle";
|
|
|
|
import Brian from "@freesewing/brian";
|
|
|
|
import config from "../config";
|
|
|
|
// Parts
|
|
|
|
import draftSleeve from "./sleeve";
|
|
|
|
import draftTopSleeve from "./topsleeve";
|
|
|
|
import draftUnderSleeve from "./undersleeve";
|
|
|
|
|
|
|
|
// Create new design
|
|
|
|
const Bent = new freesewing.Design(config, plugins);
|
|
|
|
|
|
|
|
// Attach draft methods from Brian to prototype
|
|
|
|
Bent.prototype.draftBase = function(part) {
|
|
|
|
return new Brian(this.settings).draftBase(part);
|
|
|
|
};
|
|
|
|
Bent.prototype.draftFront = function(part) {
|
|
|
|
return new Brian(this.settings).draftFront(part);
|
|
|
|
};
|
|
|
|
Bent.prototype.draftBack = function(part) {
|
|
|
|
return new Brian(this.settings).draftBack(part);
|
|
|
|
};
|
|
|
|
|
|
|
|
// Attach own draft methods to prototype
|
|
|
|
Bent.prototype.draftSleeve = draftSleeve;
|
|
|
|
Bent.prototype.draftTopSleeve = draftTopSleeve;
|
|
|
|
Bent.prototype.draftUnderSleeve = draftUnderSleeve;
|
|
|
|
|
|
|
|
export default Bent;
|
2019-04-29 09:01:51 +02:00
|
|
|
export { config };
|