tada: Initial commit
This commit is contained in:
parent
ba89295a6f
commit
a8edde019a
19 changed files with 4922 additions and 2 deletions
43
packages/huey/src/index.js
Normal file
43
packages/huey/src/index.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
import freesewing from "freesewing";
|
||||
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
|
||||
const Huey = new freesewing.Design(config, plugins);
|
||||
|
||||
// Attach draft methods from Brian to prototype
|
||||
Huey.prototype.draftBase = function(part) {
|
||||
return new Brian(this.settings).draftBase(part);
|
||||
};
|
||||
Huey.prototype.draftFrontBlock = function(part) {
|
||||
return new Brian(this.settings).draftFront(part);
|
||||
};
|
||||
Huey.prototype.draftBackBlock = function(part) {
|
||||
return new Brian(this.settings).draftBack(part);
|
||||
};
|
||||
Huey.prototype.draftSleevecap = function(part) {
|
||||
return new Brian(this.settings).draftSleevecap(part);
|
||||
};
|
||||
Huey.prototype.draftSleeveBlock = function(part) {
|
||||
return new Brian(this.settings).draftSleeve(part);
|
||||
};
|
||||
|
||||
// Attach own draft methods to prototype
|
||||
Huey.prototype.draftBack = draftBack;
|
||||
Huey.prototype.draftFront = draftFront;
|
||||
Huey.prototype.draftSleeve = draftSleeve;
|
||||
Huey.prototype.draftPocket = draftPocket;
|
||||
Huey.prototype.draftHood = draftHood;
|
||||
Huey.prototype.draftWaistband = draftWaistband;
|
||||
Huey.prototype.draftCuff = draftCuff;
|
||||
|
||||
export default Huey;
|
Loading…
Add table
Add a link
Reference in a new issue