✨ Integrated Penelope and Waralee patterns, plus 2.1 prep
Penelope and Waralee are two new patterns by @woutervdub This integrates them in our monorepo, including the translations in the i18n package and the package info in the pattern-info pattern This commit also includes a minor tweak to our core package. Previously, you had to instantiate a pattern to get its config, but that is no longer the case. The default export (the constructor) now has a config property you can access without instantiating the pattern. All of these changes will trigger a new minor release when we merge them into master. Specifically v2.1
This commit is contained in:
parent
6fe5177377
commit
261da52c3b
58 changed files with 12190 additions and 2088 deletions
|
@ -125,34 +125,6 @@ mui-theme:
|
||||||
"@material-ui/core": "^4.0.1"
|
"@material-ui/core": "^4.0.1"
|
||||||
"react": "^16.8"
|
"react": "^16.8"
|
||||||
"react-dom": "^16.8"
|
"react-dom": "^16.8"
|
||||||
pattern-info:
|
|
||||||
peer:
|
|
||||||
"@freesewing/core": "^{{version}}"
|
|
||||||
"@freesewing/plugin-bundle": "^{{version}}"
|
|
||||||
patterns:
|
|
||||||
_:
|
|
||||||
"@freesewing/aaron": "^{{version}}"
|
|
||||||
"@freesewing/benjamin": "^{{version}}"
|
|
||||||
"@freesewing/bent": "^{{version}}"
|
|
||||||
"@freesewing/brian": "^{{version}}"
|
|
||||||
"@freesewing/bruce": "^{{version}}"
|
|
||||||
"@freesewing/carlita": "^{{version}}"
|
|
||||||
"@freesewing/carlton": "^{{version}}"
|
|
||||||
"@freesewing/cathrin": "^{{version}}"
|
|
||||||
"@freesewing/florent": "^{{version}}"
|
|
||||||
"@freesewing/huey": "^{{version}}"
|
|
||||||
"@freesewing/hugo": "^{{version}}"
|
|
||||||
"@freesewing/jaeger": "^{{version}}"
|
|
||||||
"@freesewing/shin": "^{{version}}"
|
|
||||||
"@freesewing/simon": "^{{version}}"
|
|
||||||
"@freesewing/sven": "^{{version}}"
|
|
||||||
"@freesewing/tamiko": "^{{version}}"
|
|
||||||
"@freesewing/trayvon": "^{{version}}"
|
|
||||||
"@freesewing/wahid": "^{{version}}"
|
|
||||||
peer:
|
|
||||||
"@freesewing/core": "^{{version}}"
|
|
||||||
"@freesewing/plugin-bundle": "^{{version}}"
|
|
||||||
"@freesewing/plugin-buttons": "^{{version}}"
|
|
||||||
plugin-bundle:
|
plugin-bundle:
|
||||||
_:
|
_:
|
||||||
"@freesewing/plugin-cutonfold": "^{{version}}"
|
"@freesewing/plugin-cutonfold": "^{{version}}"
|
||||||
|
|
|
@ -18,8 +18,8 @@ i18n: "Translations for the FreeSewing project"
|
||||||
jaeger: "A FreeSewing pattern for a sport coat style jacket"
|
jaeger: "A FreeSewing pattern for a sport coat style jacket"
|
||||||
models: "Body measurements data for a range of default sizes"
|
models: "Body measurements data for a range of default sizes"
|
||||||
mui-theme: "A Material-UI theme for FreeSewing web UIs"
|
mui-theme: "A Material-UI theme for FreeSewing web UIs"
|
||||||
patterns: "An umbrella package for all FreeSewing patterns"
|
|
||||||
pattern-info: "Information about available freesewing patterns"
|
pattern-info: "Information about available freesewing patterns"
|
||||||
|
penelope: "A FreeSewing pattern for a pencil skirt"
|
||||||
plugin-banner: "A FreeSewing plugin to repeat text on a path"
|
plugin-banner: "A FreeSewing plugin to repeat text on a path"
|
||||||
plugin-bundle: "An umbrella package of 8 essential FreeSewing build-time plugins"
|
plugin-bundle: "An umbrella package of 8 essential FreeSewing build-time plugins"
|
||||||
plugin-bust: "A FreeSewing plugin that helps with bust-adjusting menswear patterns"
|
plugin-bust: "A FreeSewing plugin that helps with bust-adjusting menswear patterns"
|
||||||
|
@ -51,3 +51,4 @@ trayvon: "A FreeSewing pattern for a tie"
|
||||||
tutorial: "A FreeSewing pattern for a baby bib that's used in our tutorial"
|
tutorial: "A FreeSewing pattern for a baby bib that's used in our tutorial"
|
||||||
utils: "A collection of utilities shared across freesewing frontend projects"
|
utils: "A collection of utilities shared across freesewing frontend projects"
|
||||||
wahid: "A FreeSewing pattern for a classic fitted waistcoat"
|
wahid: "A FreeSewing pattern for a classic fitted waistcoat"
|
||||||
|
waralee: "A FreeSewing pattern for wrap pants"
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -14,5 +14,8 @@ export default function Design(config, plugins = false) {
|
||||||
pattern.prototype = Object.create(Pattern.prototype)
|
pattern.prototype = Object.create(Pattern.prototype)
|
||||||
pattern.prototype.constructor = pattern
|
pattern.prototype.constructor = pattern
|
||||||
|
|
||||||
|
// Make config available without need to instantiate pattern
|
||||||
|
pattern.config = config
|
||||||
|
|
||||||
return pattern
|
return pattern
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -18,6 +18,8 @@ import florent from './florent.yml'
|
||||||
import theo from './theo.yml'
|
import theo from './theo.yml'
|
||||||
import sandy from './sandy.yml'
|
import sandy from './sandy.yml'
|
||||||
import shin from './shin.yml'
|
import shin from './shin.yml'
|
||||||
|
import penelope from './penelope.yml'
|
||||||
|
import waralee from './waralee.yml'
|
||||||
import { options as optionList } from '@freesewing/pattern-info'
|
import { options as optionList } from '@freesewing/pattern-info'
|
||||||
import shared from '../../../shared-options.yml'
|
import shared from '../../../shared-options.yml'
|
||||||
|
|
||||||
|
@ -41,7 +43,9 @@ let patterns = {
|
||||||
florent,
|
florent,
|
||||||
theo,
|
theo,
|
||||||
sandy,
|
sandy,
|
||||||
shin
|
shin,
|
||||||
|
penelope,
|
||||||
|
waralee
|
||||||
}
|
}
|
||||||
|
|
||||||
let options = {}
|
let options = {}
|
||||||
|
|
|
@ -61,3 +61,7 @@ trayvon:
|
||||||
wahid:
|
wahid:
|
||||||
description: Wahid is a classic fitted waistcoat.
|
description: Wahid is a classic fitted waistcoat.
|
||||||
title: Wahid waistcoat
|
title: Wahid waistcoat
|
||||||
|
waralee:
|
||||||
|
description: Waralee are wrap pants
|
||||||
|
title: Waralee wrap pants
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -30,10 +30,7 @@
|
||||||
"start": "rollup -c -w",
|
"start": "rollup -c -w",
|
||||||
"prepare": "node src/prebuild.js"
|
"prepare": "node src/prebuild.js"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {},
|
||||||
"@freesewing/core": "^2.0.3",
|
|
||||||
"@freesewing/plugin-bundle": "^2.0.3"
|
|
||||||
},
|
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"files": [
|
"files": [
|
||||||
|
|
3
packages/pattern-info/src/config.js
Normal file
3
packages/pattern-info/src/config.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import aaron from '@freesewing/aaron'
|
||||||
|
|
||||||
|
console.log(aaron.config)
|
|
@ -18,6 +18,7 @@ export const list = [
|
||||||
'huey',
|
'huey',
|
||||||
'hugo',
|
'hugo',
|
||||||
'jaeger',
|
'jaeger',
|
||||||
|
'penelope',
|
||||||
'sandy',
|
'sandy',
|
||||||
'shin',
|
'shin',
|
||||||
'simon',
|
'simon',
|
||||||
|
@ -25,7 +26,8 @@ export const list = [
|
||||||
'tamiko',
|
'tamiko',
|
||||||
'theo',
|
'theo',
|
||||||
'trayvon',
|
'trayvon',
|
||||||
'wahid'
|
'wahid',
|
||||||
|
'waralee'
|
||||||
]
|
]
|
||||||
|
|
||||||
export const withoutBreasts = [
|
export const withoutBreasts = [
|
||||||
|
@ -39,6 +41,7 @@ export const withoutBreasts = [
|
||||||
'huey',
|
'huey',
|
||||||
'hugo',
|
'hugo',
|
||||||
'jaeger',
|
'jaeger',
|
||||||
|
'penelope',
|
||||||
'sandy',
|
'sandy',
|
||||||
'shin',
|
'shin',
|
||||||
'simon',
|
'simon',
|
||||||
|
@ -46,7 +49,8 @@ export const withoutBreasts = [
|
||||||
'tamiko',
|
'tamiko',
|
||||||
'theo',
|
'theo',
|
||||||
'trayvon',
|
'trayvon',
|
||||||
'wahid'
|
'wahid',
|
||||||
|
'waralee'
|
||||||
]
|
]
|
||||||
|
|
||||||
export const withBreasts = ['cathrin', 'carlita']
|
export const withBreasts = ['cathrin', 'carlita']
|
||||||
|
|
|
@ -1,7 +1,52 @@
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const fse = require('fs-extra')
|
const fse = require('fs-extra')
|
||||||
const patterns = require('@freesewing/patterns')
|
const aaron = require('@freesewing/aaron').config
|
||||||
|
const benjamin = require('@freesewing/benjamin').config
|
||||||
|
const bent = require('@freesewing/bent').config
|
||||||
|
const brian = require('@freesewing/brian').config
|
||||||
|
const bruce = require('@freesewing/bruce').config
|
||||||
|
const carlita = require('@freesewing/carlita').config
|
||||||
|
const carlton = require('@freesewing/carlton').config
|
||||||
|
const cathrin = require('@freesewing/cathrin').config
|
||||||
|
const florent = require('@freesewing/florent').config
|
||||||
|
const huey = require('@freesewing/huey').config
|
||||||
|
const hugo = require('@freesewing/hugo').config
|
||||||
|
const jaeger = require('@freesewing/jaeger').config
|
||||||
|
const penelope = require('@freesewing/penelope').config
|
||||||
|
const sandy = require('@freesewing/sandy').config
|
||||||
|
const shin = require('@freesewing/shin').config
|
||||||
|
const simon = require('@freesewing/simon').config
|
||||||
|
const sven = require('@freesewing/sven').config
|
||||||
|
const tamiko = require('@freesewing/tamiko').config
|
||||||
|
const theo = require('@freesewing/theo').config
|
||||||
|
const trayvon = require('@freesewing/trayvon').config
|
||||||
|
const wahid = require('@freesewing/wahid').config
|
||||||
|
const waralee = require('@freesewing/waralee').config
|
||||||
|
|
||||||
|
const patterns = {
|
||||||
|
aaron,
|
||||||
|
benjamin,
|
||||||
|
bent,
|
||||||
|
brian,
|
||||||
|
bruce,
|
||||||
|
carlita,
|
||||||
|
carlton,
|
||||||
|
cathrin,
|
||||||
|
florent,
|
||||||
|
huey,
|
||||||
|
hugo,
|
||||||
|
jaeger,
|
||||||
|
penelope,
|
||||||
|
sandy,
|
||||||
|
shin,
|
||||||
|
simon,
|
||||||
|
sven,
|
||||||
|
tamiko,
|
||||||
|
theo,
|
||||||
|
trayvon,
|
||||||
|
wahid,
|
||||||
|
waralee
|
||||||
|
}
|
||||||
const patternOptions = config => {
|
const patternOptions = config => {
|
||||||
let all = []
|
let all = []
|
||||||
let groups = config.optionGroups
|
let groups = config.optionGroups
|
||||||
|
@ -47,27 +92,25 @@ const patternParts = config => {
|
||||||
return Object.keys(parts)
|
return Object.keys(parts)
|
||||||
}
|
}
|
||||||
|
|
||||||
let options = {}
|
const options = {}
|
||||||
let optionGroups = {}
|
const optionGroups = {}
|
||||||
let parts = {}
|
const parts = {}
|
||||||
let measurements = {}
|
const measurements = {}
|
||||||
let versions = {}
|
const versions = {}
|
||||||
let info = {}
|
const info = {}
|
||||||
for (let pattern of Object.keys(patterns)) {
|
for (let pattern of Object.keys(patterns)) {
|
||||||
let instance = new patterns[pattern]()
|
options[pattern] = patternOptions(patterns[pattern])
|
||||||
let p = pattern.toLowerCase()
|
optionGroups[pattern] = patterns[pattern].optionGroups
|
||||||
options[p] = patternOptions(instance.config)
|
parts[pattern] = patternParts(patterns[pattern])
|
||||||
optionGroups[p] = instance.config.optionGroups
|
measurements[pattern] = patterns[pattern].measurements
|
||||||
parts[p] = patternParts(instance.config)
|
versions[pattern] = patterns[pattern].version
|
||||||
measurements[p] = instance.config.measurements
|
info[pattern] = {
|
||||||
versions[p] = instance.config.version
|
design: patterns[pattern].design,
|
||||||
info[p] = {
|
code: patterns[pattern].code,
|
||||||
design: instance.config.design,
|
department: patterns[pattern].department,
|
||||||
code: instance.config.code,
|
type: patterns[pattern].type,
|
||||||
department: instance.config.department,
|
difficulty: patterns[pattern].difficulty,
|
||||||
type: instance.config.type,
|
tags: patterns[pattern].tags
|
||||||
difficulty: instance.config.difficulty,
|
|
||||||
tags: instance.config.tags
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
# Change log for: @freesewing/patterns
|
|
||||||
|
|
||||||
|
|
||||||
## Unreleased
|
|
||||||
|
|
||||||
**Note:** Version bump only for package patterns
|
|
||||||
|
|
||||||
|
|
||||||
## 2.0.4 (2019-09-27)
|
|
||||||
|
|
||||||
**Note:** Version bump only for package patterns
|
|
||||||
|
|
||||||
|
|
||||||
## 2.0.3 (2019-09-15)
|
|
||||||
|
|
||||||
**Note:** Version bump only for package patterns
|
|
||||||
|
|
||||||
|
|
||||||
## 2.0.2 (2019-09-06)
|
|
||||||
|
|
||||||
**Note:** Version bump only for package patterns
|
|
||||||
|
|
||||||
|
|
||||||
## 2.0.1 (2019-09-01)
|
|
||||||
|
|
||||||
**Note:** Version bump only for package patterns
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 2.0.0 (2019-08-25)
|
|
||||||
|
|
||||||
This is the **initial release**, and the start of this change log.
|
|
||||||
|
|
||||||
Prior to version 2, FreeSewing was not a JavaScript project.
|
|
||||||
As such, that history is out of scope for this change log.
|
|
|
@ -1,152 +0,0 @@
|
||||||
<p align="center">
|
|
||||||
<a title="Go to freesewing.org" href="https://freesewing.org/"><img src="https://freesewing.org/img/logo/black.svg" align="center" width="150px" alt="Freesewing logo"/></a>
|
|
||||||
<br>
|
|
||||||
<a href="https://freesewing.org/">FreeSewing v2</a>
|
|
||||||
</p>
|
|
||||||
<p align="center">An open source platform for made-to-measure sewing patterns</p>
|
|
||||||
<p align='center'><a
|
|
||||||
href="https://www.npmjs.com/package/@freesewing/patterns"
|
|
||||||
title="@freesewing/patterns on NPM"
|
|
||||||
><img src="https://img.shields.io/npm/v/@freesewing/patterns.svg"
|
|
||||||
alt="@freesewing/patterns on NPM"/>
|
|
||||||
</a><a
|
|
||||||
href="https://opensource.org/licenses/MIT"
|
|
||||||
title="License: MIT"
|
|
||||||
><img src="https://img.shields.io/npm/l/@freesewing/patterns.svg?label=License"
|
|
||||||
alt="License: MIT"/>
|
|
||||||
</a><a
|
|
||||||
href="https://deepscan.io/dashboard#view=project&tid=2114&pid=2993&bid=23256"
|
|
||||||
title="Code quality on DeepScan"
|
|
||||||
><img src="https://deepscan.io/api/teams/2114/projects/2993/branches/23256/badge/grade.svg"
|
|
||||||
alt="Code quality on DeepScan"/>
|
|
||||||
</a><a
|
|
||||||
href="https://github.com/freesewing/freesewing/issues?q=is%3Aissue+is%3Aopen+label%3Apkg%3Apatterns"
|
|
||||||
title="Open issues tagged pkg:patterns"
|
|
||||||
><img src="https://img.shields.io/github/issues/freesewing/freesewing/pkg:patterns.svg?label=Issues"
|
|
||||||
alt="Open issues tagged pkg:patterns"/>
|
|
||||||
</a></p><p align='center'><a
|
|
||||||
href="https://twitter.com/freesewing_org"
|
|
||||||
title="Follow @freesewing_org on Twitter"
|
|
||||||
><img src="https://img.shields.io/badge/%F3%A0%80%A0-Follow%20us-blue.svg?logo=twitter&logoColor=white&logoWidth=15"
|
|
||||||
alt="Follow @freesewing_org on Twitter"/>
|
|
||||||
</a><a
|
|
||||||
href="https://gitter.im/freesewing/chat"
|
|
||||||
title="Chat with us on Gitter"
|
|
||||||
><img src="https://img.shields.io/badge/%F3%A0%80%A0-Chat%20with%20us-CA0547.svg?logo=gitter&logoColor=white&logoWidth=15"
|
|
||||||
alt="Chat with us on Gitter"/>
|
|
||||||
</a><a
|
|
||||||
href="https://freesewing.org/patrons/join"
|
|
||||||
title="Become a FreeSewing Patron"
|
|
||||||
><img src="https://img.shields.io/badge/%F3%A0%80%A0-Support%20us-blueviolet.svg?logo=cash-app&logoColor=white&logoWidth=15"
|
|
||||||
alt="Become a FreeSewing Patron"/>
|
|
||||||
</a><a
|
|
||||||
href="https://instagram.com/freesewing_org"
|
|
||||||
title="Follow @freesewing_org on Twitter"
|
|
||||||
><img src="https://img.shields.io/badge/%F3%A0%80%A0-Follow%20us-E4405F.svg?logo=instagram&logoColor=white&logoWidth=15"
|
|
||||||
alt="Follow @freesewing_org on Twitter"/>
|
|
||||||
</a></p>
|
|
||||||
|
|
||||||
# @freesewing/patterns
|
|
||||||
|
|
||||||
An umbrella package for all FreeSewing patterns
|
|
||||||
|
|
||||||
|
|
||||||
## Included patterns
|
|
||||||
|
|
||||||
### Blocks
|
|
||||||
|
|
||||||
Blocks or slopers are basic patterns shapes that you can extend into fully detailed patterns.
|
|
||||||
|
|
||||||
- [brian](https://github.com/freesewing/brian) : A basic body block for menswear, and the basis for many of our menswear patterns.
|
|
||||||
- [bent](https://github.com/freesewing/bent) : A version of [brian](https://github.com/freesewing/brian) with a two-part sleeve, and the and the basis of our menswear coat and jacket patterns.
|
|
||||||
|
|
||||||
### Menswear
|
|
||||||
|
|
||||||
- [aaron](https://github.com/freesewing/aaron) : A tank top or A-shirt
|
|
||||||
- [bruce](https://github.com/freesewing/bruce) : Boxer briefs
|
|
||||||
- [carlton](https://github.com/freesewing/carlton) : A long coat, perfect for Sherlock Holmes cosplay
|
|
||||||
- [huey](https://github.com/freesewing/huey) : A zip-up hoodie
|
|
||||||
- [hugo](https://github.com/freesewing/hugo) : A hooded sweatshirt with raglan sleeves
|
|
||||||
- [jaeger](https://github.com/freesewing/jaeger) : A sportscoat
|
|
||||||
- [simon](https://github.com/freesewing/simon) : A versatile button-down shirt
|
|
||||||
- [sven](https://github.com/freesewing/sven) : A straightforward sweater
|
|
||||||
- [wahid](https://github.com/freesewing/wahid) : A classic waistcoat
|
|
||||||
|
|
||||||
|
|
||||||
### Womenswear
|
|
||||||
|
|
||||||
- [cathrin](https://github.com/freesewing/cathrin) : An underbust corset or waist trainer
|
|
||||||
- [tamiko](https://github.com/freesewing/tamiko) : A zero-waste top
|
|
||||||
|
|
||||||
### Accessories
|
|
||||||
|
|
||||||
- [trayvon](https://github.com/freesewing/trayvon) : A (neck) tie
|
|
||||||
|
|
||||||
> #### Note: menswear/womenswear has nothing to do with gender
|
|
||||||
>
|
|
||||||
> Freesewing is gender-neutral. When we use the terms **menswear** or **womenswear**
|
|
||||||
> we are not talking about clothes for men or women. It is merely a category of clothing
|
|
||||||
> much like **accessories** or **shoes** are categories.
|
|
||||||
>
|
|
||||||
> The category gives you an idea what to expect, and is there to help you find things.
|
|
||||||
> It is not a limitation, or even a suggestion, of what you can or should wear or make.
|
|
||||||
>
|
|
||||||
> Wear whatever you want, and be proud of the things you make.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
This package has 2 exports:
|
|
||||||
|
|
||||||
- `patterns` : (the default export) An object holding pattern constructors
|
|
||||||
- `patternList` : An array of pattern names
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## About FreeSewing 🤔
|
|
||||||
|
|
||||||
Where the world of makers and developers collide, that's where you'll find FreeSewing.
|
|
||||||
|
|
||||||
Our [core library](https://freesewing.dev/en/freesewing) is a *batteries-included* toolbox
|
|
||||||
for parametric design of sewing patterns. It's a modular system (check our list
|
|
||||||
of [plugins](https://freesewing.dev/en/plugins) and getting started is as simple as:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm init freesewing-pattern
|
|
||||||
```
|
|
||||||
|
|
||||||
The [getting started] section on [freesewing.dev](https://freesewing.dev/) is a good
|
|
||||||
entrypoint to our documentation, but you'll find a lot more there, including
|
|
||||||
our [API documentation](https://freesewing.dev/en/freesewing/api),
|
|
||||||
as well as [examples](https://freesewing.dev/en/freesewing/examples),
|
|
||||||
and [best practices](https://freesewing.dev/en/do).
|
|
||||||
|
|
||||||
If you're a maker, checkout [freesewing.org](https://freesewing/) where you can generate
|
|
||||||
our sewing patterns adapted to your measurements.
|
|
||||||
|
|
||||||
## Support FreeSewing: Become a patron 🥰
|
|
||||||
|
|
||||||
FreeSewing is an open source project run by a community,
|
|
||||||
and financially supported by our patrons.
|
|
||||||
|
|
||||||
If you feel what we do is worthwhile, you too
|
|
||||||
should [become a patron](https://freesewing.org/patrons/join).
|
|
||||||
|
|
||||||
## Links 👩💻
|
|
||||||
|
|
||||||
- 💻 Makers website: [freesewing.org](https://freesewing.org)
|
|
||||||
- 💻 Developers website: [freesewing.dev](https://freesewing.org)
|
|
||||||
- 💬 Chat: [gitter.im/freesewing](https://gitter.im/freesewing/chat)
|
|
||||||
- 🐦 Twitter: [@freesewing_org](https://twitter.com/freesewing_org)
|
|
||||||
- 📷 Instagram: [@freesewing_org](https://instagram.com/freesewing_org)
|
|
||||||
|
|
||||||
## License: MIT 🤓
|
|
||||||
|
|
||||||
© [Joost De Cock](https://github.com/joostdecock).
|
|
||||||
See [the license file](https://github.com/freesewing/freesewing/blob/develop/LICENSE) for details.
|
|
||||||
|
|
||||||
## Where to get help 🤯
|
|
||||||
|
|
||||||
Our [chatroom on Gitter](https://gitter.im/freesewing/chat) is the best place to ask questions,
|
|
||||||
share your feedback, or just hang out.
|
|
||||||
|
|
||||||
If you want to report a problem, please [create an issue](https://github.com/freesewing/freesewing/issues/new).
|
|
|
@ -1,50 +0,0 @@
|
||||||
|
|
||||||
## Included patterns
|
|
||||||
|
|
||||||
### Blocks
|
|
||||||
|
|
||||||
Blocks or slopers are basic patterns shapes that you can extend into fully detailed patterns.
|
|
||||||
|
|
||||||
- [brian](https://github.com/freesewing/brian) : A basic body block for menswear, and the basis for many of our menswear patterns.
|
|
||||||
- [bent](https://github.com/freesewing/bent) : A version of [brian](https://github.com/freesewing/brian) with a two-part sleeve, and the and the basis of our menswear coat and jacket patterns.
|
|
||||||
|
|
||||||
### Menswear
|
|
||||||
|
|
||||||
- [aaron](https://github.com/freesewing/aaron) : A tank top or A-shirt
|
|
||||||
- [bruce](https://github.com/freesewing/bruce) : Boxer briefs
|
|
||||||
- [carlton](https://github.com/freesewing/carlton) : A long coat, perfect for Sherlock Holmes cosplay
|
|
||||||
- [huey](https://github.com/freesewing/huey) : A zip-up hoodie
|
|
||||||
- [hugo](https://github.com/freesewing/hugo) : A hooded sweatshirt with raglan sleeves
|
|
||||||
- [jaeger](https://github.com/freesewing/jaeger) : A sportscoat
|
|
||||||
- [simon](https://github.com/freesewing/simon) : A versatile button-down shirt
|
|
||||||
- [sven](https://github.com/freesewing/sven) : A straightforward sweater
|
|
||||||
- [wahid](https://github.com/freesewing/wahid) : A classic waistcoat
|
|
||||||
|
|
||||||
|
|
||||||
### Womenswear
|
|
||||||
|
|
||||||
- [cathrin](https://github.com/freesewing/cathrin) : An underbust corset or waist trainer
|
|
||||||
- [tamiko](https://github.com/freesewing/tamiko) : A zero-waste top
|
|
||||||
|
|
||||||
### Accessories
|
|
||||||
|
|
||||||
- [trayvon](https://github.com/freesewing/trayvon) : A (neck) tie
|
|
||||||
|
|
||||||
> #### Note: menswear/womenswear has nothing to do with gender
|
|
||||||
>
|
|
||||||
> Freesewing is gender-neutral. When we use the terms **menswear** or **womenswear**
|
|
||||||
> we are not talking about clothes for men or women. It is merely a category of clothing
|
|
||||||
> much like **accessories** or **shoes** are categories.
|
|
||||||
>
|
|
||||||
> The category gives you an idea what to expect, and is there to help you find things.
|
|
||||||
> It is not a limitation, or even a suggestion, of what you can or should wear or make.
|
|
||||||
>
|
|
||||||
> Wear whatever you want, and be proud of the things you make.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
This package has 2 exports:
|
|
||||||
|
|
||||||
- `patterns` : (the default export) An object holding pattern constructors
|
|
||||||
- `patternList` : An array of pattern names
|
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@freesewing/patterns",
|
|
||||||
"version": "2.0.3",
|
|
||||||
"description": "An umbrella package for all FreeSewing patterns",
|
|
||||||
"author": "Joost De Cock <joost@decock.org> (https://github.com/joostdecock)",
|
|
||||||
"homepage": "https://freesewing.org/",
|
|
||||||
"repository": "github:freesewing/freesewing",
|
|
||||||
"license": "MIT",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/freesewing/freesewing/issues"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"freesewing",
|
|
||||||
"bundle",
|
|
||||||
"design",
|
|
||||||
"diy",
|
|
||||||
"fashion",
|
|
||||||
"sewing",
|
|
||||||
"sewing pattern",
|
|
||||||
"parametric design",
|
|
||||||
"made to measure"
|
|
||||||
],
|
|
||||||
"main": "dist/index.js",
|
|
||||||
"module": "dist/index.mjs",
|
|
||||||
"scripts": {
|
|
||||||
"clean": "rimraf dist",
|
|
||||||
"build": "npm run clean && rollup -c",
|
|
||||||
"test": "echo \"patterns: No tests configured. Perhaps you'd like to do this?\" && exit 0",
|
|
||||||
"pubtest": "npm publish --registry http://localhost:6662",
|
|
||||||
"pubforce": "npm publish",
|
|
||||||
"symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -",
|
|
||||||
"start": "rollup -c -w"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@freesewing/core": "^2.0.3",
|
|
||||||
"@freesewing/plugin-bundle": "^2.0.3",
|
|
||||||
"@freesewing/plugin-buttons": "^2.0.3"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@freesewing/aaron": "^2.0.3",
|
|
||||||
"@freesewing/benjamin": "^2.0.3",
|
|
||||||
"@freesewing/bent": "^2.0.3",
|
|
||||||
"@freesewing/brian": "^2.0.3",
|
|
||||||
"@freesewing/bruce": "^2.0.3",
|
|
||||||
"@freesewing/carlita": "^2.0.3",
|
|
||||||
"@freesewing/carlton": "^2.0.3",
|
|
||||||
"@freesewing/cathrin": "^2.0.3",
|
|
||||||
"@freesewing/florent": "^2.0.3",
|
|
||||||
"@freesewing/huey": "^2.0.3",
|
|
||||||
"@freesewing/hugo": "^2.0.3",
|
|
||||||
"@freesewing/jaeger": "^2.0.3",
|
|
||||||
"@freesewing/shin": "^2.0.3",
|
|
||||||
"@freesewing/simon": "^2.0.3",
|
|
||||||
"@freesewing/sven": "^2.0.3",
|
|
||||||
"@freesewing/tamiko": "^2.0.3",
|
|
||||||
"@freesewing/trayvon": "^2.0.3",
|
|
||||||
"@freesewing/wahid": "^2.0.3"
|
|
||||||
},
|
|
||||||
"devDependencies": {},
|
|
||||||
"files": [
|
|
||||||
"dist/*",
|
|
||||||
"README.md",
|
|
||||||
"package.json"
|
|
||||||
],
|
|
||||||
"publishConfig": {
|
|
||||||
"access": "public",
|
|
||||||
"tag": "latest"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8.0.0",
|
|
||||||
"npm": ">=5"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
import babel from "rollup-plugin-babel";
|
|
||||||
import resolve from "rollup-plugin-node-resolve";
|
|
||||||
import commonjs from "rollup-plugin-commonjs";
|
|
||||||
import json from "rollup-plugin-json";
|
|
||||||
import minify from "rollup-plugin-babel-minify";
|
|
||||||
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
|
||||||
import {
|
|
||||||
name,
|
|
||||||
version,
|
|
||||||
description,
|
|
||||||
author,
|
|
||||||
license,
|
|
||||||
main,
|
|
||||||
module
|
|
||||||
} from "./package.json";
|
|
||||||
|
|
||||||
const output = [
|
|
||||||
{
|
|
||||||
file: main,
|
|
||||||
format: "cjs",
|
|
||||||
sourcemap: true
|
|
||||||
}
|
|
||||||
];
|
|
||||||
if (typeof module !== "undefined")
|
|
||||||
output.push({
|
|
||||||
file: module,
|
|
||||||
format: "es",
|
|
||||||
sourcemap: true
|
|
||||||
});
|
|
||||||
|
|
||||||
export default {
|
|
||||||
input: "src/index.js",
|
|
||||||
output,
|
|
||||||
plugins: [
|
|
||||||
peerDepsExternal(),
|
|
||||||
resolve({ modulesOnly: true }),
|
|
||||||
commonjs(),
|
|
||||||
json(),
|
|
||||||
babel({
|
|
||||||
exclude: "node_modules/**",
|
|
||||||
plugins: ["@babel/plugin-proposal-object-rest-spread"]
|
|
||||||
}),
|
|
||||||
minify({
|
|
||||||
comments: false,
|
|
||||||
sourceMap: true,
|
|
||||||
banner: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
|
||||||
})
|
|
||||||
]
|
|
||||||
};
|
|
|
@ -1,20 +0,0 @@
|
||||||
export { default as Aaron } from '@freesewing/aaron'
|
|
||||||
export { default as Benjamin } from '@freesewing/benjamin'
|
|
||||||
export { default as Bent } from '@freesewing/bent'
|
|
||||||
export { default as Brian } from '@freesewing/brian'
|
|
||||||
export { default as Bruce } from '@freesewing/bruce'
|
|
||||||
export { default as Carlita } from '@freesewing/carlita'
|
|
||||||
export { default as Carlton } from '@freesewing/carlton'
|
|
||||||
export { default as Cathrin } from '@freesewing/cathrin'
|
|
||||||
export { default as Florent } from '@freesewing/florent'
|
|
||||||
export { default as Huey } from '@freesewing/huey'
|
|
||||||
export { default as Hugo } from '@freesewing/hugo'
|
|
||||||
export { default as Jaeger } from '@freesewing/jaeger'
|
|
||||||
export { default as Sandy } from '@freesewing/sandy'
|
|
||||||
export { default as Shin } from '@freesewing/shin'
|
|
||||||
export { default as Simon } from '@freesewing/simon'
|
|
||||||
export { default as Sven } from '@freesewing/sven'
|
|
||||||
export { default as Tamiko } from '@freesewing/tamiko'
|
|
||||||
export { default as Theo } from '@freesewing/theo'
|
|
||||||
export { default as Trayvon } from '@freesewing/trayvon'
|
|
||||||
export { default as Wahid } from '@freesewing/wahid'
|
|
|
@ -1,31 +1,102 @@
|
||||||
# penelope
|
<p align="center">
|
||||||
|
<a title="Go to freesewing.org" href="https://freesewing.org/"><img src="https://freesewing.org/img/logo/black.svg" align="center" width="150px" alt="Freesewing logo"/></a>
|
||||||
|
<br>
|
||||||
|
<a href="https://freesewing.org/">FreeSewing v2</a>
|
||||||
|
</p>
|
||||||
|
<p align="center">An open source platform for made-to-measure sewing patterns</p>
|
||||||
|
<p align='center'><a
|
||||||
|
href="https://www.npmjs.com/package/@freesewing/penelope"
|
||||||
|
title="@freesewing/penelope on NPM"
|
||||||
|
><img src="https://img.shields.io/npm/v/@freesewing/penelope.svg"
|
||||||
|
alt="@freesewing/penelope on NPM"/>
|
||||||
|
</a><a
|
||||||
|
href="https://opensource.org/licenses/MIT"
|
||||||
|
title="License: MIT"
|
||||||
|
><img src="https://img.shields.io/npm/l/@freesewing/penelope.svg?label=License"
|
||||||
|
alt="License: MIT"/>
|
||||||
|
</a><a
|
||||||
|
href="https://deepscan.io/dashboard#view=project&tid=2114&pid=2993&bid=23256"
|
||||||
|
title="Code quality on DeepScan"
|
||||||
|
><img src="https://deepscan.io/api/teams/2114/projects/2993/branches/23256/badge/grade.svg"
|
||||||
|
alt="Code quality on DeepScan"/>
|
||||||
|
</a><a
|
||||||
|
href="https://github.com/freesewing/freesewing/issues?q=is%3Aissue+is%3Aopen+label%3Apkg%3Apenelope"
|
||||||
|
title="Open issues tagged pkg:penelope"
|
||||||
|
><img src="https://img.shields.io/github/issues/freesewing/freesewing/pkg:penelope.svg?label=Issues"
|
||||||
|
alt="Open issues tagged pkg:penelope"/>
|
||||||
|
</a></p><p align='center'><a
|
||||||
|
href="https://twitter.com/freesewing_org"
|
||||||
|
title="Follow @freesewing_org on Twitter"
|
||||||
|
><img src="https://img.shields.io/badge/%F3%A0%80%A0-Follow%20us-blue.svg?logo=twitter&logoColor=white&logoWidth=15"
|
||||||
|
alt="Follow @freesewing_org on Twitter"/>
|
||||||
|
</a><a
|
||||||
|
href="https://gitter.im/freesewing/chat"
|
||||||
|
title="Chat with us on Gitter"
|
||||||
|
><img src="https://img.shields.io/badge/%F3%A0%80%A0-Chat%20with%20us-CA0547.svg?logo=gitter&logoColor=white&logoWidth=15"
|
||||||
|
alt="Chat with us on Gitter"/>
|
||||||
|
</a><a
|
||||||
|
href="https://freesewing.org/patrons/join"
|
||||||
|
title="Become a FreeSewing Patron"
|
||||||
|
><img src="https://img.shields.io/badge/%F3%A0%80%A0-Support%20us-blueviolet.svg?logo=cash-app&logoColor=white&logoWidth=15"
|
||||||
|
alt="Become a FreeSewing Patron"/>
|
||||||
|
</a><a
|
||||||
|
href="https://instagram.com/freesewing_org"
|
||||||
|
title="Follow @freesewing_org on Twitter"
|
||||||
|
><img src="https://img.shields.io/badge/%F3%A0%80%A0-Follow%20us-E4405F.svg?logo=instagram&logoColor=white&logoWidth=15"
|
||||||
|
alt="Follow @freesewing_org on Twitter"/>
|
||||||
|
</a></p>
|
||||||
|
|
||||||
> Pencil Skirt
|
# @freesewing/penelope
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/penelope) [](https://standardjs.com)
|
A FreeSewing pattern for a pencil skirt
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
|
## About FreeSewing 🤔
|
||||||
|
|
||||||
|
Where the world of makers and developers collide, that's where you'll find FreeSewing.
|
||||||
|
|
||||||
|
Our [core library](https://freesewing.dev/en/freesewing) is a *batteries-included* toolbox
|
||||||
|
for parametric design of sewing patterns. It's a modular system (check our list
|
||||||
|
of [plugins](https://freesewing.dev/en/plugins) and getting started is as simple as:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install --save penelope
|
npm init freesewing-pattern
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
The [getting started] section on [freesewing.dev](https://freesewing.dev/) is a good
|
||||||
|
entrypoint to our documentation, but you'll find a lot more there, including
|
||||||
|
our [API documentation](https://freesewing.dev/en/freesewing/api),
|
||||||
|
as well as [examples](https://freesewing.dev/en/freesewing/examples),
|
||||||
|
and [best practices](https://freesewing.dev/en/do).
|
||||||
|
|
||||||
```jsx
|
If you're a maker, checkout [freesewing.org](https://freesewing/) where you can generate
|
||||||
import React, { Component } from 'react'
|
our sewing patterns adapted to your measurements.
|
||||||
|
|
||||||
import MyComponent from 'penelope'
|
## Support FreeSewing: Become a patron 🥰
|
||||||
|
|
||||||
class Example extends Component {
|
FreeSewing is an open source project run by a community,
|
||||||
render () {
|
and financially supported by our patrons.
|
||||||
return (
|
|
||||||
<MyComponent />
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## License
|
If you feel what we do is worthwhile, you too
|
||||||
|
should [become a patron](https://freesewing.org/patrons/join).
|
||||||
|
|
||||||
© [woutervdub](https://github.com/woutervdub)
|
## Links 👩💻
|
||||||
|
|
||||||
|
- 💻 Makers website: [freesewing.org](https://freesewing.org)
|
||||||
|
- 💻 Developers website: [freesewing.dev](https://freesewing.org)
|
||||||
|
- 💬 Chat: [gitter.im/freesewing](https://gitter.im/freesewing/chat)
|
||||||
|
- 🐦 Twitter: [@freesewing_org](https://twitter.com/freesewing_org)
|
||||||
|
- 📷 Instagram: [@freesewing_org](https://instagram.com/freesewing_org)
|
||||||
|
|
||||||
|
## License: MIT 🤓
|
||||||
|
|
||||||
|
© [Joost De Cock](https://github.com/joostdecock).
|
||||||
|
See [the license file](https://github.com/freesewing/freesewing/blob/develop/LICENSE) for details.
|
||||||
|
|
||||||
|
## Where to get help 🤯
|
||||||
|
|
||||||
|
Our [chatroom on Gitter](https://gitter.im/freesewing/chat) is the best place to ask questions,
|
||||||
|
share your feedback, or just hang out.
|
||||||
|
|
||||||
|
If you want to report a problem, please [create an issue](https://github.com/freesewing/freesewing/issues/new).
|
||||||
|
|
|
@ -1,59 +1,57 @@
|
||||||
import { version } from "../package.json";
|
import { version } from '../package.json'
|
||||||
|
|
||||||
// ?? 🤔 ?? --> https://en.freesewing.dev/packages/core/config
|
// ?? 🤔 ?? --> https://en.freesewing.dev/packages/core/config
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "penelope",
|
name: 'penelope',
|
||||||
version,
|
version,
|
||||||
design: "woutervdub",
|
design: 'Wouter Van Wageningen',
|
||||||
code: "woutervdub",
|
code: 'Wouter Van Wageningen',
|
||||||
department: "womenswear",
|
department: 'womenswear',
|
||||||
type: "pattern",
|
type: 'pattern',
|
||||||
difficulty: 3,
|
difficulty: 3,
|
||||||
tags: [
|
tags: [
|
||||||
"freesewing",
|
'freesewing',
|
||||||
"design",
|
'design',
|
||||||
"diy",
|
'diy',
|
||||||
"fashion",
|
'fashion',
|
||||||
"made to measure",
|
'made to measure',
|
||||||
"parametric design",
|
'parametric design',
|
||||||
"pattern",
|
'pattern',
|
||||||
"sewing",
|
'sewing',
|
||||||
"sewing pattern"
|
'sewing pattern'
|
||||||
],
|
],
|
||||||
optionGroups: {
|
optionGroups: {
|
||||||
fit: [
|
fit: [
|
||||||
"lengthBonus",
|
'lengthBonus',
|
||||||
"hem",
|
'hem',
|
||||||
"backVent",
|
'backVent',
|
||||||
"backVentLength",
|
'backVentLength',
|
||||||
"waistBand",
|
'waistBand',
|
||||||
"waistBandWidth",
|
'waistBandWidth',
|
||||||
"zipperLocation",
|
'zipperLocation',
|
||||||
"nrOfDarts",
|
'nrOfDarts',
|
||||||
"hemBonus"
|
'hemBonus'
|
||||||
],
|
],
|
||||||
advanced: [
|
advanced: [
|
||||||
"seatEase",
|
'seatEase',
|
||||||
"waistEase",
|
'waistEase',
|
||||||
/*"waistSideSeamRaise",*/
|
'backDartDepthFactor',
|
||||||
"backDartDepthFactor",
|
'frontDartDepthFactor',
|
||||||
"frontDartDepthFactor",
|
'dartToSideSeamFactor'
|
||||||
"dartToSideSeamFactor"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
measurements: [
|
measurements: [
|
||||||
"naturalWaist",
|
'naturalWaist',
|
||||||
/*"hipsCircumference",*/
|
'seatCircumference',
|
||||||
"seatCircumference",
|
'naturalWaistToHip',
|
||||||
"naturalWaistToHip",
|
'naturalWaistToSeat',
|
||||||
"naturalWaistToSeat",
|
'naturalWaistToKnee'
|
||||||
"naturalWaistToKnee"
|
|
||||||
],
|
],
|
||||||
dependencies: {},
|
dependencies: {},
|
||||||
inject: {},
|
inject: {},
|
||||||
hide: [],
|
hide: [],
|
||||||
parts: ["front", "back", "waistband"],
|
parts: ['front', 'back', 'waistband'],
|
||||||
options: {
|
options: {
|
||||||
dartMaximumDifference: 300,
|
dartMaximumDifference: 300,
|
||||||
dartMinimumDifference: 180,
|
dartMinimumDifference: 180,
|
||||||
|
@ -64,7 +62,7 @@ export default {
|
||||||
dartBackControl3: 4,
|
dartBackControl3: 4,
|
||||||
curvePlacement: 2.4,
|
curvePlacement: 2.4,
|
||||||
dart2offset: 32,
|
dart2offset: 32,
|
||||||
dart2factor: 0.80,
|
dart2factor: 0.8,
|
||||||
hipCurveDividerDown: 40,
|
hipCurveDividerDown: 40,
|
||||||
hipCurveDividerUp: 3,
|
hipCurveDividerUp: 3,
|
||||||
sideSeamShiftPercentage: 0.006,
|
sideSeamShiftPercentage: 0.006,
|
||||||
|
@ -78,14 +76,13 @@ export default {
|
||||||
backVentLength: { pct: 40, min: 5, max: 70 },
|
backVentLength: { pct: 40, min: 5, max: 70 },
|
||||||
waistBand: { bool: true },
|
waistBand: { bool: true },
|
||||||
waistBandWidth: { mm: 50, min: 10, max: 200 },
|
waistBandWidth: { mm: 50, min: 10, max: 200 },
|
||||||
zipperLocation: { dflt: "backSeam", list: ["backSeam", "sideSeam"] },
|
zipperLocation: { dflt: 'backSeam', list: ['backSeam', 'sideSeam'] },
|
||||||
nrOfDarts: { count: 2, min: 1, max: 2 },
|
nrOfDarts: { count: 2, min: 1, max: 2 },
|
||||||
|
|
||||||
seatEase: { mm: 5, min: 0, max: 15 },
|
seatEase: { mm: 5, min: 0, max: 15 },
|
||||||
waistEase: { mm: 5, min: 0, max: 15 },
|
waistEase: { mm: 5, min: 0, max: 15 },
|
||||||
/*waistSideSeamRaise: { pct: 0, min: 0, max: 10 },*/
|
|
||||||
backDartDepthFactor: { pct: 50, min: 35, max: 70 },
|
backDartDepthFactor: { pct: 50, min: 35, max: 70 },
|
||||||
frontDartDepthFactor: { pct: 45, min: 30, max: 65 },
|
frontDartDepthFactor: { pct: 45, min: 30, max: 65 },
|
||||||
dartToSideSeamFactor: { pct: 50, min: 30, max: 70 }
|
dartToSideSeamFactor: { pct: 50, min: 30, max: 70 }
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
|
@ -1,29 +1,30 @@
|
||||||
{
|
{
|
||||||
"name": "penelope-example",
|
"name": "penelope-example",
|
||||||
"homepage": "https://woutervdub.github.io/penelope",
|
"homepage": "https://freesewing.github.io/penelope",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@freesewing/components": "beta",
|
"@freesewing/components": "latest",
|
||||||
"@freesewing/core": "beta",
|
"@freesewing/core": "latest",
|
||||||
"@freesewing/css-theme": "beta",
|
"@freesewing/css-theme": "latest",
|
||||||
"@freesewing/i18n": "beta",
|
"@freesewing/i18n": "latest",
|
||||||
"@freesewing/models": "beta",
|
"@freesewing/models": "latest",
|
||||||
"@freesewing/mui-theme": "beta",
|
"@freesewing/mui-theme": "latest",
|
||||||
"@freesewing/pattern-info": "beta",
|
"@freesewing/pattern-info": "latest",
|
||||||
"@freesewing/plugin-bundle": "beta",
|
"@freesewing/plugin-bundle": "latest",
|
||||||
"@freesewing/plugin-i18n": "beta",
|
"@freesewing/plugin-theme": "latest",
|
||||||
"@freesewing/plugin-svgattr": "beta",
|
"@freesewing/plugin-i18n": "latest",
|
||||||
"@freesewing/utils": "beta",
|
"@freesewing/plugin-svgattr": "latest",
|
||||||
"@material-ui/core": "^4.0.1",
|
"@freesewing/utils": "latest",
|
||||||
"@material-ui/icons": "^4.0.1",
|
"@material-ui/core": "^4.4.0",
|
||||||
"@material-ui/lab": "^v4.0.0-alpha.14",
|
"@material-ui/icons": "^4.2.1",
|
||||||
"axios": "^0.19.0",
|
"@material-ui/lab": "^v4.0.0-alpha.25",
|
||||||
"pattern": "file:..",
|
"pattern": "link:..",
|
||||||
"prismjs": "1.16.0",
|
"prismjs": "1.17.1",
|
||||||
"react": "^16.8",
|
"react": "^16.9",
|
||||||
"react-dom": "^16.8",
|
"react-dom": "^16.9",
|
||||||
"react-scripts": "^3.0.0",
|
"react-scripts": "^3.1.1",
|
||||||
|
"file-saver": "^2.0.2",
|
||||||
"typeface-roboto-condensed": "latest"
|
"typeface-roboto-condensed": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -42,6 +43,6 @@
|
||||||
"not op_mini all"
|
"not op_mini all"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-plugin-prismjs": "1.0.2"
|
"babel-plugin-prismjs": "1.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from 'react-dom'
|
||||||
import App from "./App";
|
import App from './App'
|
||||||
import * as serviceWorker from "./serviceWorker";
|
import * as serviceWorker from './serviceWorker'
|
||||||
|
|
||||||
ReactDOM.render(<App />, document.getElementById("root"));
|
ReactDOM.render(<App />, document.getElementById('root'))
|
||||||
|
|
||||||
// If you want your app to work offline and load faster, you can change
|
// If you want your app to work offline and load faster, you can change
|
||||||
// unregister() to register() below. Note this comes with some pitfalls.
|
// unregister() to register() below. Note this comes with some pitfalls.
|
||||||
// Learn more about service workers: http://bit.ly/CRA-PWA
|
// Learn more about service workers: http://bit.ly/CRA-PWA
|
||||||
serviceWorker.unregister();
|
serviceWorker.unregister()
|
||||||
|
|
|
@ -9,46 +9,44 @@
|
||||||
// This link also includes instructions on opting out of this behavior.
|
// This link also includes instructions on opting out of this behavior.
|
||||||
|
|
||||||
const isLocalhost = Boolean(
|
const isLocalhost = Boolean(
|
||||||
window.location.hostname === "localhost" ||
|
window.location.hostname === 'localhost' ||
|
||||||
// [::1] is the IPv6 localhost address.
|
// [::1] is the IPv6 localhost address.
|
||||||
window.location.hostname === "[::1]" ||
|
window.location.hostname === '[::1]' ||
|
||||||
// 127.0.0.1/8 is considered localhost for IPv4.
|
// 127.0.0.1/8 is considered localhost for IPv4.
|
||||||
window.location.hostname.match(
|
window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)
|
||||||
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
)
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
export function register(config) {
|
export function register(config) {
|
||||||
if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) {
|
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
|
||||||
// The URL constructor is available in all browsers that support SW.
|
// The URL constructor is available in all browsers that support SW.
|
||||||
const publicUrl = new URL(process.env.PUBLIC_URL, window.location);
|
const publicUrl = new URL(process.env.PUBLIC_URL, window.location)
|
||||||
if (publicUrl.origin !== window.location.origin) {
|
if (publicUrl.origin !== window.location.origin) {
|
||||||
// Our service worker won't work if PUBLIC_URL is on a different origin
|
// Our service worker won't work if PUBLIC_URL is on a different origin
|
||||||
// from what our page is served on. This might happen if a CDN is used to
|
// from what our page is served on. This might happen if a CDN is used to
|
||||||
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
|
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("load", () => {
|
window.addEventListener('load', () => {
|
||||||
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
|
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`
|
||||||
|
|
||||||
if (isLocalhost) {
|
if (isLocalhost) {
|
||||||
// This is running on localhost. Let's check if a service worker still exists or not.
|
// This is running on localhost. Let's check if a service worker still exists or not.
|
||||||
checkValidServiceWorker(swUrl, config);
|
checkValidServiceWorker(swUrl, config)
|
||||||
|
|
||||||
// Add some additional logging to localhost, pointing developers to the
|
// Add some additional logging to localhost, pointing developers to the
|
||||||
// service worker/PWA documentation.
|
// service worker/PWA documentation.
|
||||||
navigator.serviceWorker.ready.then(() => {
|
navigator.serviceWorker.ready.then(() => {
|
||||||
console.log(
|
console.log(
|
||||||
"This web app is being served cache-first by a service " +
|
'This web app is being served cache-first by a service ' +
|
||||||
"worker. To learn more, visit https://goo.gl/SC7cgQ"
|
'worker. To learn more, visit https://goo.gl/SC7cgQ'
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
// Is not local host. Just register service worker
|
// Is not local host. Just register service worker
|
||||||
registerValidSW(swUrl, config);
|
registerValidSW(swUrl, config)
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,38 +55,38 @@ function registerValidSW(swUrl, config) {
|
||||||
.register(swUrl)
|
.register(swUrl)
|
||||||
.then(registration => {
|
.then(registration => {
|
||||||
registration.onupdatefound = () => {
|
registration.onupdatefound = () => {
|
||||||
const installingWorker = registration.installing;
|
const installingWorker = registration.installing
|
||||||
installingWorker.onstatechange = () => {
|
installingWorker.onstatechange = () => {
|
||||||
if (installingWorker.state === "installed") {
|
if (installingWorker.state === 'installed') {
|
||||||
if (navigator.serviceWorker.controller) {
|
if (navigator.serviceWorker.controller) {
|
||||||
// At this point, the old content will have been purged and
|
// At this point, the old content will have been purged and
|
||||||
// the fresh content will have been added to the cache.
|
// the fresh content will have been added to the cache.
|
||||||
// It's the perfect time to display a "New content is
|
// It's the perfect time to display a "New content is
|
||||||
// available; please refresh." message in your web app.
|
// available; please refresh." message in your web app.
|
||||||
console.log("New content is available; please refresh.");
|
console.log('New content is available; please refresh.')
|
||||||
|
|
||||||
// Execute callback
|
// Execute callback
|
||||||
if (config.onUpdate) {
|
if (config.onUpdate) {
|
||||||
config.onUpdate(registration);
|
config.onUpdate(registration)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// At this point, everything has been precached.
|
// At this point, everything has been precached.
|
||||||
// It's the perfect time to display a
|
// It's the perfect time to display a
|
||||||
// "Content is cached for offline use." message.
|
// "Content is cached for offline use." message.
|
||||||
console.log("Content is cached for offline use.");
|
console.log('Content is cached for offline use.')
|
||||||
|
|
||||||
// Execute callback
|
// Execute callback
|
||||||
if (config.onSuccess) {
|
if (config.onSuccess) {
|
||||||
config.onSuccess(registration);
|
config.onSuccess(registration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error("Error during service worker registration:", error);
|
console.error('Error during service worker registration:', error)
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkValidServiceWorker(swUrl, config) {
|
function checkValidServiceWorker(swUrl, config) {
|
||||||
|
@ -98,30 +96,28 @@ function checkValidServiceWorker(swUrl, config) {
|
||||||
// Ensure service worker exists, and that we really are getting a JS file.
|
// Ensure service worker exists, and that we really are getting a JS file.
|
||||||
if (
|
if (
|
||||||
response.status === 404 ||
|
response.status === 404 ||
|
||||||
response.headers.get("content-type").indexOf("javascript") === -1
|
response.headers.get('content-type').indexOf('javascript') === -1
|
||||||
) {
|
) {
|
||||||
// No service worker found. Probably a different app. Reload the page.
|
// No service worker found. Probably a different app. Reload the page.
|
||||||
navigator.serviceWorker.ready.then(registration => {
|
navigator.serviceWorker.ready.then(registration => {
|
||||||
registration.unregister().then(() => {
|
registration.unregister().then(() => {
|
||||||
window.location.reload();
|
window.location.reload()
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
// Service worker found. Proceed as normal.
|
// Service worker found. Proceed as normal.
|
||||||
registerValidSW(swUrl, config);
|
registerValidSW(swUrl, config)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
console.log(
|
console.log('No internet connection found. App is running in offline mode.')
|
||||||
"No internet connection found. App is running in offline mode."
|
})
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function unregister() {
|
export function unregister() {
|
||||||
if ("serviceWorker" in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
navigator.serviceWorker.ready.then(registration => {
|
navigator.serviceWorker.ready.then(registration => {
|
||||||
registration.unregister();
|
registration.unregister()
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,57 +1,64 @@
|
||||||
{
|
{
|
||||||
"name": "penelope",
|
"name": "@freesewing/penelope",
|
||||||
"version": "0.0.1",
|
"version": "2.0.3",
|
||||||
"description": "Pencil Skirt",
|
"description": "A FreeSewing pattern for a pencil skirt",
|
||||||
"author": "woutervdub",
|
"author": "Joost De Cock <joost@decock.org> (https://github.com/joostdecock)",
|
||||||
|
"homepage": "https://freesewing.org/",
|
||||||
|
"repository": "github:freesewing/freesewing",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "woutervdub/penelope",
|
"bugs": {
|
||||||
|
"url": "https://github.com/freesewing/freesewing/issues"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"freesewing",
|
||||||
|
"design",
|
||||||
|
"diy",
|
||||||
|
"fashion",
|
||||||
|
"made to measure",
|
||||||
|
"parametric design",
|
||||||
|
"pattern",
|
||||||
|
"sewing",
|
||||||
|
"sewing pattern"
|
||||||
|
],
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "dist/index.es.js",
|
"module": "dist/index.mjs",
|
||||||
"jsnext:main": "dist/index.es.js",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8",
|
|
||||||
"npm": ">=5"
|
|
||||||
},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "cross-env CI=1 react-scripts test --env=jsdom",
|
"clean": "rimraf dist",
|
||||||
"test:watch": "react-scripts test --env=jsdom",
|
"build": "npm run clean && rollup -c",
|
||||||
"build": "rollup -c",
|
"test": "echo \"penelope: No tests configured. Perhaps you'd like to do this?\" && exit 0",
|
||||||
|
"pubtest": "npm publish --registry http://localhost:6662",
|
||||||
|
"pubforce": "npm publish",
|
||||||
|
"symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -",
|
||||||
"start": "rollup -c -w",
|
"start": "rollup -c -w",
|
||||||
"prepare": "npm run build",
|
"netlify": "echo \"Not configured yet\""
|
||||||
"predeploy": "cd example && npm install && npm run build",
|
|
||||||
"deploy": "gh-pages -d example/build"
|
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@freesewing/core": "^2.0.3",
|
||||||
|
"@freesewing/plugin-bundle": "^2.0.3"
|
||||||
|
},
|
||||||
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/plugin-proposal-class-properties": "^7.0.0",
|
|
||||||
"@freesewing/components": "^2.0.0-beta.9-2",
|
|
||||||
"@freesewing/core": "^2.0.0-beta.32",
|
|
||||||
"@freesewing/css-theme": "beta",
|
|
||||||
"@freesewing/i18n": "beta",
|
|
||||||
"@freesewing/mui-theme": "beta",
|
|
||||||
"@freesewing/patterns": "beta",
|
|
||||||
"@freesewing/plugin-bundle": "^2.0.0-beta.32",
|
|
||||||
"@freesewing/plugin-bust": "beta",
|
|
||||||
"@freesewing/plugin-buttons": "beta",
|
|
||||||
"@freesewing/plugin-debug": "beta",
|
|
||||||
"@freesewing/plugin-designer": "beta",
|
|
||||||
"@freesewing/plugin-flip": "beta",
|
|
||||||
"@freesewing/utils": "beta",
|
|
||||||
"@material-ui/core": "^3.9.3",
|
|
||||||
"@material-ui/icons": "^3.0.2",
|
|
||||||
"@material-ui/lab": "^3.0.0-alpha.30",
|
|
||||||
"@svgr/rollup": "^2.4.1",
|
|
||||||
"babel-eslint": "10.0.1",
|
|
||||||
"babel-jest": "24.7.1",
|
|
||||||
"cross-env": "^5.1.4",
|
|
||||||
"eslint": "^5.16.0",
|
|
||||||
"gh-pages": "^1.2.0",
|
|
||||||
"jest": "24.7.1",
|
|
||||||
"prop-types": "15.7.2",
|
|
||||||
"react": "^16.8",
|
"react": "^16.8",
|
||||||
"react-dom": "^16.8",
|
"react-dom": "^16.8",
|
||||||
"react-intl": "2.8.0",
|
"@babel/plugin-proposal-class-properties": "^7.0.0",
|
||||||
|
"babel-eslint": "10.0.1",
|
||||||
|
"eslint": "^5.16.0",
|
||||||
|
"babel-jest": "24.7.1",
|
||||||
|
"jest": "24.7.1",
|
||||||
|
"@freesewing/components": "^2.0.3",
|
||||||
|
"@freesewing/css-theme": "^2.0.3",
|
||||||
|
"@freesewing/i18n": "^2.0.3",
|
||||||
|
"@freesewing/mui-theme": "^2.0.3",
|
||||||
|
"@freesewing/plugin-bust": "^2.0.3",
|
||||||
|
"@freesewing/plugin-buttons": "^2.0.3",
|
||||||
|
"@freesewing/plugin-flip": "^2.0.3",
|
||||||
|
"@freesewing/utils": "^2.0.3",
|
||||||
|
"@svgr/rollup": "^2.4.1",
|
||||||
|
"cross-env": "^5.1.4",
|
||||||
|
"gh-pages": "^1.2.0",
|
||||||
"react-scripts": "^3.0.0",
|
"react-scripts": "^3.0.0",
|
||||||
"rollup": "^0.68.2",
|
"webpack": "4.29.6",
|
||||||
|
"rollup": "^0.64.1",
|
||||||
"rollup-plugin-babel": "^4.0.1",
|
"rollup-plugin-babel": "^4.0.1",
|
||||||
"rollup-plugin-babel-minify": "^7.0.0",
|
"rollup-plugin-babel-minify": "^7.0.0",
|
||||||
"rollup-plugin-commonjs": "^9.1.3",
|
"rollup-plugin-commonjs": "^9.1.3",
|
||||||
|
@ -60,15 +67,23 @@
|
||||||
"rollup-plugin-peer-deps-external": "^2.2.0",
|
"rollup-plugin-peer-deps-external": "^2.2.0",
|
||||||
"rollup-plugin-postcss": "^1.6.2",
|
"rollup-plugin-postcss": "^1.6.2",
|
||||||
"rollup-plugin-url": "^1.4.0",
|
"rollup-plugin-url": "^1.4.0",
|
||||||
"webpack": "4.29.6"
|
"@material-ui/core": "4.0.1",
|
||||||
|
"@material-ui/icons": "4.0.1",
|
||||||
|
"@material-ui/lab": "^v4.0.0-alpha.14",
|
||||||
|
"react-intl": "2.8.0",
|
||||||
|
"prop-types": "15.7.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"files": [
|
||||||
"@freesewing/examples": "^2.0.0-beta.32",
|
"dist/*",
|
||||||
"@freesewing/pattern-info": "^2.0.0-beta.32",
|
"README.md",
|
||||||
"@freesewing/rendertest": "^2.0.0-beta.32",
|
"package.json"
|
||||||
"@freesewing/tutorial": "^2.0.0-beta.32",
|
],
|
||||||
"axios": "^0.19.0",
|
"publishConfig": {
|
||||||
"prismjs": "^1.16.0",
|
"access": "public",
|
||||||
"typescript": "^3.5.3"
|
"tag": "latest"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.0.0",
|
||||||
|
"npm": ">=5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { BuildMainShape } from "./shape";
|
import { BuildMainShape } from './shape'
|
||||||
|
|
||||||
export default function(part) {
|
export default function(part) {
|
||||||
let {
|
let {
|
||||||
|
@ -15,43 +15,36 @@ export default function(part) {
|
||||||
sa,
|
sa,
|
||||||
paperless,
|
paperless,
|
||||||
macro
|
macro
|
||||||
} = part.shorthand();
|
} = part.shorthand()
|
||||||
|
|
||||||
BuildMainShape(part, false);
|
BuildMainShape(part, false)
|
||||||
|
|
||||||
if (options.backVent == true) {
|
if (options.backVent == true) {
|
||||||
// I don't care what you're trying to create, the vent will not go higher than your hips.
|
// I don't care what you're trying to create, the vent will not go higher than your hips.
|
||||||
let backVentLength = Math.min(
|
let backVentLength = Math.min(
|
||||||
store.get("skirtLength") - measurements.naturalWaistToHip,
|
store.get('skirtLength') - measurements.naturalWaistToHip,
|
||||||
options.backVentLength * store.get("skirtLength")
|
options.backVentLength * store.get('skirtLength')
|
||||||
);
|
)
|
||||||
console.log({
|
|
||||||
backVentLength: backVentLength,
|
|
||||||
skirtLength: store.get("skirtLength"),
|
|
||||||
OptionsBackVentLength: options.backVentLength
|
|
||||||
});
|
|
||||||
|
|
||||||
points.vLeg = points.lLeg.shift(180, options.backVentWidth);
|
points.vLeg = points.lLeg.shift(180, options.backVentWidth)
|
||||||
points.vHem = points.lHem.shift(180, options.backVentWidth);
|
points.vHem = points.lHem.shift(180, options.backVentWidth)
|
||||||
points.vTop = points.vLeg.shift(90, backVentLength);
|
points.vTop = points.vLeg.shift(90, backVentLength)
|
||||||
points.lVent = points.vTop
|
points.lVent = points.vTop.shift(0, options.backVentWidth).shift(90, options.backVentWidth)
|
||||||
.shift(0, options.backVentWidth)
|
|
||||||
.shift(90, options.backVentWidth);
|
|
||||||
|
|
||||||
paths.vent = new Path()
|
paths.vent = new Path()
|
||||||
.move(points.lVent)
|
.move(points.lVent)
|
||||||
.line(points.vTop)
|
.line(points.vTop)
|
||||||
.line(points.vLeg)
|
.line(points.vLeg)
|
||||||
.line(points.vHem)
|
.line(points.vHem)
|
||||||
.setRender(false);
|
.setRender(false)
|
||||||
|
|
||||||
paths.leftSide = new Path()
|
paths.leftSide = new Path()
|
||||||
.move(points.lWaist)
|
.move(points.lWaist)
|
||||||
.line(points.lVent)
|
.line(points.lVent)
|
||||||
.join(paths.vent)
|
.join(paths.vent)
|
||||||
.setRender(false);
|
.setRender(false)
|
||||||
|
|
||||||
paths.hem = paths.hem.line(points.vLeg);
|
paths.hem = paths.hem.line(points.vLeg)
|
||||||
}
|
}
|
||||||
|
|
||||||
paths.seam = paths.leftSide
|
paths.seam = paths.leftSide
|
||||||
|
@ -59,37 +52,33 @@ export default function(part) {
|
||||||
.join(paths.bottom)
|
.join(paths.bottom)
|
||||||
.join(paths.sideSeam)
|
.join(paths.sideSeam)
|
||||||
.join(paths.waist)
|
.join(paths.waist)
|
||||||
.attr("class", "fabric");
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
macro("grainline", {
|
macro('grainline', {
|
||||||
from: points.grainlineTop,
|
from: points.grainlineTop,
|
||||||
to: points.grainlineBottom
|
to: points.grainlineBottom
|
||||||
});
|
})
|
||||||
|
|
||||||
snippets.logo = new Snippet("logo", points.logoAnchor);
|
snippets.logo = new Snippet('logo', points.logoAnchor)
|
||||||
|
|
||||||
if (options.backVent == false && options.zipperLocation != "backSeam") {
|
if (options.backVent == false && options.zipperLocation != 'backSeam') {
|
||||||
macro("cutonfold", {
|
macro('cutonfold', {
|
||||||
from: points.lWaist,
|
from: points.lWaist,
|
||||||
to: points.lLeg,
|
to: points.lLeg,
|
||||||
margin: 5,
|
margin: 5,
|
||||||
offset: 10
|
offset: 10
|
||||||
});
|
})
|
||||||
macro("title", {
|
|
||||||
at: points.titleAnchor,
|
|
||||||
title: "1x " + "cutOnFold" + " " + "fromFabric"
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
macro("title", {
|
|
||||||
at: points.titleAnchor,
|
|
||||||
title: "2x " + "fromFabric"
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
macro('title', {
|
||||||
|
nr: 2,
|
||||||
|
at: points.titleAnchor,
|
||||||
|
title: 'back'
|
||||||
|
})
|
||||||
|
|
||||||
if (sa) {
|
if (sa) {
|
||||||
if (options.backVent || options.zipperLocation == "backSeam") {
|
if (options.backVent || options.zipperLocation == 'backSeam') {
|
||||||
paths.sa = paths.leftSide
|
paths.sa = paths.leftSide
|
||||||
.clone()
|
.clone()
|
||||||
.join(paths.bottom)
|
.join(paths.bottom)
|
||||||
|
@ -98,7 +87,7 @@ export default function(part) {
|
||||||
.line(points.lWaist)
|
.line(points.lWaist)
|
||||||
.close()
|
.close()
|
||||||
.offset(sa)
|
.offset(sa)
|
||||||
.attr("class", "fabric sa");
|
.attr('class', 'fabric sa')
|
||||||
} else {
|
} else {
|
||||||
paths.sa = new Path()
|
paths.sa = new Path()
|
||||||
.move(points.lHem)
|
.move(points.lHem)
|
||||||
|
@ -109,42 +98,42 @@ export default function(part) {
|
||||||
.offset(sa)
|
.offset(sa)
|
||||||
)
|
)
|
||||||
.line(points.lWaist)
|
.line(points.lWaist)
|
||||||
.attr("class", "fabric sa");
|
.attr('class', 'fabric sa')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
if (options.backVent) {
|
if (options.backVent) {
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.vHem,
|
from: points.vHem,
|
||||||
to: points.rHem,
|
to: points.rHem,
|
||||||
y: points.rHem.y - options.paperlessOffset
|
y: points.rHem.y - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.vTop,
|
from: points.vTop,
|
||||||
to: points.lVent,
|
to: points.lVent,
|
||||||
y: points.vTop.y
|
y: points.vTop.y
|
||||||
});
|
})
|
||||||
|
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.lSeat,
|
from: points.lSeat,
|
||||||
to: points.lVent,
|
to: points.lVent,
|
||||||
x: points.lWaist.x - options.paperlessOffset
|
x: points.lWaist.x - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.lVent,
|
from: points.lVent,
|
||||||
to: points.vTop,
|
to: points.vTop,
|
||||||
x: points.lVent.x
|
x: points.lVent.x
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.lHem,
|
from: points.lHem,
|
||||||
to: points.rHem,
|
to: points.rHem,
|
||||||
y: points.rHem.y - options.paperlessOffset
|
y: points.rHem.y - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return part;
|
return part
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { BuildMainShape } from "./shape";
|
import { BuildMainShape } from './shape'
|
||||||
|
|
||||||
export default function(part) {
|
export default function(part) {
|
||||||
let {
|
let {
|
||||||
|
@ -15,78 +15,39 @@ export default function(part) {
|
||||||
sa,
|
sa,
|
||||||
paperless,
|
paperless,
|
||||||
macro
|
macro
|
||||||
} = part.shorthand();
|
} = part.shorthand()
|
||||||
|
|
||||||
BuildMainShape(part, true);
|
BuildMainShape(part, true)
|
||||||
|
|
||||||
paths.seam = paths.leftSide
|
paths.seam = paths.leftSide
|
||||||
.clone()
|
.clone()
|
||||||
.join(paths.bottom)
|
.join(paths.bottom)
|
||||||
.join(paths.sideSeam)
|
.join(paths.sideSeam)
|
||||||
.join(paths.waist)
|
.join(paths.waist)
|
||||||
.attr("class", "fabric");
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
macro("cutonfold", {
|
macro('cutonfold', {
|
||||||
from: points.lWaist,
|
from: points.lWaist,
|
||||||
to: points.lLeg,
|
to: points.lLeg,
|
||||||
margin: 5,
|
margin: 5,
|
||||||
offset: 10
|
offset: 10
|
||||||
});
|
})
|
||||||
macro("title", {
|
macro('title', {
|
||||||
|
nr: 1,
|
||||||
at: points.titleAnchor,
|
at: points.titleAnchor,
|
||||||
title: "1x " + "cutOnFold" + " " + "fromFabric"
|
title: 'front'
|
||||||
});
|
})
|
||||||
|
macro('grainline', {
|
||||||
/*
|
|
||||||
let so = {
|
|
||||||
from: points.lWaist,
|
|
||||||
to: points.lLeg,
|
|
||||||
margin: 5,
|
|
||||||
offset: -10,
|
|
||||||
prefix: ''
|
|
||||||
};
|
|
||||||
points["cutonfoldFrom" + so.prefix] = so.from.shiftFractionTowards(
|
|
||||||
so.to,
|
|
||||||
so.margin / 100
|
|
||||||
);
|
|
||||||
points["cutonfoldTo" + so.prefix] = so.to.shiftFractionTowards(
|
|
||||||
so.from,
|
|
||||||
so.margin / 100
|
|
||||||
);
|
|
||||||
points["cutonfoldVia1" + so.prefix] = points["cutonfoldFrom" + so.prefix]
|
|
||||||
.shiftTowards(so.from, so.offset)
|
|
||||||
.rotate(-90, points["cutonfoldFrom" + so.prefix]);
|
|
||||||
points["cutonfoldVia2" + so.prefix] = points["cutonfoldTo" + so.prefix]
|
|
||||||
.shiftTowards(so.to, so.offset)
|
|
||||||
.rotate(90, points["cutonfoldTo" + so.prefix]);
|
|
||||||
let text = so.grainline ? "cutOnFoldAndGrainline" : "cutOnFold";
|
|
||||||
paths["cutonfold" + so.prefix] = new this.Path()
|
|
||||||
.move(points["cutonfoldFrom" + so.prefix])
|
|
||||||
.line(points["cutonfoldVia1" + so.prefix])
|
|
||||||
.line(points["cutonfoldVia2" + so.prefix])
|
|
||||||
.line(points["cutonfoldTo" + so.prefix])
|
|
||||||
.attr("class", "note")
|
|
||||||
.attr("marker-start", "url(#cutonfoldFrom)")
|
|
||||||
.attr("marker-end", "url(#cutonfoldTo)")
|
|
||||||
.attr("data-text", text)
|
|
||||||
.attr("data-text-class", "center fill-note");
|
|
||||||
*/
|
|
||||||
|
|
||||||
macro("title", {
|
|
||||||
at: points.titleAnchor,
|
|
||||||
title: "1x " + "cutOnFold" + " " + "fromFabric"
|
|
||||||
});
|
|
||||||
macro("grainline", {
|
|
||||||
from: points.grainlineTop,
|
from: points.grainlineTop,
|
||||||
to: points.grainlineBottom
|
to: points.grainlineBottom
|
||||||
});
|
})
|
||||||
|
|
||||||
points.scaleBox = points.logoAnchor.shift(270, 100);
|
points.scaleBox = points.logoAnchor.shift(270, 100)
|
||||||
macro("scalebox", { at: points.scaleBox });
|
macro('scalebox', { at: points.scaleBox })
|
||||||
|
|
||||||
snippets.logo = new Snippet("logo", points.logoAnchor);
|
snippets.logo = new Snippet('logo', points.logoAnchor)
|
||||||
|
|
||||||
if (sa) {
|
if (sa) {
|
||||||
paths.sa = new Path()
|
paths.sa = new Path()
|
||||||
|
@ -98,17 +59,17 @@ export default function(part) {
|
||||||
.offset(sa)
|
.offset(sa)
|
||||||
)
|
)
|
||||||
.line(points.lWaist)
|
.line(points.lWaist)
|
||||||
.attr("class", "fabric sa");
|
.attr('class', 'fabric sa')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.lHem,
|
from: points.lHem,
|
||||||
to: points.rHem,
|
to: points.rHem,
|
||||||
y: points.rHem.y - options.paperlessOffset
|
y: points.rHem.y - options.paperlessOffset
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return part;
|
return part
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,144 +1,107 @@
|
||||||
import { addDartToCurve, dartCalc } from "./utils";
|
import { addDartToCurve, dartCalc } from './utils'
|
||||||
|
|
||||||
function BuildMainShape(part, frontPart) {
|
function BuildMainShape(part, frontPart) {
|
||||||
let {
|
let {
|
||||||
|
sa,
|
||||||
options,
|
options,
|
||||||
measurements,
|
measurements,
|
||||||
Point,
|
Point,
|
||||||
Path,
|
Path,
|
||||||
points,
|
points,
|
||||||
paths,
|
paths,
|
||||||
/*Snippet,*/
|
|
||||||
/*snippets,*/
|
|
||||||
store,
|
store,
|
||||||
/*complete,*/
|
|
||||||
/*sa,*/
|
|
||||||
paperless,
|
paperless,
|
||||||
macro
|
macro
|
||||||
} = part.shorthand();
|
} = part.shorthand()
|
||||||
|
|
||||||
let skirtLength =
|
let skirtLength = measurements.naturalWaistToKnee * (1 + options.lengthBonus) // + options.hem;
|
||||||
(measurements.naturalWaistToKnee * (1+ options.lengthBonus)); // + options.hem;
|
|
||||||
|
|
||||||
store.set("skirtLength", skirtLength);
|
store.set('skirtLength', skirtLength)
|
||||||
|
|
||||||
let waistEase = options.waistEase;
|
let waistEase = options.waistEase
|
||||||
let seatEase = options.seatEase;
|
let seatEase = options.seatEase
|
||||||
|
|
||||||
let dartDepthFactor = frontPart
|
let dartDepthFactor = frontPart ? options.frontDartDepthFactor : options.backDartDepthFactor
|
||||||
? options.frontDartDepthFactor
|
|
||||||
: options.backDartDepthFactor;
|
|
||||||
|
|
||||||
let waist = measurements.naturalWaist;
|
let waist = measurements.naturalWaist
|
||||||
let seat =
|
let seat = measurements.seatCircumference > waist ? measurements.seatCircumference : waist
|
||||||
measurements.seatCircumference > waist
|
|
||||||
? measurements.seatCircumference
|
|
||||||
: waist;
|
|
||||||
/*let hip =
|
|
||||||
measurements.hipsCircumference > waist
|
|
||||||
? measurements.hipsCircumference
|
|
||||||
: waist;*/
|
|
||||||
|
|
||||||
dartCalc(options, seat, seatEase, waist, waistEase);
|
dartCalc(options, seat, seatEase, waist, waistEase)
|
||||||
|
|
||||||
|
let nrOfDarts = options.nrOfDarts
|
||||||
let nrOfDarts = options.nrOfDarts;
|
let dartSize = options.frontDartSize
|
||||||
let dartSize = options.frontDartSize;
|
|
||||||
if (frontPart == false) {
|
if (frontPart == false) {
|
||||||
dartSize = options.backDartSize;
|
dartSize = options.backDartSize
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dartSize <= 0) {
|
if (dartSize <= 0) {
|
||||||
nrOfDarts = 0;
|
nrOfDarts = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
store.set("nrOfDarts", nrOfDarts);
|
store.set('nrOfDarts', nrOfDarts)
|
||||||
store.set("dartSize", dartSize);
|
store.set('dartSize', dartSize)
|
||||||
|
|
||||||
let sideSeamShift =
|
let sideSeamShift = (frontPart ? -1 : 1) * options.sideSeamShiftPercentage * seat
|
||||||
(frontPart ? -1 : 1) * options.sideSeamShiftPercentage * seat;
|
|
||||||
|
|
||||||
seat += seatEase;
|
seat += seatEase
|
||||||
waist += waistEase;
|
waist += waistEase
|
||||||
|
|
||||||
let sideSeam = seat / 4 + sideSeamShift;
|
let sideSeam = seat / 4 + sideSeamShift
|
||||||
//let hipSeam = hip / 4 + sideSeamShift;
|
|
||||||
|
|
||||||
points.lWaist = new Point(0, 0);
|
points.lWaist = new Point(0, 0)
|
||||||
points.lLeg = new Point(0, skirtLength);
|
points.lLeg = new Point(0, skirtLength)
|
||||||
points.rWaistOriginal = new Point(sideSeam, 0);
|
points.rWaistOriginal = new Point(sideSeam, 0)
|
||||||
points.rLeg = new Point(
|
points.rLeg = new Point(sideSeam + (options.hemBonus * seat) / 10, skirtLength)
|
||||||
sideSeam + (options.hemBonus * seat) / 10,
|
|
||||||
skirtLength
|
|
||||||
);
|
|
||||||
|
|
||||||
points.lSeat = new Point(0, measurements.naturalWaistToSeat);
|
points.lSeat = new Point(0, measurements.naturalWaistToSeat)
|
||||||
points.rSeat = new Point(sideSeam, measurements.naturalWaistToSeat);
|
points.rSeat = new Point(sideSeam, measurements.naturalWaistToSeat)
|
||||||
points.rWaistCPdown = new Point(
|
points.rWaistCPdown = new Point(sideSeam, measurements.naturalWaistToSeat / 3)
|
||||||
sideSeam,
|
points.rSeatCPup = new Point(sideSeam, (measurements.naturalWaistToSeat / 3) * 2)
|
||||||
measurements.naturalWaistToSeat / 3
|
|
||||||
);
|
|
||||||
points.rSeatCPup = new Point(
|
|
||||||
sideSeam,
|
|
||||||
(measurements.naturalWaistToSeat / 3) * 2
|
|
||||||
);
|
|
||||||
points.rSeatCPdown = points.rSeat.shift(
|
points.rSeatCPdown = points.rSeat.shift(
|
||||||
270,
|
270,
|
||||||
((measurements.naturalWaistToSeat - measurements.naturalWaistToHip) *
|
((measurements.naturalWaistToSeat - measurements.naturalWaistToHip) *
|
||||||
Math.abs((options.hemBonus * seat) / 10)) /
|
Math.abs((options.hemBonus * seat) / 10)) /
|
||||||
options.hipCurveDividerDown
|
options.hipCurveDividerDown
|
||||||
);
|
)
|
||||||
//$p->newPoint('pH', $sideSeam, $model->m('naturalWaistToHip') -$this->o('waistSideSeamRise'));
|
//$p->newPoint('pH', $sideSeam, $model->m('naturalWaistToHip') -$this->o('waistSideSeamRise'));
|
||||||
let waistFactor = 0.99;
|
let waistFactor = 0.99
|
||||||
let sideFactor = 0.97;
|
let sideFactor = 0.97
|
||||||
let wdelta = 1;
|
let wdelta = 1
|
||||||
let sdelta = 1;
|
let sdelta = 1
|
||||||
let iteration = 0;
|
let iteration = 0
|
||||||
let waistCurve = null;
|
let waistCurve = null
|
||||||
let waistPath = null;
|
let waistPath = null
|
||||||
let waistPathSA = null;
|
let waistPathSA = null
|
||||||
let waistLength = 0;
|
let waistLength = 0
|
||||||
let sideSeamPath = null;
|
let sideSeamPath = null
|
||||||
let sideSeamLength = 0;
|
let sideSeamLength = 0
|
||||||
let curve1 = null;
|
let curve1 = null
|
||||||
let curve2 = null;
|
let curve2 = null
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (wdelta < -1) {
|
if (wdelta < -1) {
|
||||||
waistFactor *= 0.9995;
|
waistFactor *= 0.9995
|
||||||
} else if (wdelta > 1) {
|
} else if (wdelta > 1) {
|
||||||
waistFactor *= 1.01;
|
waistFactor *= 1.01
|
||||||
}
|
}
|
||||||
if (sdelta < -1) {
|
if (sdelta < -1) {
|
||||||
sideFactor *= 0.995;
|
sideFactor *= 0.995
|
||||||
} else if (sdelta > 1) {
|
} else if (sdelta > 1) {
|
||||||
sideFactor *= 1.01;
|
sideFactor *= 1.01
|
||||||
}
|
}
|
||||||
points.rWaistTemp1 = points.lWaist.shift(0, (waist / 4) * waistFactor);
|
points.rWaistTemp1 = points.lWaist.shift(0, (waist / 4) * waistFactor)
|
||||||
points.rWaistTemp2 = points.rWaistTemp1.shift(0, dartSize * nrOfDarts);
|
points.rWaistTemp2 = points.rWaistTemp1.shift(0, dartSize * nrOfDarts)
|
||||||
points.rWaist = points.rWaistTemp2.shift(90, 16 * sideFactor);
|
points.rWaist = points.rWaistTemp2.shift(90, 16 * sideFactor)
|
||||||
points.lWaistCP = points.lWaist.shift(0, seat / 12);
|
points.lWaistCP = points.lWaist.shift(0, seat / 12)
|
||||||
points.rWaistCPleft = points.rWaist.shift(
|
points.rWaistCPleft = points.rWaist.shift(
|
||||||
points.rWaist.angle(points.rWaistCPdown) - 90,
|
points.rWaist.angle(points.rWaistCPdown) - 90,
|
||||||
waist / 16
|
waist / 16
|
||||||
);
|
)
|
||||||
|
|
||||||
/*
|
|
||||||
console.log(
|
|
||||||
"rWaist: (" +
|
|
||||||
points.rWaist.x.toString() +
|
|
||||||
"," +
|
|
||||||
points.rWaist.y.toString() +
|
|
||||||
") [" +
|
|
||||||
iteration.toString() +
|
|
||||||
"]"
|
|
||||||
);
|
|
||||||
*/
|
|
||||||
|
|
||||||
waistCurve = new Path()
|
waistCurve = new Path()
|
||||||
.move(points.lWaist)
|
.move(points.lWaist)
|
||||||
.curve(points.lWaistCP, points.rWaistCPleft, points.rWaist)
|
.curve(points.lWaistCP, points.rWaistCPleft, points.rWaist)
|
||||||
.setRender(false);
|
.setRender(false)
|
||||||
|
|
||||||
if (nrOfDarts > 0) {
|
if (nrOfDarts > 0) {
|
||||||
curve1 = addDartToCurve(
|
curve1 = addDartToCurve(
|
||||||
|
@ -147,234 +110,217 @@ function BuildMainShape(part, frontPart) {
|
||||||
seat / 4 / options.curvePlacement,
|
seat / 4 / options.curvePlacement,
|
||||||
dartSize,
|
dartSize,
|
||||||
measurements.naturalWaistToSeat * dartDepthFactor
|
measurements.naturalWaistToSeat * dartDepthFactor
|
||||||
);
|
)
|
||||||
waistLength = curve1.left.length();
|
waistLength = curve1.left.length()
|
||||||
points.dart1Start = curve1.dart.start();
|
points.dart1Start = curve1.dart.start()
|
||||||
points.dart1Middle = curve1.dart.ops[1].to;
|
points.dart1Middle = curve1.dart.ops[1].to
|
||||||
points.dart1End = curve1.dart.end();
|
points.dart1End = curve1.dart.end()
|
||||||
if (nrOfDarts > 1) {
|
if (nrOfDarts > 1) {
|
||||||
curve2 = addDartToCurve(
|
curve2 = addDartToCurve(
|
||||||
part,
|
part,
|
||||||
curve1.right,
|
curve1.right,
|
||||||
options.dart2offset,
|
options.dart2offset,
|
||||||
dartSize,
|
dartSize,
|
||||||
measurements.naturalWaistToSeat *
|
measurements.naturalWaistToSeat * dartDepthFactor * options.dart2factor
|
||||||
dartDepthFactor *
|
)
|
||||||
options.dart2factor
|
waistLength += curve2.left.length()
|
||||||
);
|
waistLength += curve2.right.length()
|
||||||
waistLength += curve2.left.length();
|
|
||||||
waistLength += curve2.right.length();
|
|
||||||
waistPath = curve1.left.join(
|
waistPath = curve1.left.join(
|
||||||
curve1.dart.join(curve2.left.join(curve2.dart.join(curve2.right)))
|
curve1.dart.join(curve2.left.join(curve2.dart.join(curve2.right)))
|
||||||
);
|
)
|
||||||
waistPathSA = curve1.left.join(curve2.left.join(curve2.right));
|
waistPathSA = curve1.left.join(curve2.left.join(curve2.right))
|
||||||
points.dart2Start = curve2.dart.start();
|
points.dart2Start = curve2.dart.start()
|
||||||
points.dart2Middle = curve2.dart.ops[1].to;
|
points.dart2Middle = curve2.dart.ops[1].to
|
||||||
points.dart2End = curve2.dart.end();
|
points.dart2End = curve2.dart.end()
|
||||||
} else {
|
} else {
|
||||||
waistLength += curve1.right.length();
|
waistLength += curve1.right.length()
|
||||||
waistPath = curve1.left.join(curve1.dart.join(curve1.right));
|
waistPath = curve1.left.join(curve1.dart.join(curve1.right))
|
||||||
waistPathSA = curve1.left.join(curve1.right);
|
waistPathSA = curve1.left.join(curve1.right)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
waistLength = waistCurve.length();
|
waistLength = waistCurve.length()
|
||||||
waistPath = waistCurve;
|
waistPath = waistCurve
|
||||||
waistPathSA = waistCurve.clone();
|
waistPathSA = waistCurve.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
sideSeamPath = new Path()
|
sideSeamPath = new Path()
|
||||||
.move(points.rLeg)
|
.move(points.rLeg)
|
||||||
//.line(points.rSeat)
|
|
||||||
.curve(points.rLeg, points.rSeatCPdown, points.rSeat)
|
.curve(points.rLeg, points.rSeatCPdown, points.rSeat)
|
||||||
.curve(points.rSeatCPup, points.rWaistCPdown, points.rWaist);
|
.curve(points.rSeatCPup, points.rWaistCPdown, points.rWaist)
|
||||||
|
|
||||||
//console.log(sideSeamPath);
|
wdelta = waist / 4 - waistLength
|
||||||
|
|
||||||
wdelta = waist / 4 - waistLength;
|
if (frontPart) sdelta = 0
|
||||||
|
else {
|
||||||
if (frontPart) {
|
sideSeamLength = sideSeamPath.length()
|
||||||
sdelta = 0;
|
sdelta = store.get('sideSeamLength') - sideSeamLength
|
||||||
} else {
|
|
||||||
sideSeamLength = sideSeamPath.length();
|
|
||||||
sdelta = store.get("sideSeamLength") - sideSeamLength;
|
|
||||||
}
|
}
|
||||||
} while ((Math.abs(wdelta) > 1 || Math.abs(sdelta) > 1) && iteration++ < 100);
|
} while ((Math.abs(wdelta) > 1 || Math.abs(sdelta) > 1) && iteration++ < 100)
|
||||||
|
|
||||||
paths.waist1 = waistCurve.translate(0, 10).attr("class", "lining dashed");
|
paths.waist1 = waistCurve.translate(0, 10).attr('class', 'lining dashed')
|
||||||
|
|
||||||
if (iteration >= 100) {
|
if (iteration >= 100) {
|
||||||
throw "Too many iterations trying to make it fit!";
|
throw 'Too many iterations trying to make it fit!'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frontPart) {
|
if (frontPart) {
|
||||||
sideSeamLength = sideSeamPath.length();
|
sideSeamLength = sideSeamPath.length()
|
||||||
store.set("sideSeamLength", sideSeamLength);
|
store.set('sideSeamLength', sideSeamLength)
|
||||||
}
|
}
|
||||||
|
|
||||||
points.lHem = points.lLeg;
|
points.lHem = points.lLeg
|
||||||
points.rHem = points.rLeg;
|
points.rHem = points.rLeg
|
||||||
|
|
||||||
paths.hem = new Path()
|
paths.hem = new Path()
|
||||||
.move(points.lLeg)
|
.move(points.lLeg)
|
||||||
.line(points.rLeg)
|
.line(points.rLeg)
|
||||||
.attr("class", "fabric stroke-sm")
|
.attr('class', 'fabric stroke-sm')
|
||||||
.setRender(false);
|
.setRender(false)
|
||||||
|
|
||||||
if (options.hem > 0) {
|
if (options.hem > 0) {
|
||||||
// Create the inverse of the curve from the leg to the waist
|
// Create the inverse of the curve from the leg to the waist
|
||||||
// Then split it at the hem level
|
// Then split it at the hem level
|
||||||
points.lHem = points.lLeg.shift(270, options.hem);
|
points.lHem = points.lLeg.shift(270, options.hem)
|
||||||
let rInverseSeat = points.rSeat.shift(
|
let rInverseSeat = points.rSeat.shift(270, (points.rLeg.y - points.rSeat.y) * 2)
|
||||||
270,
|
let rInverseSeatCP = rInverseSeat.shift(90, points.rSeatCPdown.y - points.rSeat.y)
|
||||||
(points.rLeg.y - points.rSeat.y) * 2
|
let rInversePath = new Path().move(rInverseSeat).curve(rInverseSeatCP, points.rLeg, points.rLeg)
|
||||||
);
|
points.rHem = rInversePath.intersectsY(points.lHem.y)[0]
|
||||||
let rInverseSeatCP = rInverseSeat.shift(
|
|
||||||
90,
|
|
||||||
points.rSeatCPdown.y - points.rSeat.y
|
|
||||||
);
|
|
||||||
let rInversePath = new Path()
|
|
||||||
.move(rInverseSeat)
|
|
||||||
.curve(rInverseSeatCP, points.rLeg, points.rLeg);
|
|
||||||
points.rHem = rInversePath.intersectsY(points.lHem.y)[0];
|
|
||||||
|
|
||||||
let sideSeamHemPath = rInversePath.split(points.rHem)[1];
|
let sideSeamHemPath = rInversePath.split(points.rHem)[1]
|
||||||
|
|
||||||
sideSeamPath = sideSeamHemPath.join(sideSeamPath);
|
sideSeamPath = sideSeamHemPath.join(sideSeamPath)
|
||||||
|
|
||||||
paths.hem.setRender(true);
|
paths.hem.setRender(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
paths.leftSide = new Path()
|
paths.leftSide = new Path()
|
||||||
.move(points.lWaist)
|
.move(points.lWaist)
|
||||||
.line(points.lHem)
|
.line(points.lHem)
|
||||||
.setRender(false);
|
.setRender(false)
|
||||||
|
|
||||||
paths.bottom = new Path()
|
paths.bottom = new Path()
|
||||||
.move(points.lHem)
|
.move(points.lHem)
|
||||||
.line(points.rHem)
|
.line(points.rHem)
|
||||||
.setRender(false);
|
.setRender(false)
|
||||||
|
|
||||||
paths.sideSeam = sideSeamPath.setRender(false);
|
paths.sideSeam = sideSeamPath.setRender(false)
|
||||||
|
|
||||||
// Turn the path in the other direction, to comply with the counter-clockwise guideline
|
// Turn the path in the other direction, to comply with the counter-clockwise guideline
|
||||||
paths.waist = waistPath.reverse().setRender(false);
|
paths.waist = waistPath.reverse().setRender(false)
|
||||||
paths.waistSA = waistPathSA.reverse().setRender(false);
|
paths.waistSA = waistPathSA.reverse().setRender(false)
|
||||||
|
|
||||||
points.titleAnchor = new Point(
|
points.titleAnchor = new Point(measurements.naturalWaist / 6, measurements.naturalWaistToSeat)
|
||||||
measurements.naturalWaist / 6,
|
points.logoAnchor = points.titleAnchor.shift(270, 75)
|
||||||
measurements.naturalWaistToSeat
|
|
||||||
);
|
|
||||||
points.logoAnchor = points.titleAnchor.shift(270, 75);
|
|
||||||
|
|
||||||
points.grainlineTop = points.lWaist.shift(0, 50).shift(270, 50);
|
points.grainlineTop = points.lWaist.shift(0, 50).shift(270, 50)
|
||||||
points.grainlineBottom = points.lLeg.shift(0, 50).shift(90, 50);
|
points.grainlineBottom = points.lLeg.shift(0, 50).shift(90, 50)
|
||||||
|
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.lSeat,
|
from: points.lSeat,
|
||||||
to: points.rSeat,
|
to: points.rSeat,
|
||||||
y: points.rSeat.y
|
y: points.rSeat.y
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.lWaist,
|
from: points.lWaist,
|
||||||
to: points.rWaist,
|
to: points.rWaist,
|
||||||
x: points.rWaist.x + options.paperlessOffset
|
x: points.rWaist.x + options.paperlessOffset + sa
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.lWaist,
|
from: points.lWaist,
|
||||||
to: points.lLeg,
|
to: points.lLeg,
|
||||||
x: points.lLeg.x + options.paperlessOffset
|
x: points.lLeg.x + options.paperlessOffset + sa
|
||||||
});
|
})
|
||||||
if (options.hem > 0) {
|
if (options.hem > 0) {
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.lLeg,
|
from: points.lLeg,
|
||||||
to: points.lHem,
|
to: points.lHem,
|
||||||
x: points.lLeg.x + options.paperlessOffset
|
x: points.lLeg.x + options.paperlessOffset + sa
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (store.get("nrOfDarts") > 0) {
|
if (store.get('nrOfDarts') > 0) {
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.lWaist,
|
from: points.lWaist,
|
||||||
to: points.dart1Middle,
|
to: points.dart1Middle,
|
||||||
y: points.dart1Middle.y
|
y: points.dart1Middle.y
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.lWaist,
|
from: points.lWaist,
|
||||||
to: points.dart1Start,
|
to: points.dart1Start,
|
||||||
y: points.dart1Start.y - options.paperlessOffset
|
y: points.dart1Start.y - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.dart1Start,
|
from: points.dart1Start,
|
||||||
to: points.dart1End,
|
to: points.dart1End,
|
||||||
y: points.dart1End.y - options.paperlessOffset
|
y: points.dart1End.y - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
if (store.get("nrOfDarts") > 1) {
|
if (store.get('nrOfDarts') > 1) {
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.lWaist,
|
from: points.lWaist,
|
||||||
to: points.dart2Middle,
|
to: points.dart2Middle,
|
||||||
y: points.dart2Middle.y
|
y: points.dart2Middle.y
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.dart1End,
|
from: points.dart1End,
|
||||||
to: points.dart2Start,
|
to: points.dart2Start,
|
||||||
y: points.dart2Start.y - options.paperlessOffset
|
y: points.dart2Start.y - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.dart2Start,
|
from: points.dart2Start,
|
||||||
to: points.dart2End,
|
to: points.dart2End,
|
||||||
y: points.dart2End.y - options.paperlessOffset
|
y: points.dart2End.y - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.dart2End,
|
from: points.dart2End,
|
||||||
to: points.rWaist,
|
to: points.rWaist,
|
||||||
y: points.rWaist.y - options.paperlessOffset
|
y: points.rWaist.y - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.lWaist,
|
from: points.lWaist,
|
||||||
to: points.dart2Middle,
|
to: points.dart2Middle,
|
||||||
x: points.lWaist.x - options.paperlessOffset
|
x: points.lWaist.x - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.dart2Middle,
|
from: points.dart2Middle,
|
||||||
to: points.dart1Middle,
|
to: points.dart1Middle,
|
||||||
x: points.lWaist.x - options.paperlessOffset
|
x: points.lWaist.x - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.dart1Middle,
|
from: points.dart1Middle,
|
||||||
to: points.lSeat,
|
to: points.lSeat,
|
||||||
x: points.lWaist.x - options.paperlessOffset
|
x: points.lWaist.x - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.lWaist,
|
from: points.lWaist,
|
||||||
to: points.dart1Middle,
|
to: points.dart1Middle,
|
||||||
x: points.lWaist.x - options.paperlessOffset
|
x: points.lWaist.x - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.dart1End,
|
from: points.dart1End,
|
||||||
to: points.rWaist,
|
to: points.rWaist,
|
||||||
y: points.rWaist.y - options.paperlessOffset
|
y: points.rWaist.y - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.dart1Middle,
|
from: points.dart1Middle,
|
||||||
to: points.lSeat,
|
to: points.lSeat,
|
||||||
x: points.lWaist.x - options.paperlessOffset
|
x: points.lWaist.x - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.lWaist,
|
from: points.lWaist,
|
||||||
to: points.rWaist,
|
to: points.rWaist,
|
||||||
y: points.rWaist.y - options.paperlessOffset
|
y: points.rWaist.y - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.lWaist,
|
from: points.lWaist,
|
||||||
to: points.lSeat,
|
to: points.lSeat,
|
||||||
x: points.lWaist.x - options.paperlessOffset
|
x: points.lWaist.x - options.paperlessOffset - sa
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export { BuildMainShape };
|
export { BuildMainShape }
|
||||||
|
|
|
@ -12,22 +12,19 @@ export default function(part) {
|
||||||
sa,
|
sa,
|
||||||
paperless,
|
paperless,
|
||||||
macro
|
macro
|
||||||
} = part.shorthand();
|
} = part.shorthand()
|
||||||
|
|
||||||
let waistEase = options.waistEase;
|
let waistEase = options.waistEase
|
||||||
let waist = measurements.naturalWaist;
|
let waist = measurements.naturalWaist
|
||||||
waist += waistEase;
|
waist += waistEase
|
||||||
|
|
||||||
points.TL = new Point(0, 0);
|
points.TL = new Point(0, 0)
|
||||||
points.BL = new Point(0, waist / 2 + options.waistBandOverlap);
|
points.BL = new Point(0, waist / 2 + options.waistBandOverlap)
|
||||||
points.TR = new Point(options.waistBandWidth, 0);
|
points.TR = new Point(options.waistBandWidth, 0)
|
||||||
points.BR = new Point(
|
points.BR = new Point(options.waistBandWidth, waist / 2 + options.waistBandOverlap)
|
||||||
options.waistBandWidth,
|
|
||||||
waist / 2 + options.waistBandOverlap
|
|
||||||
);
|
|
||||||
|
|
||||||
points.titleAnchor = new Point(options.waistBandWidth / 2, waist / 6);
|
points.titleAnchor = new Point(options.waistBandWidth / 2, waist / 6)
|
||||||
points.logoAnchor = new Point(options.waistBandWidth / 2, waist / 3);
|
points.logoAnchor = new Point(options.waistBandWidth / 2, waist / 3)
|
||||||
|
|
||||||
paths.outline = new Path()
|
paths.outline = new Path()
|
||||||
.move(points.TL)
|
.move(points.TL)
|
||||||
|
@ -36,24 +33,25 @@ export default function(part) {
|
||||||
.line(points.TR)
|
.line(points.TR)
|
||||||
.line(points.TL)
|
.line(points.TL)
|
||||||
.close()
|
.close()
|
||||||
.attr("class", "fabric");
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
macro("cutonfold", {
|
macro('cutonfold', {
|
||||||
from: points.TR,
|
from: points.TR,
|
||||||
to: points.TL,
|
to: points.TL,
|
||||||
margin: 15,
|
margin: 15,
|
||||||
offset: 15,
|
offset: 15,
|
||||||
grainline: true
|
grainline: true
|
||||||
});
|
})
|
||||||
|
|
||||||
snippets.logo = new Snippet("logo", points.logoAnchor);
|
snippets.logo = new Snippet('logo', points.logoAnchor)
|
||||||
|
|
||||||
macro("title", {
|
macro('title', {
|
||||||
|
nr: 3,
|
||||||
at: points.titleAnchor,
|
at: points.titleAnchor,
|
||||||
title: "1x " + "fromFabric"
|
title: 'waistband'
|
||||||
});
|
})
|
||||||
|
|
||||||
if (sa) {
|
if (sa) {
|
||||||
paths.sa = new Path()
|
paths.sa = new Path()
|
||||||
|
@ -67,22 +65,22 @@ export default function(part) {
|
||||||
.offset(sa)
|
.offset(sa)
|
||||||
)
|
)
|
||||||
.line(points.TR)
|
.line(points.TR)
|
||||||
.attr("class", "fabric sa");
|
.attr('class', 'fabric sa')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.TL,
|
from: points.TL,
|
||||||
to: points.BL,
|
to: points.BL,
|
||||||
x: points.TL.x + options.paperlessOffset
|
x: points.TL.x + options.paperlessOffset
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.BL,
|
from: points.BL,
|
||||||
to: points.BR,
|
to: points.BR,
|
||||||
y: points.BR.y - options.paperlessOffset
|
y: points.BR.y - options.paperlessOffset
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return part;
|
return part
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -49,6 +49,13 @@ function useBackend(baseURL, timeout = 10000) {
|
||||||
backend.removeRecipe = (handle, token) => api.delete('/recipes/' + handle, auth(token)) // Remove recipe
|
backend.removeRecipe = (handle, token) => api.delete('/recipes/' + handle, auth(token)) // Remove recipe
|
||||||
backend.saveRecipe = (handle, data, token) => api.put('/recipes/' + handle, data, auth(token)) // Update recipe
|
backend.saveRecipe = (handle, data, token) => api.put('/recipes/' + handle, data, auth(token)) // Update recipe
|
||||||
|
|
||||||
|
// Admin
|
||||||
|
backend.adminSearch = (query, token) => api.post('/admin/search', { query }, auth(token)) // Search users as admin
|
||||||
|
backend.adminSetPatronStatus = (data, token) => api.put('/admin/patron', data, auth(token)) // Set patron status for a user
|
||||||
|
backend.adminSetRole = (data, token) => api.put('/admin/role', data, auth(token)) // Set role for a user
|
||||||
|
backend.adminUnfreeze = (data, token) => api.put('/admin/unfreeze', data, auth(token)) // Unfreeze a user account
|
||||||
|
backend.adminImpersonate = (data, token) => api.post('/admin/impersonate', data, auth(token)) // Impersonate a user
|
||||||
|
|
||||||
return backend
|
return backend
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import freesewing from "@freesewing/core";
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from "@freesewing/components/Workbench";
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import "typeface-roboto-condensed";
|
import 'typeface-roboto-condensed'
|
||||||
import "@freesewing/css-theme";
|
import '@freesewing/css-theme'
|
||||||
|
|
||||||
import Pattern from "pattern";
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
const App = props => {
|
const App = props => {
|
||||||
let instance = new Pattern();
|
let instance = new Pattern()
|
||||||
let config = instance.config;
|
let config = instance.config
|
||||||
return (
|
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
|
||||||
<Workbench
|
}
|
||||||
freesewing={freesewing}
|
|
||||||
Pattern={Pattern}
|
|
||||||
config={config}
|
|
||||||
userLanguage="en"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App
|
||||||
|
|
|
@ -1,48 +1,43 @@
|
||||||
import { version } from "../package.json";
|
import { version } from '../package.json'
|
||||||
|
|
||||||
// ?? 🤔 ?? --> https://en.freesewing.dev/packages/core/config
|
// ?? 🤔 ?? --> https://en.freesewing.dev/packages/core/config
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "waralee",
|
name: 'waralee',
|
||||||
version: "0.0.1",
|
version,
|
||||||
design: "woutervdub",
|
design: 'Wouter Van Wageningen',
|
||||||
code: "woutervdub",
|
code: 'Wouter Van Wageningen',
|
||||||
department: "menswear",
|
department: 'menswear',
|
||||||
type: "pattern",
|
type: 'pattern',
|
||||||
difficulty: 3,
|
difficulty: 3,
|
||||||
tags: [
|
tags: [
|
||||||
"freesewing",
|
'freesewing',
|
||||||
"design",
|
'design',
|
||||||
"diy",
|
'diy',
|
||||||
"fashion",
|
'fashion',
|
||||||
"made to measure",
|
'made to measure',
|
||||||
"parametric design",
|
'parametric design',
|
||||||
"pattern",
|
'pattern',
|
||||||
"sewing",
|
'sewing',
|
||||||
"sewing pattern"
|
'sewing pattern'
|
||||||
],
|
],
|
||||||
optionGroups: {
|
optionGroups: {
|
||||||
fit: ["legShortening", "waistOverlap", "backRaise"],
|
fit: ['legShortening', 'waistOverlap', 'backRaise'],
|
||||||
advanced: [
|
advanced: [
|
||||||
"crotchFront",
|
'crotchFront',
|
||||||
"crotchBack",
|
'crotchBack',
|
||||||
"crotchFactorBackHor",
|
'crotchFactorBackHor',
|
||||||
"crotchFactorBackVer",
|
'crotchFactorBackVer',
|
||||||
"crotchFactorFrontHor",
|
'crotchFactorFrontHor',
|
||||||
"crotchFactorFrontVer",
|
'crotchFactorFrontVer',
|
||||||
"waistRaise"
|
'waistRaise'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
measurements: [
|
measurements: ['seatCircumference', 'inseam', 'seatDepth'],
|
||||||
"hipsCircumference",
|
|
||||||
"seatCircumference",
|
|
||||||
"inseam",
|
|
||||||
"seatDepth"
|
|
||||||
],
|
|
||||||
dependencies: {},
|
dependencies: {},
|
||||||
inject: { pants: "pantsproto", mini: "pantsproto" },
|
inject: { pants: 'pantsproto', mini: 'pantsproto' },
|
||||||
hide: [],
|
hide: [],
|
||||||
parts: ["cutout", "pocket", "backPocket", "facings"],
|
parts: ['cutout', 'pocket', 'backPocket', 'facings'],
|
||||||
options: {
|
options: {
|
||||||
minimizer: 5,
|
minimizer: 5,
|
||||||
frontPocketVerticalOffset: 0.07,
|
frontPocketVerticalOffset: 0.07,
|
||||||
|
@ -68,4 +63,4 @@ export default {
|
||||||
legShortening: { pct: 25, min: -10, max: 50 },
|
legShortening: { pct: 25, min: -10, max: 50 },
|
||||||
backRaise: { pct: 10, min: 0, max: 25 }
|
backRaise: { pct: 10, min: 0, max: 25 }
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
10549
packages/waralee/example/yarn.lock
Normal file
10549
packages/waralee/example/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
|
@ -12,26 +12,21 @@ export default function(part) {
|
||||||
sa,
|
sa,
|
||||||
paperless,
|
paperless,
|
||||||
macro
|
macro
|
||||||
} = part.shorthand();
|
} = part.shorthand()
|
||||||
|
|
||||||
let pocketDepth = options.backPocketDepth;
|
let pocketDepth = options.backPocketDepth
|
||||||
|
|
||||||
points.topLeft = new Point(0, 0);
|
points.topLeft = new Point(0, 0)
|
||||||
points.bottomLeft = points.topLeft.shift(
|
points.bottomLeft = points.topLeft.shift(
|
||||||
270,
|
270,
|
||||||
(pocketDepth + 30) * 2 +
|
(pocketDepth + 30) * 2 + options.backPocketVerticalOffset * measurements.seatDepth
|
||||||
options.backPocketVerticalOffset * measurements.seatDepth
|
)
|
||||||
);
|
|
||||||
|
|
||||||
points.topRight = points.topLeft.shift(
|
points.topRight = points.topLeft.shift(0, options.backPocketSize * measurements.seatDepth + 24)
|
||||||
0,
|
|
||||||
options.backPocketSize * measurements.seatDepth + 24
|
|
||||||
);
|
|
||||||
points.bottomRight = points.topRight.shift(
|
points.bottomRight = points.topRight.shift(
|
||||||
270,
|
270,
|
||||||
(pocketDepth + 30) * 2 +
|
(pocketDepth + 30) * 2 + options.backPocketVerticalOffset * measurements.seatDepth
|
||||||
options.backPocketVerticalOffset * measurements.seatDepth
|
)
|
||||||
);
|
|
||||||
|
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
.move(points.topLeft)
|
.move(points.topLeft)
|
||||||
|
@ -40,37 +35,38 @@ export default function(part) {
|
||||||
.line(points.topRight)
|
.line(points.topRight)
|
||||||
.line(points.topLeft)
|
.line(points.topLeft)
|
||||||
.close()
|
.close()
|
||||||
.attr("class", "fabric");
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
points.title = points.topLeft.shift(270, 75).shift(0, 50);
|
points.title = points.topLeft.shift(270, 75).shift(0, 50)
|
||||||
macro("title", {
|
macro('title', {
|
||||||
|
nr: 4,
|
||||||
at: points.title,
|
at: points.title,
|
||||||
title: "2x " + "fromFabric"
|
title: 'backPocket'
|
||||||
});
|
})
|
||||||
|
|
||||||
points.logo = points.title.shift(270, 75);
|
points.logo = points.title.shift(270, 75)
|
||||||
snippets.logo = new Snippet("logo", points.logo);
|
snippets.logo = new Snippet('logo', points.logo)
|
||||||
points.text = points.logo
|
points.text = points.logo
|
||||||
.shift(-90, 25)
|
.shift(-90, 25)
|
||||||
.attr("data-text", "Waralee")
|
.attr('data-text', 'Waralee')
|
||||||
.attr("data-text-class", "center");
|
.attr('data-text-class', 'center')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paperless?
|
// Paperless?
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.topLeft,
|
from: points.topLeft,
|
||||||
to: points.topRight,
|
to: points.topRight,
|
||||||
y: points.topLeft.y + 15
|
y: points.topLeft.y + 15
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.topLeft,
|
from: points.topLeft,
|
||||||
to: points.bottomLeft,
|
to: points.bottomLeft,
|
||||||
x: points.topLeft.x + 15
|
x: points.topLeft.x + 15
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return part;
|
return part
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { CreateCrotchPoints } from "./util";
|
import { CreateCrotchPoints } from './util'
|
||||||
|
|
||||||
export default function(part) {
|
export default function(part) {
|
||||||
let {
|
let {
|
||||||
|
@ -14,17 +14,17 @@ export default function(part) {
|
||||||
sa,
|
sa,
|
||||||
paperless,
|
paperless,
|
||||||
macro
|
macro
|
||||||
} = part.shorthand();
|
} = part.shorthand()
|
||||||
|
|
||||||
let seatDepth = measurements.seatDepth + (measurements.seatDepth *options.waistRaise );
|
let seatDepth = measurements.seatDepth + measurements.seatDepth * options.waistRaise
|
||||||
|
|
||||||
points.mWaist = new Point(0, 0);
|
points.mWaist = new Point(0, 0)
|
||||||
points.mHip = points.mWaist.shift(270, seatDepth);
|
points.mHip = points.mWaist.shift(270, seatDepth)
|
||||||
|
|
||||||
CreateCrotchPoints(part);
|
CreateCrotchPoints(part)
|
||||||
|
|
||||||
points.mWaist1 = new Point( points.mWaist.x, points.fWaistSide.y );
|
points.mWaist1 = new Point(points.mWaist.x, points.fWaistSide.y)
|
||||||
points.mWaist2 = new Point( points.mWaist.x, points.bWaistSide.y );
|
points.mWaist2 = new Point(points.mWaist.x, points.bWaistSide.y)
|
||||||
|
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
.move(points.mWaist1)
|
.move(points.mWaist1)
|
||||||
|
@ -34,51 +34,52 @@ export default function(part) {
|
||||||
.line(points.mWaist2)
|
.line(points.mWaist2)
|
||||||
.line(points.mWaist1)
|
.line(points.mWaist1)
|
||||||
.close()
|
.close()
|
||||||
.attr("class", "fabric");
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
points.logo = points.mWaist.shift(270, 75);
|
points.logo = points.mWaist.shift(270, 75)
|
||||||
snippets.logo = new Snippet("logo", points.logo);
|
snippets.logo = new Snippet('logo', points.logo)
|
||||||
points.text = points.logo
|
points.title = points.logo.shift(-90, 55)
|
||||||
.shift(-90, 25)
|
macro('title', {
|
||||||
.attr("data-text", "Waralee")
|
nr: 2,
|
||||||
.attr("data-text-class", "center");
|
at: points.title,
|
||||||
|
title: 'cutout'
|
||||||
|
})
|
||||||
|
|
||||||
if (sa) {
|
if (sa) {
|
||||||
paths.seamAlternate = new Path()
|
paths.seamAlternate = new Path()
|
||||||
.move(points.bWaistSide)
|
.move(points.bWaistSide)
|
||||||
.curve(points.bWaistCrotchCP, points.bHipCrotchCP, points.mHip)
|
.curve(points.bWaistCrotchCP, points.bHipCrotchCP, points.mHip)
|
||||||
.curve(points.fHipCrotchCP, points.fWaistCrotchCP, points.fWaistSide);
|
.curve(points.fHipCrotchCP, points.fWaistCrotchCP, points.fWaistSide)
|
||||||
|
|
||||||
paths.sa = paths.seamAlternate.offset(sa).attr("class", "fabric sa");
|
paths.sa = paths.seamAlternate.offset(sa).attr('class', 'fabric sa')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paperless?
|
// Paperless?
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.fWaistSide,
|
from: points.fWaistSide,
|
||||||
to: points.mWaist,
|
to: points.mWaist,
|
||||||
y: points.mWaist.y
|
y: points.mWaist.y
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.mWaist,
|
from: points.mWaist,
|
||||||
to: points.bWaistSide,
|
to: points.bWaistSide,
|
||||||
y: points.mWaist.y
|
y: points.mWaist.y
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.mWaist1,
|
from: points.mWaist1,
|
||||||
to: points.mHip,
|
to: points.mHip,
|
||||||
x: points.mWaist.x
|
x: points.mWaist.x
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.mWaist2,
|
from: points.mWaist2,
|
||||||
to: points.mWaist1,
|
to: points.mWaist1,
|
||||||
x: points.mWaist.x +15
|
x: points.mWaist.x + 15
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return part;
|
return part
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,20 +12,20 @@ export default function(part) {
|
||||||
sa,
|
sa,
|
||||||
paperless,
|
paperless,
|
||||||
macro
|
macro
|
||||||
} = part.shorthand();
|
} = part.shorthand()
|
||||||
|
|
||||||
let frontPocketSize = options.frontPocketSize * measurements.seatDepth;
|
let frontPocketSize = options.frontPocketSize * measurements.seatDepth
|
||||||
let backPocketSize = options.backPocketSize * measurements.seatDepth;
|
let backPocketSize = options.backPocketSize * measurements.seatDepth
|
||||||
|
|
||||||
points.frontTL = new Point(0, 0);
|
points.frontTL = new Point(0, 0)
|
||||||
points.frontTR = points.frontTL.shift(0, frontPocketSize + 24);
|
points.frontTR = points.frontTL.shift(0, frontPocketSize + 24)
|
||||||
points.frontBL = points.frontTL.shift(270, frontPocketSize / 2);
|
points.frontBL = points.frontTL.shift(270, frontPocketSize / 2)
|
||||||
points.frontBR = points.frontTR.shift(270, frontPocketSize / 2);
|
points.frontBR = points.frontTR.shift(270, frontPocketSize / 2)
|
||||||
|
|
||||||
points.backTL = points.frontBL.shift(270, 50);
|
points.backTL = points.frontBL.shift(270, 50)
|
||||||
points.backTR = points.backTL.shift(0, backPocketSize + 24);
|
points.backTR = points.backTL.shift(0, backPocketSize + 24)
|
||||||
points.backBL = points.backTL.shift(270, backPocketSize / 2);
|
points.backBL = points.backTL.shift(270, backPocketSize / 2)
|
||||||
points.backBR = points.backTR.shift(270, backPocketSize / 2);
|
points.backBR = points.backTR.shift(270, backPocketSize / 2)
|
||||||
|
|
||||||
paths.frontSeam = new Path()
|
paths.frontSeam = new Path()
|
||||||
.move(points.frontTL)
|
.move(points.frontTL)
|
||||||
|
@ -34,7 +34,7 @@ export default function(part) {
|
||||||
.line(points.frontTR)
|
.line(points.frontTR)
|
||||||
.line(points.frontTL)
|
.line(points.frontTL)
|
||||||
.close()
|
.close()
|
||||||
.attr("class", "fabric");
|
.attr('class', 'fabric')
|
||||||
paths.backSeam = new Path()
|
paths.backSeam = new Path()
|
||||||
.move(points.backTL)
|
.move(points.backTL)
|
||||||
.line(points.backBL)
|
.line(points.backBL)
|
||||||
|
@ -42,58 +42,62 @@ export default function(part) {
|
||||||
.line(points.backTR)
|
.line(points.backTR)
|
||||||
.line(points.backTL)
|
.line(points.backTL)
|
||||||
.close()
|
.close()
|
||||||
.attr("class", "fabric");
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
points.frontTitle = points.frontTL.shift(270, 15).shift(0, 50);
|
points.frontTitle = points.frontTL.shift(270, 15).shift(0, 50)
|
||||||
macro("title", {
|
macro('title', {
|
||||||
at: points.frontTitle.shift(0,30),
|
nr: 5,
|
||||||
title: "4x fromFabric"
|
at: points.frontTitle.shift(0, 30),
|
||||||
});
|
title: 'frontFacing',
|
||||||
points.frontLogo = points.frontTitle.shift(270, 15);
|
prefix: 'front'
|
||||||
snippets.frontLogo = new Snippet("logo", points.frontLogo).attr("data-scale", 0.4);
|
})
|
||||||
|
points.frontLogo = points.frontTitle.shift(270, 15)
|
||||||
|
snippets.frontLogo = new Snippet('logo', points.frontLogo).attr('data-scale', 0.4)
|
||||||
points.frontText = points.frontLogo
|
points.frontText = points.frontLogo
|
||||||
.shift(-90, 25)
|
.shift(-90, 25)
|
||||||
.attr("data-text", "Waralee")
|
.attr('data-text', 'Waralee')
|
||||||
.attr("data-text-class", "center");
|
.attr('data-text-class', 'center')
|
||||||
|
|
||||||
points.backTitle = points.backTL.shift(270, 15).shift(0, 50);
|
points.backTitle = points.backTL.shift(270, 15).shift(0, 50)
|
||||||
macro("title", {
|
macro('title', {
|
||||||
at: points.backTitle.shift(0,30),
|
nr: 6,
|
||||||
title: "4x fromFabric"
|
at: points.backTitle.shift(0, 30),
|
||||||
});
|
title: 'backFacing',
|
||||||
points.backLogo = points.backTitle.shift(270, 15);
|
prefix: 'back'
|
||||||
snippets.backLogo = new Snippet("logo", points.backLogo).attr("data-scale", 0.4);
|
})
|
||||||
|
points.backLogo = points.backTitle.shift(270, 15)
|
||||||
|
snippets.backLogo = new Snippet('logo', points.backLogo).attr('data-scale', 0.4)
|
||||||
points.backText = points.backLogo
|
points.backText = points.backLogo
|
||||||
.shift(-90, 25)
|
.shift(-90, 25)
|
||||||
.attr("data-text", "Waralee")
|
.attr('data-text', 'Waralee')
|
||||||
.attr("data-text-class", "center");
|
.attr('data-text-class', 'center')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paperless?
|
// Paperless?
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.frontTL,
|
from: points.frontTL,
|
||||||
to: points.frontTR,
|
to: points.frontTR,
|
||||||
y: points.frontTL.y + 15
|
y: points.frontTL.y + 15
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.backTL,
|
from: points.backTL,
|
||||||
to: points.backTR,
|
to: points.backTR,
|
||||||
y: points.backTL.y + 15
|
y: points.backTL.y + 15
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.frontTL,
|
from: points.frontTL,
|
||||||
to: points.frontBL,
|
to: points.frontBL,
|
||||||
x: points.frontTL.x + 15
|
x: points.frontTL.x + 15
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.backTL,
|
from: points.backTL,
|
||||||
to: points.backBL,
|
to: points.backBL,
|
||||||
x: points.backTL.x + 15
|
x: points.backTL.x + 15
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return part;
|
return part
|
||||||
}
|
}
|
||||||
|
|
101
packages/waralee/src/frontfacing.js
Normal file
101
packages/waralee/src/frontfacing.js
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
export default function(part) {
|
||||||
|
let {
|
||||||
|
options,
|
||||||
|
measurements,
|
||||||
|
Point,
|
||||||
|
Path,
|
||||||
|
points,
|
||||||
|
paths,
|
||||||
|
Snippet,
|
||||||
|
snippets,
|
||||||
|
complete,
|
||||||
|
sa,
|
||||||
|
paperless,
|
||||||
|
macro
|
||||||
|
} = part.shorthand()
|
||||||
|
|
||||||
|
let frontPocketSize = options.frontPocketSize * measurements.seatDepth
|
||||||
|
let backPocketSize = options.backPocketSize * measurements.seatDepth
|
||||||
|
|
||||||
|
points.frontTL = new Point(0, 0)
|
||||||
|
points.frontTR = points.frontTL.shift(0, frontPocketSize + 24)
|
||||||
|
points.frontBL = points.frontTL.shift(270, frontPocketSize / 2)
|
||||||
|
points.frontBR = points.frontTR.shift(270, frontPocketSize / 2)
|
||||||
|
|
||||||
|
points.backTL = points.frontBL.shift(270, 50)
|
||||||
|
points.backTR = points.backTL.shift(0, backPocketSize + 24)
|
||||||
|
points.backBL = points.backTL.shift(270, backPocketSize / 2)
|
||||||
|
points.backBR = points.backTR.shift(270, backPocketSize / 2)
|
||||||
|
|
||||||
|
paths.frontSeam = new Path()
|
||||||
|
.move(points.frontTL)
|
||||||
|
.line(points.frontBL)
|
||||||
|
.line(points.frontBR)
|
||||||
|
.line(points.frontTR)
|
||||||
|
.line(points.frontTL)
|
||||||
|
.close()
|
||||||
|
.attr('class', 'fabric')
|
||||||
|
paths.backSeam = new Path()
|
||||||
|
.move(points.backTL)
|
||||||
|
.line(points.backBL)
|
||||||
|
.line(points.backBR)
|
||||||
|
.line(points.backTR)
|
||||||
|
.line(points.backTL)
|
||||||
|
.close()
|
||||||
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
|
// Complete?
|
||||||
|
if (complete) {
|
||||||
|
points.frontTitle = points.frontTL.shift(270, 15).shift(0, 50)
|
||||||
|
macro('title', {
|
||||||
|
nr: 5,
|
||||||
|
at: points.frontTitle.shift(0, 30),
|
||||||
|
title: '4x fromFabric'
|
||||||
|
})
|
||||||
|
points.frontLogo = points.frontTitle.shift(270, 15)
|
||||||
|
snippets.frontLogo = new Snippet('logo', points.frontLogo).attr('data-scale', 0.4)
|
||||||
|
points.frontText = points.frontLogo
|
||||||
|
.shift(-90, 25)
|
||||||
|
.attr('data-text', 'Waralee')
|
||||||
|
.attr('data-text-class', 'center')
|
||||||
|
|
||||||
|
points.backTitle = points.backTL.shift(270, 15).shift(0, 50)
|
||||||
|
macro('title', {
|
||||||
|
nr: 6,
|
||||||
|
at: points.backTitle.shift(0, 30),
|
||||||
|
title: '4x fromFabric'
|
||||||
|
})
|
||||||
|
points.backLogo = points.backTitle.shift(270, 15)
|
||||||
|
snippets.backLogo = new Snippet('logo', points.backLogo).attr('data-scale', 0.4)
|
||||||
|
points.backText = points.backLogo
|
||||||
|
.shift(-90, 25)
|
||||||
|
.attr('data-text', 'Waralee')
|
||||||
|
.attr('data-text-class', 'center')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Paperless?
|
||||||
|
if (paperless) {
|
||||||
|
macro('hd', {
|
||||||
|
from: points.frontTL,
|
||||||
|
to: points.frontTR,
|
||||||
|
y: points.frontTL.y + 15
|
||||||
|
})
|
||||||
|
macro('hd', {
|
||||||
|
from: points.backTL,
|
||||||
|
to: points.backTR,
|
||||||
|
y: points.backTL.y + 15
|
||||||
|
})
|
||||||
|
macro('vd', {
|
||||||
|
from: points.frontTL,
|
||||||
|
to: points.frontBL,
|
||||||
|
x: points.frontTL.x + 15
|
||||||
|
})
|
||||||
|
macro('vd', {
|
||||||
|
from: points.backTL,
|
||||||
|
to: points.backBL,
|
||||||
|
x: points.backTL.x + 15
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return part
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
import { CreateCrotchPoints } from "./util";
|
import { CreateCrotchPoints } from './util'
|
||||||
|
|
||||||
export default function(part) {
|
export default function(part) {
|
||||||
let {
|
let {
|
||||||
|
@ -14,135 +14,125 @@ export default function(part) {
|
||||||
sa,
|
sa,
|
||||||
paperless,
|
paperless,
|
||||||
macro
|
macro
|
||||||
} = part.shorthand();
|
} = part.shorthand()
|
||||||
|
|
||||||
let seatDepth =
|
|
||||||
measurements.seatDepth + measurements.seatDepth * options.waistRaise;
|
|
||||||
let circumference = measurements.seatCircumference;
|
|
||||||
let circumference4 = circumference / 4;
|
|
||||||
|
|
||||||
|
let seatDepth = measurements.seatDepth + measurements.seatDepth * options.waistRaise
|
||||||
|
let circumference = measurements.seatCircumference
|
||||||
|
let circumference4 = circumference / 4
|
||||||
|
|
||||||
paths.waistFoldBack = paths.waistBack
|
paths.waistFoldBack = paths.waistBack
|
||||||
.offset(-1 * options.waistBand)
|
.offset(-1 * options.waistBand)
|
||||||
.attr("class", "fabric stroke-sm");
|
.attr('class', 'fabric stroke-sm')
|
||||||
paths.waistFoldFront = paths.waistFront
|
paths.waistFoldFront = paths.waistFront
|
||||||
.offset(-1 * options.waistBand)
|
.offset(-1 * options.waistBand)
|
||||||
.attr("class", "fabric stroke-sm");
|
.attr('class', 'fabric stroke-sm')
|
||||||
|
|
||||||
paths.frontFold = paths.front
|
|
||||||
.offset(-1 * options.hem)
|
|
||||||
.attr("class", "fabric stroke-sm");
|
|
||||||
paths.legFold = paths.leg
|
|
||||||
.offset(-1 * options.hem)
|
|
||||||
.attr("class", "fabric stroke-sm");
|
|
||||||
paths.backFold = paths.back
|
|
||||||
.offset(-1 * options.hem)
|
|
||||||
.attr("class", "fabric stroke-sm");
|
|
||||||
|
|
||||||
|
|
||||||
|
paths.frontFold = paths.front.offset(-1 * options.hem).attr('class', 'fabric stroke-sm')
|
||||||
|
paths.legFold = paths.leg.offset(-1 * options.hem).attr('class', 'fabric stroke-sm')
|
||||||
|
paths.backFold = paths.back.offset(-1 * options.hem).attr('class', 'fabric stroke-sm')
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
points.logo = points.fWaistFront.shift(270, 400);
|
points.logo = points.fWaistFront.shift(270, 400)
|
||||||
snippets.logo = new Snippet("logo", points.logo);
|
snippets.logo = new Snippet('logo', points.logo)
|
||||||
points.text = points.logo
|
points.title = points.logo.shift(-90, 50)
|
||||||
.shift(-90, 50)
|
macro('title', {
|
||||||
.attr("data-text", "hello")
|
nr: 1,
|
||||||
.attr("data-text-class", "center");
|
at: points.title,
|
||||||
|
title: 'pants'
|
||||||
|
})
|
||||||
|
|
||||||
if (sa) {
|
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
||||||
paths.sa = paths.seam.offset(sa).attr("class", "fabric sa");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paperless?
|
// Paperless?
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.fWaistSide,
|
from: points.fWaistSide,
|
||||||
to: points.mWaist,
|
to: points.mWaist,
|
||||||
y: points.fWaistSide.y
|
y: points.fWaistSide.y
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.fWaistFrontOverlap,
|
from: points.fWaistFrontOverlap,
|
||||||
to: points.mWaist,
|
to: points.mWaist,
|
||||||
y: points.fWaistSide.y - sa - 15
|
y: points.fWaistSide.y - sa - 15
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.mWaist,
|
from: points.mWaist,
|
||||||
to: points.bWaistSide,
|
to: points.bWaistSide,
|
||||||
y: points.bWaistSide.y
|
y: points.bWaistSide.y
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.mWaist,
|
from: points.mWaist,
|
||||||
to: points.bWaistBack,
|
to: points.bWaistBack,
|
||||||
y: points.bWaistSide.y - sa - 15
|
y: points.bWaistSide.y - sa - 15
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.mWaist,
|
from: points.mWaist,
|
||||||
to: points.bWaistBackOverlap,
|
to: points.bWaistBackOverlap,
|
||||||
y: points.bWaistSide.y - sa - 30
|
y: points.bWaistSide.y - sa - 30
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.mWaist,
|
from: points.mWaist,
|
||||||
to: points.mHip,
|
to: points.mHip,
|
||||||
x: points.mWaist.x
|
x: points.mWaist.x
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.bWaistSide,
|
from: points.bWaistSide,
|
||||||
to: points.bWaistBack,
|
to: points.bWaistBack,
|
||||||
x: points.bWaistSide.x + 15
|
x: points.bWaistSide.x + 15
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.bWaistBackOverlap,
|
from: points.bWaistBackOverlap,
|
||||||
to: points.bLegBackOverlap,
|
to: points.bLegBackOverlap,
|
||||||
x: points.bLegBackOverlap.x - 30
|
x: points.bLegBackOverlap.x - 30
|
||||||
});
|
})
|
||||||
|
|
||||||
if (options.frontPocket) {
|
if (options.frontPocket) {
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.fWaistSide,
|
from: points.fWaistSide,
|
||||||
to: points.frontPocketTop,
|
to: points.frontPocketTop,
|
||||||
x: points.frontPocketTop.x
|
x: points.frontPocketTop.x
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.fWaistSide,
|
from: points.fWaistSide,
|
||||||
to: points.frontPocketBottom,
|
to: points.frontPocketBottom,
|
||||||
x: points.frontPocketBottom.x
|
x: points.frontPocketBottom.x
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.frontPocketTop,
|
from: points.frontPocketTop,
|
||||||
to: points.fWaistSide,
|
to: points.fWaistSide,
|
||||||
y: points.frontPocketTop.y
|
y: points.frontPocketTop.y
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.frontPocketBottom,
|
from: points.frontPocketBottom,
|
||||||
to: points.fWaistSide,
|
to: points.fWaistSide,
|
||||||
y: points.frontPocketBottom.y
|
y: points.frontPocketBottom.y
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
if (options.backPocket) {
|
if (options.backPocket) {
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.bWaistSide,
|
from: points.bWaistSide,
|
||||||
to: points.backPocketLeft,
|
to: points.backPocketLeft,
|
||||||
x: points.backPocketLeft.x
|
x: points.backPocketLeft.x
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.bWaistSide,
|
from: points.bWaistSide,
|
||||||
to: points.backPocketRight,
|
to: points.backPocketRight,
|
||||||
x: points.backPocketRight.x
|
x: points.backPocketRight.x
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.bWaistSide,
|
from: points.bWaistSide,
|
||||||
to: points.backPocketLeft,
|
to: points.backPocketLeft,
|
||||||
y: points.backPocketLeft.y
|
y: points.backPocketLeft.y
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.bWaistSide,
|
from: points.bWaistSide,
|
||||||
to: points.backPocketRight,
|
to: points.backPocketRight,
|
||||||
y: points.backPocketRight.y
|
y: points.backPocketRight.y
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return part;
|
return part
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,18 +12,18 @@ export default function(part) {
|
||||||
sa,
|
sa,
|
||||||
paperless,
|
paperless,
|
||||||
macro
|
macro
|
||||||
} = part.shorthand();
|
} = part.shorthand()
|
||||||
|
|
||||||
let pocketDepth = measurements.seatDepth * options.frontPocketDepthFactor;
|
let pocketDepth = measurements.seatDepth * options.frontPocketDepthFactor
|
||||||
|
|
||||||
points.topLeft = new Point(0, 0);
|
points.topLeft = new Point(0, 0)
|
||||||
points.bottomLeft = points.topLeft.shift(270, pocketDepth);
|
points.bottomLeft = points.topLeft.shift(270, pocketDepth)
|
||||||
|
|
||||||
points.topRight = points.topLeft.shift(0, pocketDepth * (1 / 3));
|
points.topRight = points.topLeft.shift(0, pocketDepth * (1 / 3))
|
||||||
points.bottomRight = points.topRight.shift(290, pocketDepth *(5/6));
|
points.bottomRight = points.topRight.shift(290, pocketDepth * (5 / 6))
|
||||||
|
|
||||||
points.bottomLeftCP = points.bottomLeft.shift(0, pocketDepth * (1 / 6));
|
points.bottomLeftCP = points.bottomLeft.shift(0, pocketDepth * (1 / 6))
|
||||||
points.bottomRightCP = points.bottomRight.shift(225, pocketDepth * (1 / 4));
|
points.bottomRightCP = points.bottomRight.shift(225, pocketDepth * (1 / 4))
|
||||||
|
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
.move(points.topLeft)
|
.move(points.topLeft)
|
||||||
|
@ -32,72 +32,74 @@ export default function(part) {
|
||||||
.line(points.topRight)
|
.line(points.topRight)
|
||||||
.line(points.topLeft)
|
.line(points.topLeft)
|
||||||
.close()
|
.close()
|
||||||
.attr("class", "fabric");
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
macro("cutonfold", {
|
macro('cutonfold', {
|
||||||
from: points.topLeft,
|
from: points.topLeft,
|
||||||
to: points.bottomLeft,
|
to: points.bottomLeft,
|
||||||
margin: 5,
|
margin: 5,
|
||||||
offset: 10
|
offset: 10
|
||||||
});
|
})
|
||||||
points.title = points.topLeft.shift(270, 75).shift(0, 50);
|
points.title = points.topLeft.shift(270, 75).shift(0, 50)
|
||||||
macro("title", {
|
macro('title', {
|
||||||
|
nr: 3,
|
||||||
at: points.title,
|
at: points.title,
|
||||||
title: "1x " + "cutOnFold" + " " + "fromFabric"
|
title: 'pocket'
|
||||||
});
|
})
|
||||||
|
|
||||||
points.logo = points.title.shift(270, 75);
|
points.logo = points.title.shift(270, 75)
|
||||||
snippets.logo = new Snippet("logo", points.logo);
|
snippets.logo = new Snippet('logo', points.logo)
|
||||||
points.text = points.logo
|
points.text = points.logo
|
||||||
.shift(-90, 25)
|
.shift(-90, 25)
|
||||||
.attr("data-text", "Waralee")
|
.attr('data-text', 'Waralee')
|
||||||
.attr("data-text-class", "center");
|
.attr('data-text-class', 'center')
|
||||||
|
|
||||||
if (sa) {
|
if (sa) {
|
||||||
paths.sa = new Path()
|
paths.sa = new Path()
|
||||||
.move(points.bottomLeft)
|
|
||||||
.join( new Path()
|
|
||||||
.move(points.bottomLeft)
|
.move(points.bottomLeft)
|
||||||
.curve(points.bottomLeftCP, points.bottomRightCP, points.bottomRight)
|
.join(
|
||||||
.line(points.topRight)
|
new Path()
|
||||||
|
.move(points.bottomLeft)
|
||||||
|
.curve(points.bottomLeftCP, points.bottomRightCP, points.bottomRight)
|
||||||
|
.line(points.topRight)
|
||||||
|
.line(points.topLeft)
|
||||||
|
.offset(sa)
|
||||||
|
)
|
||||||
.line(points.topLeft)
|
.line(points.topLeft)
|
||||||
.offset(sa)
|
.attr('class', 'fabric sa')
|
||||||
)
|
|
||||||
.line(points.topLeft)
|
|
||||||
.attr("class", "fabric sa");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paperless?
|
// Paperless?
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.topLeft,
|
from: points.topLeft,
|
||||||
to: points.topRight,
|
to: points.topRight,
|
||||||
y: points.topLeft.y + 15
|
y: points.topLeft.y + 15
|
||||||
});
|
})
|
||||||
macro("hd", {
|
macro('hd', {
|
||||||
from: points.bottomLeft,
|
from: points.bottomLeft,
|
||||||
to: points.bottomRight,
|
to: points.bottomRight,
|
||||||
y: points.bottomRight.y
|
y: points.bottomRight.y
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.topLeft,
|
from: points.topLeft,
|
||||||
to: points.bottomLeft,
|
to: points.bottomLeft,
|
||||||
x: points.topLeft.x + 15
|
x: points.topLeft.x + 15
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.topRight,
|
from: points.topRight,
|
||||||
to: points.bottomRight,
|
to: points.bottomRight,
|
||||||
x: points.bottomRight.x
|
x: points.bottomRight.x
|
||||||
});
|
})
|
||||||
macro("vd", {
|
macro('vd', {
|
||||||
from: points.bottomRight,
|
from: points.bottomRight,
|
||||||
to: points.bottomLeft,
|
to: points.bottomLeft,
|
||||||
x: points.bottomRight.x
|
x: points.bottomRight.x
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return part;
|
return part
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue