sparkles: Spit up front right based on settings
This commit is contained in:
parent
f72ddf53cb
commit
275a1611f9
14 changed files with 2343 additions and 1928 deletions
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"plugins": ["transform-object-rest-spread"]
|
|
||||||
}
|
|
71
packages/simon/:w
Normal file
71
packages/simon/:w
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
|
||||||
|
export default part => {
|
||||||
|
// prettier-ignore
|
||||||
|
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||||
|
|
||||||
|
let width = options.buttonPlacketWidth;
|
||||||
|
if(options.buttonHoleType === "seperate") {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
points.placketTopIn = utils.lineIntersectsCurve(
|
||||||
|
new Point(width/-2, points.cfNeck.y+20),
|
||||||
|
new Point(width/-2, points.cfNeck.y-20),
|
||||||
|
points.cfNeck,
|
||||||
|
points.cfNeckCp1,
|
||||||
|
points.neckCp2Front,
|
||||||
|
points.neck
|
||||||
|
);
|
||||||
|
points.placketTopOut = points.cfNeck.shift(0, width/2);
|
||||||
|
points.placketTopEdge = points.cfNeck.shift(0, width * 1.5);
|
||||||
|
points.placketBottomIn = points.cfHem.shift(180, width/2);
|
||||||
|
points.placketBottomOut = points.cfHem.shift(0, width/2);
|
||||||
|
points.placketBottomEdge = points.cfHem.shift(0, width * 1.5);
|
||||||
|
|
||||||
|
paths.seam
|
||||||
|
.line(points.placketTopEdge)
|
||||||
|
.line(points.placketBottomEdge)
|
||||||
|
.line(points.cfHem)
|
||||||
|
.close();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Complete pattern?
|
||||||
|
if (complete) {
|
||||||
|
paths.frontCenter = new Path()
|
||||||
|
.move(points.cfNeck)
|
||||||
|
.line(points.cfHem)
|
||||||
|
.attr("class", "help");
|
||||||
|
paths.placketInnerFold = new Path()
|
||||||
|
.move(points.placketTopIn)
|
||||||
|
.line(points.placketBottomIn)
|
||||||
|
.attr("class", "dotted");
|
||||||
|
paths.placketOuterFold = new Path()
|
||||||
|
.move(points.placketTopOut)
|
||||||
|
.line(points.placketBottomOut)
|
||||||
|
.attr("class", "dotted");
|
||||||
|
macro("sprinkle", {
|
||||||
|
snippet: "notch",
|
||||||
|
on: ["placketTopIn", "placketTopOut", "cfNeck", "placketBottomIn", "placketBottomOut", "cfHem"]
|
||||||
|
});
|
||||||
|
|
||||||
|
let len = points.cfNeck.dist(points.cfHips) * ( 1 - options.buttonFreeLength );
|
||||||
|
for (let i=1; i<=options.buttons; i++) {
|
||||||
|
points["button"+i] = points.cfNeck.shift(-90, len / options.buttons * i);
|
||||||
|
snippets["button"+i] = new Snippet("button", points["button"+i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sa) {
|
||||||
|
paths.saFromArmhole
|
||||||
|
.line(new Point(points.placketTopEdge.x + sa, points.placketTopEdge.y - sa))
|
||||||
|
.line(new Point(points.placketBottomEdge.x + sa, points.placketBottomEdge.y + sa*3))
|
||||||
|
.line(paths.hemSa.start());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Paperless?
|
||||||
|
if (paperless) {
|
||||||
|
}
|
||||||
|
|
||||||
|
return part;
|
||||||
|
};
|
|
@ -1,7 +1,8 @@
|
||||||
const yesNo = ["yes", "no"];
|
import { version } from "../package.json";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "simon",
|
name: "simon",
|
||||||
|
version,
|
||||||
measurements: [
|
measurements: [
|
||||||
"bicepsCircumference",
|
"bicepsCircumference",
|
||||||
"centerBackNeckToWaist",
|
"centerBackNeckToWaist",
|
||||||
|
@ -14,25 +15,23 @@ export default {
|
||||||
"hipsCircumference",
|
"hipsCircumference",
|
||||||
"shoulderToElbow",
|
"shoulderToElbow",
|
||||||
"shoulderToWrist",
|
"shoulderToWrist",
|
||||||
"wristCircumference",
|
"wristCircumference"
|
||||||
],
|
],
|
||||||
dependencies: {
|
dependencies: {
|
||||||
frontBase: "base",
|
frontBase: "base",
|
||||||
backBase: "base",
|
backBase: "base",
|
||||||
back: "backBase",
|
back: "backBase",
|
||||||
front: "frontBase",
|
front: "frontBase",
|
||||||
|
frontRight: "front"
|
||||||
},
|
},
|
||||||
inject: {
|
inject: {
|
||||||
frontBase: "base",
|
frontBase: "base",
|
||||||
backBase: "base",
|
backBase: "base",
|
||||||
back: "backBase",
|
back: "backBase",
|
||||||
front: "frontBase",
|
front: "frontBase",
|
||||||
|
frontRight: "front"
|
||||||
},
|
},
|
||||||
hide: [
|
hide: ["base", "frontBase", "backBase"],
|
||||||
"base",
|
|
||||||
"frontBase",
|
|
||||||
"backBase"
|
|
||||||
],
|
|
||||||
options: {
|
options: {
|
||||||
// Constants
|
// Constants
|
||||||
collarFactor: 5,
|
collarFactor: 5,
|
||||||
|
@ -41,7 +40,6 @@ export default {
|
||||||
|
|
||||||
// Toggles
|
// Toggles
|
||||||
|
|
||||||
|
|
||||||
// Lists
|
// Lists
|
||||||
extraTopButton: {
|
extraTopButton: {
|
||||||
list: ["yes", "no"],
|
list: ["yes", "no"],
|
||||||
|
@ -56,24 +54,24 @@ export default {
|
||||||
dflt: "yes"
|
dflt: "yes"
|
||||||
},
|
},
|
||||||
hemStyle: {
|
hemStyle: {
|
||||||
list: ["straight", "baseball", "slashed"],
|
list: ["straight", "baseball", "slashed"],
|
||||||
dflt: "straight"
|
dflt: "straight"
|
||||||
},
|
},
|
||||||
buttonPlacketType: {
|
buttonPlacketType: {
|
||||||
list: ['cutOn', 'seperate'],
|
list: ["cutOn", "seperate"],
|
||||||
dflt: 'cutOn'
|
dflt: "cutOn"
|
||||||
},
|
},
|
||||||
buttonPlacketStyle: {
|
buttonPlacketStyle: {
|
||||||
list: ['classic', 'seamless'],
|
list: ["classic", "seamless"],
|
||||||
dflt: 'classic'
|
dflt: "classic"
|
||||||
},
|
},
|
||||||
buttonholePlacketType: {
|
buttonholePlacketType: {
|
||||||
list: ['cutOn', 'seperate'],
|
list: ["cutOn", "seperate"],
|
||||||
dflt: 'cutOn'
|
dflt: "cutOn"
|
||||||
},
|
},
|
||||||
buttonholePlacketStyle: {
|
buttonholePlacketStyle: {
|
||||||
list: ['classic', 'seamless'],
|
list: ["classic", "seamless"],
|
||||||
dflt: 'seamless'
|
dflt: "seamless"
|
||||||
},
|
},
|
||||||
cuffStyle: {
|
cuffStyle: {
|
||||||
list: [
|
list: [
|
||||||
|
@ -88,64 +86,64 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// Counters
|
// Counters
|
||||||
buttons: { count: 7, min: 4, max: 12 },
|
buttons: { count: 7, min: 4, max: 12 },
|
||||||
cuffButtonRows: { count: 1, min: 1, max: 2 },
|
cuffButtonRows: { count: 1, min: 1, max: 2 },
|
||||||
|
|
||||||
// Angles
|
// Angles
|
||||||
collarAngle: { deg: 85, min: 60, max: 130 },
|
collarAngle: { deg: 85, min: 60, max: 130 },
|
||||||
|
|
||||||
// Millimeter
|
// Millimeter
|
||||||
buttonPlacketWidth: { mm: 20, min: 10, max: 30 },
|
buttonPlacketWidth: { mm: 20, min: 10, max: 30 },
|
||||||
buttonholePlacketWidth: { mm: 35, min: 20, max: 45 },
|
buttonholePlacketWidth: { mm: 35, min: 20, max: 45 },
|
||||||
buttonholePlacketFoldWidth: { mm: 6, min: 3, max: 10 },
|
buttonholePlacketFoldWidth: { mm: 6, min: 3, max: 10 },
|
||||||
collarStandWidth: { mm: 35, min: 15, max: 60 },
|
collarStandWidth: { mm: 35, min: 15, max: 60 },
|
||||||
sleevePlacketWidth: { mm: 25, min: 15, max: 35 },
|
sleevePlacketWidth: { mm: 25, min: 15, max: 35 },
|
||||||
|
|
||||||
// Percentages
|
// Percentages
|
||||||
acrossBackFactor: { pct: 97, min: 93, max: 100 },
|
acrossBackFactor: { pct: 97, min: 93, max: 100 },
|
||||||
armholeDepthFactor: { pct: 60, min: 50, max: 70 },
|
armholeDepthFactor: { pct: 60, min: 50, max: 70 },
|
||||||
backNeckCutout: { pct: 5, min: 2, max: 8 },
|
backNeckCutout: { pct: 5, min: 2, max: 8 },
|
||||||
bicepsEase: { pct: 15, min: 0, max: 50 },
|
bicepsEase: { pct: 15, min: 0, max: 50 },
|
||||||
buttonFreeLength: { pct: 15, min: 0, max: 50 },
|
buttonFreeLength: { pct: 2, min: 0, max: 15 },
|
||||||
chestEase: { pct: 8, min: -4, max: 20 },
|
chestEase: { pct: 8, min: -4, max: 20 },
|
||||||
collarBend: { pct: 5, min: 0, max: 10 },
|
collarBend: { pct: 5, min: 0, max: 10 },
|
||||||
collarEase: { pct: 3.5, min: 0, max: 10 },
|
collarEase: { pct: 3.5, min: 0, max: 10 },
|
||||||
collarFlare: { pct: 3, min: 0, max: 6 },
|
collarFlare: { pct: 3, min: 0, max: 6 },
|
||||||
collarGap: { pct: 3, min: 0, max: 6 },
|
collarGap: { pct: 3, min: 0, max: 6 },
|
||||||
collarRoll: { pct: 3, min: 0, max: 6 },
|
collarRoll: { pct: 3, min: 0, max: 6 },
|
||||||
collarStandBend: { pct: 5, min: 0, max: 10 },
|
collarStandBend: { pct: 5, min: 0, max: 10 },
|
||||||
collarStandCurve: { pct: 5, min: 0, max: 10 },
|
collarStandCurve: { pct: 5, min: 0, max: 10 },
|
||||||
cuffDrape: { pct: 10, min: 0, max: 20 },
|
cuffDrape: { pct: 10, min: 0, max: 20 },
|
||||||
cuffEase: { pct: 20, min: 0, max: 200 },
|
cuffEase: { pct: 20, min: 0, max: 200 },
|
||||||
cuffLength: { pct: 5, min: 3, max: 10 },
|
cuffLength: { pct: 5, min: 3, max: 10 },
|
||||||
frontArmholeDeeper: { pct: 0.5, min: 0, max: 1.5 },
|
frontArmholeDeeper: { pct: 0.5, min: 0, max: 1.5 },
|
||||||
hemCurve: { pct: 75, min: 25, max: 100 },
|
hemCurve: { pct: 75, min: 25, max: 100 },
|
||||||
hipsEase: { pct: 8, min: -4, max: 20 },
|
hipsEase: { pct: 8, min: -4, max: 20 },
|
||||||
hipsFlare: { pct: 3, min: 0, max: 5 },
|
hipsFlare: { pct: 3, min: 0, max: 5 },
|
||||||
lengthBonus: { pct: 0, min: -4, max: 60 },
|
lengthBonus: { pct: 0, min: -4, max: 60 },
|
||||||
shoulderEase: { pct: 0, min: -2, max: 6 },
|
shoulderEase: { pct: 0, min: -2, max: 6 },
|
||||||
shoulderSlopeReduction: { pct: 0, min: 0, max: 8 },
|
shoulderSlopeReduction: { pct: 0, min: 0, max: 8 },
|
||||||
sleevecapEase: { pct: 1, min: 0, max: 10 },
|
sleevecapEase: { pct: 1, min: 0, max: 10 },
|
||||||
sleevecapBackFactorX: { pct: 60, min: 35, max: 65 },
|
sleevecapBackFactorX: { pct: 60, min: 35, max: 65 },
|
||||||
sleevecapBackFactorY: { pct: 33, min: 35, max: 65 },
|
sleevecapBackFactorY: { pct: 33, min: 35, max: 65 },
|
||||||
sleevecapFrontFactorX: { pct: 55, min: 35, max: 65 },
|
sleevecapFrontFactorX: { pct: 55, min: 35, max: 65 },
|
||||||
sleevecapFrontFactorY: { pct: 33, min: 35, max: 65 },
|
sleevecapFrontFactorY: { pct: 33, min: 35, max: 65 },
|
||||||
sleevecapQ1Offset: { pct: 3, min: 0, max: 7 },
|
sleevecapQ1Offset: { pct: 3, min: 0, max: 7 },
|
||||||
sleevecapQ2Offset: { pct: 5.5, min: 0, max: 7 },
|
sleevecapQ2Offset: { pct: 5.5, min: 0, max: 7 },
|
||||||
sleevecapQ3Offset: { pct: 4.5, min: 0, max: 7 },
|
sleevecapQ3Offset: { pct: 4.5, min: 0, max: 7 },
|
||||||
sleevecapQ4Offset: { pct: 1, min: 0, max: 7 },
|
sleevecapQ4Offset: { pct: 1, min: 0, max: 7 },
|
||||||
sleevecapQ1Spread1: { pct: 6, min: 4, max: 20 },
|
sleevecapQ1Spread1: { pct: 6, min: 4, max: 20 },
|
||||||
sleevecapQ1Spread2: { pct: 15, min: 4, max: 20 },
|
sleevecapQ1Spread2: { pct: 15, min: 4, max: 20 },
|
||||||
sleevecapQ2Spread1: { pct: 15, min: 4, max: 20 },
|
sleevecapQ2Spread1: { pct: 15, min: 4, max: 20 },
|
||||||
sleevecapQ2Spread2: { pct: 10, min: 4, max: 20 },
|
sleevecapQ2Spread2: { pct: 10, min: 4, max: 20 },
|
||||||
sleevecapQ3Spread1: { pct: 10, min: 4, max: 20 },
|
sleevecapQ3Spread1: { pct: 10, min: 4, max: 20 },
|
||||||
sleevecapQ3Spread2: { pct: 8, min: 4, max: 20 },
|
sleevecapQ3Spread2: { pct: 8, min: 4, max: 20 },
|
||||||
sleevecapQ4Spread1: { pct: 7, min: 4, max: 20 },
|
sleevecapQ4Spread1: { pct: 7, min: 4, max: 20 },
|
||||||
sleevecapQ4Spread2: { pct: 7, min: 4, max: 20 },
|
sleevecapQ4Spread2: { pct: 7, min: 4, max: 20 },
|
||||||
sleeveWidthGuarantee: { pct: 90, min: 25, max: 100 },
|
sleeveWidthGuarantee: { pct: 90, min: 25, max: 100 },
|
||||||
sleeveLengthBonus: { pct: 0, min:-40, max: 10 },
|
sleeveLengthBonus: { pct: 0, min: -40, max: 10 },
|
||||||
sleevePlacketLength: { pct: 25, min: 15, max: 35 },
|
sleevePlacketLength: { pct: 25, min: 15, max: 35 },
|
||||||
waistEase: { pct: 8, min: -4, max: 20 },
|
waistEase: { pct: 8, min: -4, max: 20 },
|
||||||
yokeDart: { pct: 0, min: 0, max: 15 },
|
yokeDart: { pct: 0, min: 0, max: 15 }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
<!-- <script type="text/javascript" src="node_modules/freesewing/dist/browser.js"></script> -->
|
<!-- <script type="text/javascript" src="node_modules/freesewing/dist/browser.js"></script> -->
|
||||||
<script type="text/javascript" src="../../freesewing/dist/browser.js"></script>
|
<script type="text/javascript" src="../../freesewing/dist/browser.js"></script>
|
||||||
<script type="text/javascript" src="node_modules/@freesewing/plugin-bundle/dist/browser.js"></script>
|
<script type="text/javascript" src="node_modules/@freesewing/plugin-bundle/dist/browser.js"></script>
|
||||||
|
<script type="text/javascript" src="node_modules/@freesewing/plugin-sprinkle/dist/browser.js"></script>
|
||||||
<script type="text/javascript" src="dist/browser.js"></script>
|
<script type="text/javascript" src="dist/browser.js"></script>
|
||||||
<!-- <script type="text/javascript" src="node_modules/@freesewing/plugin-theme/dist/browser.js"></script> -->
|
<!-- <script type="text/javascript" src="node_modules/@freesewing/plugin-theme/dist/browser.js"></script> -->
|
||||||
<script type="text/javascript" src="../../plugins/plugin-theme/dist/browser.js"></script>
|
<script type="text/javascript" src="../../plugins/plugin-theme/dist/browser.js"></script>
|
||||||
|
@ -26,6 +27,7 @@
|
||||||
<!-- <script type="text/javascript" src="node_modules/@freesewing/plugin-validate/dist/browser.js"></script> -->
|
<!-- <script type="text/javascript" src="node_modules/@freesewing/plugin-validate/dist/browser.js"></script> -->
|
||||||
<script type="text/javascript" src="../../plugins/plugin-validate/dist/browser.js"></script>
|
<script type="text/javascript" src="../../plugins/plugin-validate/dist/browser.js"></script>
|
||||||
<!-- <script type="text/javascript" src="node_modules/@freesewing/plugin-i18n/dist/browser.js"></script> -->
|
<!-- <script type="text/javascript" src="node_modules/@freesewing/plugin-i18n/dist/browser.js"></script> -->
|
||||||
|
<script type="text/javascript" src="../../plugins/plugin-flip/dist/browser.js"></script>
|
||||||
<script type="text/javascript" src="../../plugins/plugin-i18n/dist/browser.js"></script>
|
<script type="text/javascript" src="../../plugins/plugin-i18n/dist/browser.js"></script>
|
||||||
<script type="text/javascript" src="node_modules/@freesewing/models/dist/browser.js"></script>
|
<script type="text/javascript" src="node_modules/@freesewing/models/dist/browser.js"></script>
|
||||||
<script type="text/javascript" src="node_modules/@freesewing/antman/dist/browser.js"></script>
|
<script type="text/javascript" src="node_modules/@freesewing/antman/dist/browser.js"></script>
|
||||||
|
@ -99,14 +101,17 @@
|
||||||
};
|
};
|
||||||
let settings1 = { ...settings };
|
let settings1 = { ...settings };
|
||||||
var pattern1 = new freesewing.patterns.simon(settings1);
|
var pattern1 = new freesewing.patterns.simon(settings1);
|
||||||
pattern1.with(freesewing.plugins.theme);
|
pattern1.use(freesewing.plugins.theme);
|
||||||
pattern1.with(freesewing.plugins.designer);
|
pattern1.use(freesewing.plugins.designer);
|
||||||
pattern1.with(freesewing.plugins.debug);
|
pattern1.use(freesewing.plugins.flip);
|
||||||
|
pattern1.use(freesewing.plugins.debug);
|
||||||
pattern1.settings.options.yokeDart = 0.15;
|
pattern1.settings.options.yokeDart = 0.15;
|
||||||
pattern1.settings.options.lengthBonus = 0.1;
|
pattern1.settings.options.lengthBonus = 0.1;
|
||||||
pattern1.settings.options.hemStyle = "basebal";
|
pattern1.settings.options.hemStyle = "slashed";
|
||||||
|
pattern1.settings.options.buttonPlacketType = "seperate";
|
||||||
pattern1.settings.options.collarEase = 0.1;
|
pattern1.settings.options.collarEase = 0.1;
|
||||||
pattern1.settings.sa = 10;
|
pattern1.settings.sa = 10;
|
||||||
|
pattern1.settings.only = "frontRight";
|
||||||
pattern1.draft();
|
pattern1.draft();
|
||||||
console.log(pattern1);
|
console.log(pattern1);
|
||||||
document.getElementById("svg1").innerHTML = pattern1.render();
|
document.getElementById("svg1").innerHTML = pattern1.render();
|
||||||
|
|
3639
packages/simon/package-lock.json
generated
3639
packages/simon/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -47,18 +47,19 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@freesewing/brian": "^0.20.1",
|
"@freesewing/brian": "^0.22.0",
|
||||||
"@freesewing/plugin-bundle": "^0.6.0",
|
"@freesewing/plugin-bundle": "^0.7.0",
|
||||||
"freesewing": "^0.24"
|
"@freesewing/plugin-buttons": "0.1.0",
|
||||||
|
"@freesewing/plugin-flip": "0.1.0",
|
||||||
|
"freesewing": "^0.26.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.0.0-beta.56",
|
"@babel/core": "^7.2.2",
|
||||||
"@babel/plugin-proposal-object-rest-spread": "7.0.0-beta.56",
|
"@babel/preset-env": "^7.2.3",
|
||||||
"@babel/preset-env": "7.0.0-beta.56",
|
"@babel/register": "^7.0.0",
|
||||||
"babel-core": "^6.26.3",
|
"@babel/plugin-proposal-object-rest-spread": "7.2.0",
|
||||||
"babel-eslint": "^8.2.6",
|
|
||||||
"babel-loader": "^8.0.0-beta.4",
|
|
||||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||||
|
"babel-eslint": "^8.2.6",
|
||||||
"@freesewing/antman": "0.2.0",
|
"@freesewing/antman": "0.2.0",
|
||||||
"@freesewing/models": "0.6.0",
|
"@freesewing/models": "0.6.0",
|
||||||
"@freesewing/plugin-debug": "0.5.2",
|
"@freesewing/plugin-debug": "0.5.2",
|
||||||
|
@ -66,19 +67,20 @@
|
||||||
"@freesewing/plugin-theme": "0.13.2",
|
"@freesewing/plugin-theme": "0.13.2",
|
||||||
"@freesewing/plugin-validate": "0.2.0",
|
"@freesewing/plugin-validate": "0.2.0",
|
||||||
"@freesewing/plugin-i18n": "0.0.1",
|
"@freesewing/plugin-i18n": "0.0.1",
|
||||||
"eslint": "5.3.0",
|
"eslint": "5.10.0",
|
||||||
"eslint-config-prettier": "^2.9.0",
|
"eslint-config-prettier": "^3.3.0",
|
||||||
"eslint-plugin-prettier": "^2.6.2",
|
"eslint-plugin-prettier": "^3.0.0",
|
||||||
"husky": "^0.14.3",
|
"husky": "^1.2.1",
|
||||||
"lint-staged": "^7.2.0",
|
"lint-staged": "^8.1.0",
|
||||||
"prettier": "1.14.0",
|
"prettier": "1.15.3",
|
||||||
"rimraf": "^2.6.2",
|
"rimraf": "^2.6.2",
|
||||||
"rollup-plugin-babel": "^3.0.7",
|
"rollup": "^0.68.1",
|
||||||
"rollup-plugin-commonjs": "9.1.3",
|
"rollup-plugin-babel": "^4.1.0",
|
||||||
"rollup-plugin-filesize": "^4.0.1",
|
"rollup-plugin-commonjs": "9.2.0",
|
||||||
"rollup-plugin-json": "^3.0.0",
|
"rollup-plugin-filesize": "^5.0.1",
|
||||||
"rollup-plugin-node-resolve": "^3.3.0",
|
"rollup-plugin-json": "^3.1.0",
|
||||||
"rollup-plugin-terser": "^1.0.1"
|
"rollup-plugin-node-resolve": "^4.0.0",
|
||||||
|
"rollup-plugin-terser": "^3.0.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist/*",
|
"dist/*",
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { terser } from "rollup-plugin-terser";
|
import { terser } from "rollup-plugin-terser";
|
||||||
import babel from "rollup-plugin-babel";
|
import babel from "rollup-plugin-babel";
|
||||||
import resolve from "rollup-plugin-node-resolve";
|
import resolve from "rollup-plugin-node-resolve";
|
||||||
import commonjs from "rollup-plugin-commonjs";
|
|
||||||
import json from "rollup-plugin-json";
|
import json from "rollup-plugin-json";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { name, version, description, author, license } from "./package.json";
|
import { name, version, description, author, license } from "./package.json";
|
||||||
|
@ -13,7 +12,6 @@ export default {
|
||||||
browser: true
|
browser: true
|
||||||
}),
|
}),
|
||||||
json(),
|
json(),
|
||||||
commonjs(),
|
|
||||||
babel({
|
babel({
|
||||||
exclude: "node_modules/**"
|
exclude: "node_modules/**"
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -1,31 +1,36 @@
|
||||||
import { calculateReduction } from "./shared";
|
import { calculateReduction } from "./shared";
|
||||||
|
|
||||||
|
|
||||||
export default part => {
|
export default part => {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||||
|
|
||||||
const collarDelta = () => paths.collar.length() * 2 + store.get("backCollarLength") - store.get("collarLength");
|
|
||||||
|
|
||||||
// Populare store with data we need
|
// Populare store with data we need
|
||||||
calculateReduction(part);
|
calculateReduction(part);
|
||||||
store.set("frontArmholeLength", new Path()
|
store.set(
|
||||||
|
"frontArmholeLength",
|
||||||
|
new Path()
|
||||||
.move(points.armhole)
|
.move(points.armhole)
|
||||||
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
||||||
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
|
.curve(
|
||||||
|
points.armholeHollowCp2,
|
||||||
|
points.armholePitchCp1,
|
||||||
|
points.armholePitch
|
||||||
|
)
|
||||||
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
||||||
.length());
|
.length()
|
||||||
store.set("collarLength", measurements.neckCircumference * (1+options.collarEase));
|
);
|
||||||
|
|
||||||
|
|
||||||
// Waist shaping
|
// Waist shaping
|
||||||
let reduce = store.get('waistReduction');
|
let reduce = store.get("waistReduction");
|
||||||
if(reduce/4 > options.minimalDartShaping) reduce = reduce/8;
|
if (reduce / 4 > options.minimalDartShaping) reduce = reduce / 8;
|
||||||
else reduce = reduce/4;
|
else reduce = reduce / 4;
|
||||||
points.waist = points.waist.shift(180, reduce);
|
points.waist = points.waist.shift(180, reduce);
|
||||||
points.waistCp1 = points.waist.shift(-90, measurements.naturalWaistToHip * 0.5);
|
points.waistCp1 = points.waist.shift(
|
||||||
points.waistCp2 = points.waist.shift(90, points.armhole.dy(points.waist)/2);
|
-90,
|
||||||
points.hipsCp2 = points.hips.shift(90, points.waist.dy(points.hips)/4);
|
measurements.naturalWaistToHip * 0.5
|
||||||
|
);
|
||||||
|
points.waistCp2 = points.waist.shift(90, points.armhole.dy(points.waist) / 2);
|
||||||
|
points.hipsCp2 = points.hips.shift(90, points.waist.dy(points.hips) / 4);
|
||||||
|
|
||||||
// Draft hem
|
// Draft hem
|
||||||
paths.saBaseFromHips = new Path()
|
paths.saBaseFromHips = new Path()
|
||||||
|
@ -39,10 +44,13 @@ export default part => {
|
||||||
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
||||||
.line(points.neck)
|
.line(points.neck)
|
||||||
.curve(points.neckCp2Front, points.cfNeckCp1, points.cfNeck);
|
.curve(points.neckCp2Front, points.cfNeckCp1, points.cfNeck);
|
||||||
switch(options.hemStyle) {
|
switch (options.hemStyle) {
|
||||||
case "baseball":
|
case "baseball":
|
||||||
points.bballStart = points.cfHem.shiftFractionTowards(points.hem, 0.5);
|
points.bballStart = points.cfHem.shiftFractionTowards(points.hem, 0.5);
|
||||||
points.bballEnd = points.hem.shiftFractionTowards(points.hips, options.hemCurve);
|
points.bballEnd = points.hem.shiftFractionTowards(
|
||||||
|
points.hips,
|
||||||
|
options.hemCurve
|
||||||
|
);
|
||||||
points.bballCp1 = points.bballStart.shiftFractionTowards(points.hem, 0.5);
|
points.bballCp1 = points.bballStart.shiftFractionTowards(points.hem, 0.5);
|
||||||
points.bballCp2 = new Point(points.bballCp1.x, points.bballEnd.y);
|
points.bballCp2 = new Point(points.bballCp1.x, points.bballEnd.y);
|
||||||
paths.saBase = new Path()
|
paths.saBase = new Path()
|
||||||
|
@ -50,7 +58,7 @@ export default part => {
|
||||||
.line(points.hips)
|
.line(points.hips)
|
||||||
.join(paths.saBaseFromHips);
|
.join(paths.saBaseFromHips);
|
||||||
|
|
||||||
paths.hemBase = new Path()
|
paths.hemBase = new Path()
|
||||||
.move(points.cfHem)
|
.move(points.cfHem)
|
||||||
.line(points.bballStart)
|
.line(points.bballStart)
|
||||||
.curve(points.bballCp1, points.bballCp2, points.bballEnd);
|
.curve(points.bballCp1, points.bballCp2, points.bballEnd);
|
||||||
|
@ -61,11 +69,9 @@ export default part => {
|
||||||
to: points.cfHem,
|
to: points.cfHem,
|
||||||
via: points.hem,
|
via: points.hem,
|
||||||
radius: points.hips.dist(points.hem) * options.hemCurve,
|
radius: points.hips.dist(points.hem) * options.hemCurve,
|
||||||
prefix: "slash",
|
prefix: "slash"
|
||||||
});
|
});
|
||||||
paths.saBase = new Path()
|
paths.saBase = new Path().move(points.hips).join(paths.saBaseFromHips);
|
||||||
.move(points.hips)
|
|
||||||
.join(paths.saBaseFromHips);
|
|
||||||
paths.hemBase = new Path()
|
paths.hemBase = new Path()
|
||||||
.move(points.cfHem)
|
.move(points.cfHem)
|
||||||
.line(points.slashEnd)
|
.line(points.slashEnd)
|
||||||
|
@ -84,7 +90,10 @@ export default part => {
|
||||||
paths.saBaseFromHips.render = false;
|
paths.saBaseFromHips.render = false;
|
||||||
paths.saBaseFromArmhole.render = false;
|
paths.saBaseFromArmhole.render = false;
|
||||||
paths.hemBase.render = false;
|
paths.hemBase.render = false;
|
||||||
paths.seam = paths.hemBase.join(paths.saBase).join(paths.saBaseFromArmhole).close().attr('class', 'fabric');
|
paths.seam = paths.hemBase
|
||||||
|
.join(paths.saBase)
|
||||||
|
.join(paths.saBaseFromArmhole)
|
||||||
|
.attr("class", "fabric");
|
||||||
|
|
||||||
// Complete pattern?
|
// Complete pattern?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
|
@ -94,21 +103,33 @@ export default part => {
|
||||||
to: points.cfNeck.shift(0, 45)
|
to: points.cfNeck.shift(0, 45)
|
||||||
});
|
});
|
||||||
macro("title", { at: points.title, nr: "X", title: "front" });
|
macro("title", { at: points.title, nr: "X", title: "front" });
|
||||||
|
macro("sprinkle", {
|
||||||
|
snippet: "notch",
|
||||||
|
on: [
|
||||||
|
"waist",
|
||||||
|
"armholePitch",
|
||||||
|
"shoulder",
|
||||||
|
"neck",
|
||||||
|
"hips",
|
||||||
|
"cfHips",
|
||||||
|
"cfWaist",
|
||||||
|
"armhole",
|
||||||
|
"cfArmhole"
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
if(sa) {
|
if (sa) {
|
||||||
paths.saFrench = paths.saBase.offset(sa*2).attr('class', 'fabric sa');
|
paths.saFrench = paths.saBase.offset(sa * 2).attr("class", "fabric sa");
|
||||||
paths.saFromArmhole = paths.saBaseFromArmhole.offset(sa).attr('class', 'fabric sa');
|
paths.saFromArmhole = paths.saBaseFromArmhole
|
||||||
paths.hemSa = paths.hemBase.offset(sa*3).attr('class', 'fabric sa');
|
.offset(sa)
|
||||||
|
.attr("class", "fabric sa");
|
||||||
|
paths.hemSa = paths.hemBase.offset(sa * 3).attr("class", "fabric sa");
|
||||||
paths.saConnect = new Path()
|
paths.saConnect = new Path()
|
||||||
.move(points.cfHem)
|
|
||||||
.line(paths.hemSa.start())
|
|
||||||
.move(paths.hemSa.end())
|
.move(paths.hemSa.end())
|
||||||
.line(paths.saFrench.start())
|
.line(paths.saFrench.start())
|
||||||
.move(paths.saFrench.end())
|
.move(paths.saFrench.end())
|
||||||
.line(paths.saFromArmhole.start())
|
.line(paths.saFromArmhole.start())
|
||||||
.move(paths.saFromArmhole.end())
|
.attr("class", "fabric sa");
|
||||||
.line(points.cfNeck)
|
|
||||||
.attr('class', 'fabric sa');
|
|
||||||
delete paths.sa;
|
delete paths.sa;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
95
packages/simon/src/frontright-classic-cuton.js
Normal file
95
packages/simon/src/frontright-classic-cuton.js
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
export default part => {
|
||||||
|
// prettier-ignore
|
||||||
|
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||||
|
|
||||||
|
let width = options.buttonPlacketWidth;
|
||||||
|
if (options.buttonHoleType === "seperate") {
|
||||||
|
} else {
|
||||||
|
points.placketTopIn = utils.lineIntersectsCurve(
|
||||||
|
new Point(width / -2, points.cfNeck.y + 20),
|
||||||
|
new Point(width / -2, points.cfNeck.y - 20),
|
||||||
|
points.cfNeck,
|
||||||
|
points.cfNeckCp1,
|
||||||
|
points.neckCp2Front,
|
||||||
|
points.neck
|
||||||
|
);
|
||||||
|
points.placketTopOut = points.cfNeck.shift(0, width / 2);
|
||||||
|
points.placketTopEdge = points.cfNeck.shift(0, width * 1.5);
|
||||||
|
points.placketBottomIn = points.cfHem.shift(180, width / 2);
|
||||||
|
points.placketBottomOut = points.cfHem.shift(0, width / 2);
|
||||||
|
points.placketBottomEdge = points.cfHem.shift(0, width * 1.5);
|
||||||
|
|
||||||
|
paths.seam
|
||||||
|
.line(points.placketTopEdge)
|
||||||
|
.line(points.placketBottomEdge)
|
||||||
|
.line(points.cfHem)
|
||||||
|
.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Complete pattern?
|
||||||
|
if (complete) {
|
||||||
|
// Placket help lines
|
||||||
|
paths.frontCenter = new Path()
|
||||||
|
.move(points.cfNeck)
|
||||||
|
.line(points.cfHem)
|
||||||
|
.attr("class", "help");
|
||||||
|
paths.placketInnerFold = new Path()
|
||||||
|
.move(points.placketTopIn)
|
||||||
|
.line(points.placketBottomIn)
|
||||||
|
.attr("class", "dotted");
|
||||||
|
paths.placketOuterFold = new Path()
|
||||||
|
.move(points.placketTopOut)
|
||||||
|
.line(points.placketBottomOut)
|
||||||
|
.attr("class", "dotted");
|
||||||
|
macro("sprinkle", {
|
||||||
|
snippet: "notch",
|
||||||
|
on: [
|
||||||
|
"placketTopIn",
|
||||||
|
"placketTopOut",
|
||||||
|
"cfNeck",
|
||||||
|
"placketBottomIn",
|
||||||
|
"placketBottomOut",
|
||||||
|
"cfHem"
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// Buttons
|
||||||
|
let len =
|
||||||
|
points.cfNeck.dist(points.cfHips) * (1 - options.buttonFreeLength);
|
||||||
|
for (let i = 1; i <= options.buttons; i++) {
|
||||||
|
points["button" + i] = points.cfNeck.shift(
|
||||||
|
-90,
|
||||||
|
(len / options.buttons) * i
|
||||||
|
);
|
||||||
|
snippets["button" + i] = new Snippet("button", points["button" + i]);
|
||||||
|
}
|
||||||
|
if (options.extraTopButton === "yes")
|
||||||
|
snippets.topButton = new Snippet(
|
||||||
|
"button",
|
||||||
|
points.cfNeck.shift(-90, len / options.buttons / 2)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Title
|
||||||
|
macro("title", { at: points.title, nr: 1, title: "frontRight" });
|
||||||
|
|
||||||
|
if (sa) {
|
||||||
|
paths.saFromArmhole
|
||||||
|
.line(
|
||||||
|
new Point(points.placketTopEdge.x + sa, points.placketTopEdge.y - sa)
|
||||||
|
)
|
||||||
|
.line(
|
||||||
|
new Point(
|
||||||
|
points.placketBottomEdge.x + sa,
|
||||||
|
points.placketBottomEdge.y + sa * 3
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.line(paths.hemSa.start());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Paperless?
|
||||||
|
if (paperless) {
|
||||||
|
}
|
||||||
|
|
||||||
|
return part;
|
||||||
|
};
|
35
packages/simon/src/frontright-classic-seperate.js
Normal file
35
packages/simon/src/frontright-classic-seperate.js
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
export default part => {
|
||||||
|
// prettier-ignore
|
||||||
|
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||||
|
|
||||||
|
let width = options.buttonPlacketWidth;
|
||||||
|
if (options.buttonHoleType === "seperate") {
|
||||||
|
} else {
|
||||||
|
points.placketTopIn = utils.lineIntersectsCurve(
|
||||||
|
new Point(width / -2, points.cfNeck.y + 20),
|
||||||
|
new Point(width / -2, points.cfNeck.y - 20),
|
||||||
|
points.cfNeck,
|
||||||
|
points.cfNeckCp1,
|
||||||
|
points.neckCp2Front,
|
||||||
|
points.neck
|
||||||
|
);
|
||||||
|
points.placketBottomIn = points.cfHem.shift(180, width / 2);
|
||||||
|
paths.seam = paths.seam.split(points.placketTopIn)[0];
|
||||||
|
paths.seam.ops[0].to = points.placketBottomIn;
|
||||||
|
paths.seam.close().attr("class", "fabric");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Complete pattern?
|
||||||
|
if (complete) {
|
||||||
|
// Title
|
||||||
|
macro("title", { at: points.title, nr: 1, title: "rightFront" });
|
||||||
|
|
||||||
|
if (sa) paths.saFromArmhole.line(paths.hemSa.start());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Paperless?
|
||||||
|
if (paperless) {
|
||||||
|
}
|
||||||
|
|
||||||
|
return part;
|
||||||
|
};
|
47
packages/simon/src/frontright-seamless-cuton.js
Normal file
47
packages/simon/src/frontright-seamless-cuton.js
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
export default part => {
|
||||||
|
// prettier-ignore
|
||||||
|
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||||
|
|
||||||
|
let width = options.buttonPlacketWidth;
|
||||||
|
if (options.buttonHoleType === "seperate") {
|
||||||
|
} else {
|
||||||
|
points.placketTopIn = utils.lineIntersectsCurve(
|
||||||
|
new Point(width / -2, points.cfNeck.y + 20),
|
||||||
|
new Point(width / -2, points.cfNeck.y - 20),
|
||||||
|
points.cfNeck,
|
||||||
|
points.cfNeckCp1,
|
||||||
|
points.neckCp2Front,
|
||||||
|
points.neck
|
||||||
|
);
|
||||||
|
points.placketTopOut = points.cfNeck.shift(0, width / 2);
|
||||||
|
points.placketTopEdge = points.cfNeck.shift(0, width * 1.5);
|
||||||
|
points.placketBottomIn = points.cfHem.shift(180, width / 2);
|
||||||
|
points.placketBottomOut = points.cfHem.shift(0, width / 2);
|
||||||
|
points.placketBottomEdge = points.cfHem.shift(0, width * 1.5);
|
||||||
|
|
||||||
|
paths.placketInnerFold = new Path()
|
||||||
|
.move(points.placketTopIn)
|
||||||
|
.line(points.placketBottomIn)
|
||||||
|
.attr("class", "help");
|
||||||
|
paths.placketOuterFold = new Path()
|
||||||
|
.move(points.placketTopOut)
|
||||||
|
.line(points.placketBottomOut)
|
||||||
|
.attr("class", "help");
|
||||||
|
|
||||||
|
paths.tmp = new Path()
|
||||||
|
.move(points.placketTopEdge)
|
||||||
|
.line(points.placketBottomEdge);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Complete pattern?
|
||||||
|
if (complete) {
|
||||||
|
if (sa) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Paperless?
|
||||||
|
if (paperless) {
|
||||||
|
}
|
||||||
|
|
||||||
|
return part;
|
||||||
|
};
|
47
packages/simon/src/frontright-seamless-seperate.js
Normal file
47
packages/simon/src/frontright-seamless-seperate.js
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
export default part => {
|
||||||
|
// prettier-ignore
|
||||||
|
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||||
|
|
||||||
|
let width = options.buttonPlacketWidth;
|
||||||
|
if (options.buttonHoleType === "seperate") {
|
||||||
|
} else {
|
||||||
|
points.placketTopIn = utils.lineIntersectsCurve(
|
||||||
|
new Point(width / -2, points.cfNeck.y + 20),
|
||||||
|
new Point(width / -2, points.cfNeck.y - 20),
|
||||||
|
points.cfNeck,
|
||||||
|
points.cfNeckCp1,
|
||||||
|
points.neckCp2Front,
|
||||||
|
points.neck
|
||||||
|
);
|
||||||
|
points.placketTopOut = points.cfNeck.shift(0, width / 2);
|
||||||
|
points.placketTopEdge = points.cfNeck.shift(0, width * 1.5);
|
||||||
|
points.placketBottomIn = points.cfHem.shift(180, width / 2);
|
||||||
|
points.placketBottomOut = points.cfHem.shift(0, width / 2);
|
||||||
|
points.placketBottomEdge = points.cfHem.shift(0, width * 1.5);
|
||||||
|
|
||||||
|
paths.placketInnerFold = new Path()
|
||||||
|
.move(points.placketTopIn)
|
||||||
|
.line(points.placketBottomIn)
|
||||||
|
.attr("class", "help");
|
||||||
|
paths.placketOuterFold = new Path()
|
||||||
|
.move(points.placketTopOut)
|
||||||
|
.line(points.placketBottomOut)
|
||||||
|
.attr("class", "help");
|
||||||
|
|
||||||
|
paths.tmp = new Path()
|
||||||
|
.move(points.placketTopEdge)
|
||||||
|
.line(points.placketBottomEdge);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Complete pattern?
|
||||||
|
if (complete) {
|
||||||
|
if (sa) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Paperless?
|
||||||
|
if (paperless) {
|
||||||
|
}
|
||||||
|
|
||||||
|
return part;
|
||||||
|
};
|
17
packages/simon/src/frontright.js
Normal file
17
packages/simon/src/frontright.js
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import frontRightClassicSeperate from "./frontright-classic-seperate";
|
||||||
|
import frontRightClassicCuton from "./frontright-classic-cuton";
|
||||||
|
import frontRightSeamlessSeperate from "./frontright-seamless-seperate";
|
||||||
|
import frontRightSeamlessCuton from "./frontright-seamless-cuton";
|
||||||
|
|
||||||
|
export default part => {
|
||||||
|
let { macro, options } = part.shorthand();
|
||||||
|
macro("flip");
|
||||||
|
|
||||||
|
return options.buttonPlacketStyle === "seamless"
|
||||||
|
? options.buttonPlacketType === "seperate"
|
||||||
|
? frontRightSeamlessSeperate(part)
|
||||||
|
: frontRightSeamlessCuton(part)
|
||||||
|
: options.buttonPlacketType === "seperate"
|
||||||
|
? frontRightClassicSeperate(part)
|
||||||
|
: frontRightClassicCuton(part);
|
||||||
|
};
|
|
@ -1,18 +1,16 @@
|
||||||
import freesewing from "freesewing";
|
import freesewing from "freesewing";
|
||||||
import Brian from "@freesewing/brian";
|
import Brian from "@freesewing/brian";
|
||||||
import pluginBundle from "@freesewing/plugin-bundle";
|
import plugins from "@freesewing/plugin-bundle";
|
||||||
|
import flipPlugin from "@freesewing/plugin-flip";
|
||||||
|
import buttonPlugin from "@freesewing/plugin-buttons";
|
||||||
import config from "../config/config";
|
import config from "../config/config";
|
||||||
import { version } from "../package.json";
|
|
||||||
// Parts
|
// Parts
|
||||||
import draftBack from "./back";
|
import draftBack from "./back";
|
||||||
import draftFront from "./front";
|
import draftFront from "./front";
|
||||||
|
import draftFrontRight from "./frontright";
|
||||||
//import draftSleevecap from "./sleevecap";
|
//import draftSleevecap from "./sleevecap";
|
||||||
//import draftSleeve from "./sleeve";
|
//import draftSleeve from "./sleeve";
|
||||||
// backBlock: ".Back block"
|
|
||||||
// frontBlock: ".Front block"
|
|
||||||
// sleeveBlock: ".Sleeve block"
|
// sleeveBlock: ".Sleeve block"
|
||||||
// block: ".Block"
|
|
||||||
// frontAndBackBlock: ".Front and back block"
|
|
||||||
// frontRight: "Front right"
|
// frontRight: "Front right"
|
||||||
// frontLeft: "Front left"
|
// frontLeft: "Front left"
|
||||||
// buttonPlacket: "Button placket."
|
// buttonPlacket: "Button placket."
|
||||||
|
@ -28,33 +26,34 @@ import draftFront from "./front";
|
||||||
// barrelCuff: "Barrel cuff"
|
// barrelCuff: "Barrel cuff"
|
||||||
// frenchCuff: "French cuff"
|
// frenchCuff: "French cuff"
|
||||||
|
|
||||||
// Constructor boilerplate
|
// Constructor
|
||||||
const Simon = function(settings = false) {
|
const Simon = function(settings) {
|
||||||
freesewing.Pattern.call(this, { version: version, ...config });
|
freesewing.Pattern.call(this, config);
|
||||||
this.with(pluginBundle);
|
this.use(plugins)
|
||||||
if (settings !== false) this.mergeSettings(settings);
|
.use(flipPlugin)
|
||||||
|
.use(buttonPlugin)
|
||||||
|
.apply(settings);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Inheritance boilerplate
|
// Set up inheritance
|
||||||
Simon.prototype = Object.create(freesewing.Pattern.prototype);
|
Simon.prototype = Object.create(freesewing.Pattern.prototype);
|
||||||
Simon.prototype.constructor = Simon;
|
Simon.prototype.constructor = Simon;
|
||||||
|
|
||||||
// Attach per-part draft methods to prototype
|
// Attach per-part draft methods to prototype
|
||||||
Simon.prototype.draftBase = function (part) {
|
Simon.prototype.draftBase = function(part) {
|
||||||
return new Brian(this.settings).draftBase(part);
|
return new Brian(this.settings).draftBase(part);
|
||||||
}
|
};
|
||||||
Simon.prototype.draftFrontBase = function (part) {
|
Simon.prototype.draftFrontBase = function(part) {
|
||||||
return new Brian(this.settings).draftFront(part);
|
return new Brian(this.settings).draftFront(part);
|
||||||
}
|
};
|
||||||
Simon.prototype.draftBackBase = function (part) {
|
Simon.prototype.draftBackBase = function(part) {
|
||||||
return new Brian(this.settings).draftBack(part);
|
return new Brian(this.settings).draftBack(part);
|
||||||
}
|
};
|
||||||
Simon.prototype.draftBack = draftBack;
|
Simon.prototype.draftBack = draftBack;
|
||||||
Simon.prototype.draftFront = draftFront;
|
Simon.prototype.draftFront = draftFront;
|
||||||
|
Simon.prototype.draftFrontRight = draftFrontRight;
|
||||||
|
|
||||||
|
|
||||||
//Brian.prototype.draftFront = draftFront;
|
//Brian.prototype.draftFront = draftFront;
|
||||||
//Brian.prototype.draftSleevecap = draftSleevecap;
|
//Brian.prototype.draftSleevecap = draftSleevecap;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue