tada: Initial commit based on pattern template
This commit is contained in:
parent
5d4291d0c4
commit
5ef66195de
21 changed files with 7571 additions and 3 deletions
24
packages/examples/src/index.js
Normal file
24
packages/examples/src/index.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
import freesewing from "freesewing";
|
||||
import pluginBundle from "@freesewing/plugin-bundle";
|
||||
|
||||
import config from "../config/config";
|
||||
import { version } from "../package.json";
|
||||
|
||||
import back from "./back";
|
||||
import front from "./front";
|
||||
|
||||
var pattern = new freesewing.Pattern({ version: version, ...config }).with(
|
||||
pluginBundle
|
||||
);
|
||||
|
||||
pattern.draft = function() {
|
||||
this.parts.back = this.draftBack(new pattern.Part());
|
||||
this.parts.front = this.draftFront(new pattern.Part().copy(this.parts.back));
|
||||
|
||||
return pattern;
|
||||
};
|
||||
|
||||
pattern.draftBack = part => back.draft(part);
|
||||
pattern.draftFront = part => front.draft(part);
|
||||
|
||||
export default pattern;
|
Loading…
Add table
Add a link
Reference in a new issue