sparkles: Switched placket types to bool options
This commit is contained in:
parent
329bb0d662
commit
df7342ec10
10 changed files with 23 additions and 36 deletions
|
@ -57,35 +57,22 @@ export default {
|
||||||
cuffOverlap: 0.15,
|
cuffOverlap: 0.15,
|
||||||
frenchCuffRoundFactor: 0.05,
|
frenchCuffRoundFactor: 0.05,
|
||||||
|
|
||||||
|
// Booleans
|
||||||
|
extraTopButton: { bool: true },
|
||||||
|
splitYoke: { bool: false },
|
||||||
|
barrelCuffNarrowButton: { bool: true },
|
||||||
|
seperateButtonPlacket: { bool: false },
|
||||||
|
seperateButtonholePlacket: { bool: false },
|
||||||
|
|
||||||
// Lists
|
// Lists
|
||||||
extraTopButton: {
|
|
||||||
list: ["yes", "no"],
|
|
||||||
dflt: "yes"
|
|
||||||
},
|
|
||||||
splitYoke: {
|
|
||||||
list: ["yes", "no"],
|
|
||||||
dflt: "no"
|
|
||||||
},
|
|
||||||
barrelcuffNarrowButton: {
|
|
||||||
list: ["yes", "no"],
|
|
||||||
dflt: "yes"
|
|
||||||
},
|
|
||||||
hemStyle: {
|
hemStyle: {
|
||||||
list: ["straight", "baseball", "slashed"],
|
list: ["straight", "baseball", "slashed"],
|
||||||
dflt: "straight"
|
dflt: "straight"
|
||||||
},
|
},
|
||||||
buttonPlacketType: {
|
|
||||||
list: ["cutOn", "seperate"],
|
|
||||||
dflt: "cutOn"
|
|
||||||
},
|
|
||||||
buttonPlacketStyle: {
|
buttonPlacketStyle: {
|
||||||
list: ["classic", "seamless"],
|
list: ["classic", "seamless"],
|
||||||
dflt: "classic"
|
dflt: "classic"
|
||||||
},
|
},
|
||||||
buttonholePlacketType: {
|
|
||||||
list: ["cutOn", "seperate"],
|
|
||||||
dflt: "cutOn"
|
|
||||||
},
|
|
||||||
buttonholePlacketStyle: {
|
buttonholePlacketStyle: {
|
||||||
list: ["classic", "seamless"],
|
list: ["classic", "seamless"],
|
||||||
dflt: "seamless"
|
dflt: "seamless"
|
|
@ -76,7 +76,7 @@
|
||||||
},
|
},
|
||||||
"embed": true,
|
"embed": true,
|
||||||
"sa": 0,
|
"sa": 0,
|
||||||
"paperless": true,
|
//"paperless": true,
|
||||||
"measurements": {
|
"measurements": {
|
||||||
"bicepsCircumference": 335,
|
"bicepsCircumference": 335,
|
||||||
"centerBackNeckToWaist": 520,
|
"centerBackNeckToWaist": 520,
|
||||||
|
@ -116,9 +116,9 @@ let settings1 = { ...settings };
|
||||||
pattern1.settings.options.buttonholePlacketType = "cut-on";
|
pattern1.settings.options.buttonholePlacketType = "cut-on";
|
||||||
pattern1.settings.options.buttonholePlacketStyle = "seamless";
|
pattern1.settings.options.buttonholePlacketStyle = "seamless";
|
||||||
pattern1.settings.options.cuffButtonRows = 2;
|
pattern1.settings.options.cuffButtonRows = 2;
|
||||||
pattern1.settings.options.barrelCuffNarrowButton = "yes";
|
pattern1.settings.options.barrelCuffNarrowButton = true;
|
||||||
pattern1.settings.options.cuffStyle = "roundedFrenchCuff";
|
pattern1.settings.options.cuffStyle = "roundedBarrelCuff";
|
||||||
pattern1.settings.options.splitYoke = "yes";
|
pattern1.settings.options.extraTopButton = true;
|
||||||
pattern1.settings.sa = 10;
|
pattern1.settings.sa = 10;
|
||||||
//pattern1.settings.only = ["front", "back"];
|
//pattern1.settings.only = ["front", "back"];
|
||||||
pattern1.draft();
|
pattern1.draft();
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@freesewing/brian": "^0.22.0",
|
"@freesewing/brian": "^0.22.2",
|
||||||
"@freesewing/plugin-banner": "0.2.0",
|
"@freesewing/plugin-banner": "0.2.0",
|
||||||
"@freesewing/plugin-bundle": "^0.7.1",
|
"@freesewing/plugin-bundle": "^0.7.1",
|
||||||
"@freesewing/plugin-buttons": "0.1.0",
|
"@freesewing/plugin-buttons": "0.1.0",
|
||||||
|
|
|
@ -19,7 +19,7 @@ export default part => {
|
||||||
} = part.shorthand();
|
} = part.shorthand();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
options.buttonholePlacketType !== "seperate" ||
|
!options.seperateButtonholePlacket ||
|
||||||
options.buttonholePlacketStyle !== "classic"
|
options.buttonholePlacketStyle !== "classic"
|
||||||
) {
|
) {
|
||||||
part.paths = {};
|
part.paths = {};
|
||||||
|
|
|
@ -19,7 +19,7 @@ export default part => {
|
||||||
} = part.shorthand();
|
} = part.shorthand();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
options.buttonPlacketType !== "seperate" ||
|
!options.seperateButtonPlacket ||
|
||||||
options.buttonPlacketStyle !== "classic"
|
options.buttonPlacketStyle !== "classic"
|
||||||
) {
|
) {
|
||||||
part.paths = {};
|
part.paths = {};
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default part => {
|
||||||
|
|
||||||
return options.buttonholePlacketStyle === "seamless"
|
return options.buttonholePlacketStyle === "seamless"
|
||||||
? frontLeftSeamless(part)
|
? frontLeftSeamless(part)
|
||||||
: options.buttonholePlacketType === "seperate"
|
: seperateButtonholePlacket
|
||||||
? frontLeftClassicSeperate(part)
|
? frontLeftClassicSeperate(part)
|
||||||
: frontLeftClassicCuton(part);
|
: frontLeftClassicCuton(part);
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default part => {
|
||||||
|
|
||||||
return options.buttonPlacketStyle === "seamless"
|
return options.buttonPlacketStyle === "seamless"
|
||||||
? frontRightSeamless(part)
|
? frontRightSeamless(part)
|
||||||
: options.buttonPlacketType === "seperate"
|
: options.seperateButtonPlacket
|
||||||
? frontRightClassicSeperate(part)
|
? frontRightClassicSeperate(part)
|
||||||
: frontRightClassicCuton(part);
|
: frontRightClassicCuton(part);
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@ import Brian from "@freesewing/brian";
|
||||||
import plugins from "@freesewing/plugin-bundle";
|
import plugins from "@freesewing/plugin-bundle";
|
||||||
import flipPlugin from "@freesewing/plugin-flip";
|
import flipPlugin from "@freesewing/plugin-flip";
|
||||||
import buttonPlugin from "@freesewing/plugin-buttons";
|
import buttonPlugin from "@freesewing/plugin-buttons";
|
||||||
import config from "../config/config";
|
import config from "../config";
|
||||||
// Parts
|
// Parts
|
||||||
import draftBack from "./back";
|
import draftBack from "./back";
|
||||||
import draftFront from "./front";
|
import draftFront from "./front";
|
||||||
|
|
|
@ -31,7 +31,7 @@ export const addButtons = function(
|
||||||
);
|
);
|
||||||
snippets[snippet + i] = new Snippet(snippet, points["button" + i]);
|
snippets[snippet + i] = new Snippet(snippet, points["button" + i]);
|
||||||
}
|
}
|
||||||
if (options.extraTopButton === "yes")
|
if (options.extraTopButton)
|
||||||
snippets["top" + snippet] = new Snippet(
|
snippets["top" + snippet] = new Snippet(
|
||||||
snippet,
|
snippet,
|
||||||
points[origin].shift(-90, len / options.buttons / 2)
|
points[origin].shift(-90, len / options.buttons / 2)
|
||||||
|
@ -96,7 +96,7 @@ export const decorateBarrelCuff = part => {
|
||||||
"buttonhole",
|
"buttonhole",
|
||||||
points["buttonhole" + i]
|
points["buttonhole" + i]
|
||||||
).attr("data-rotate", 90);
|
).attr("data-rotate", 90);
|
||||||
if (options.barrelcuffNarrowButton === "yes") {
|
if (options.barrelCuffNarrowButton) {
|
||||||
points["narrowButton" + i] = points["button" + i].shift(180, margin);
|
points["narrowButton" + i] = points["button" + i].shift(180, margin);
|
||||||
snippets["narrowButton" + i] = new Snippet(
|
snippets["narrowButton" + i] = new Snippet(
|
||||||
"button",
|
"button",
|
||||||
|
@ -206,7 +206,7 @@ export const paperlessBarrelCuff = part => {
|
||||||
to: points.topLeft.shift(0, 40),
|
to: points.topLeft.shift(0, 40),
|
||||||
x: points.bottomLeft.x - 15 - sa
|
x: points.bottomLeft.x - 15 - sa
|
||||||
});
|
});
|
||||||
if (options.barrelcuffNarrowButton === "yes") {
|
if (options.barrelCuffNarrowButton) {
|
||||||
macro("hd", {
|
macro("hd", {
|
||||||
from: points.narrowButton1,
|
from: points.narrowButton1,
|
||||||
to: points.button1,
|
to: points.button1,
|
||||||
|
|
|
@ -30,7 +30,7 @@ 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.neckCp2, points.cbNeck);
|
.curve_(points.neckCp2, points.cbNeck);
|
||||||
if (options.splitYoke === "yes")
|
if (options.splitYoke)
|
||||||
paths.saBase = paths.saBase.line(points.cbYoke).close();
|
paths.saBase = paths.saBase.line(points.cbYoke).close();
|
||||||
paths.seam = paths.saBase.clone();
|
paths.seam = paths.saBase.clone();
|
||||||
paths.saBase.render = false;
|
paths.saBase.render = false;
|
||||||
|
@ -44,7 +44,7 @@ export default part => {
|
||||||
points.logo = points.title.shift(-90, 50);
|
points.logo = points.title.shift(-90, 50);
|
||||||
snippets.logo = new Snippet("logo", points.logo);
|
snippets.logo = new Snippet("logo", points.logo);
|
||||||
snippets.logo.attr("data-scale", 0.8);
|
snippets.logo.attr("data-scale", 0.8);
|
||||||
if (options.splitYoke === "yes") {
|
if (options.splitYoke) {
|
||||||
points.grainlineFrom = points.cbYoke.shift(0, 20);
|
points.grainlineFrom = points.cbYoke.shift(0, 20);
|
||||||
points.grainlineTo = points.cbNeck.shift(0, 20);
|
points.grainlineTo = points.cbNeck.shift(0, 20);
|
||||||
macro("grainline", {
|
macro("grainline", {
|
||||||
|
@ -66,7 +66,7 @@ export default part => {
|
||||||
|
|
||||||
if (sa) {
|
if (sa) {
|
||||||
paths.sa = paths.saBase.offset(sa).attr("class", "fabric sa");
|
paths.sa = paths.saBase.offset(sa).attr("class", "fabric sa");
|
||||||
if (options.splitYoke === "no") {
|
if (options.splitYoke) {
|
||||||
paths.sa = paths.sa
|
paths.sa = paths.sa
|
||||||
.line(points.cbNeck)
|
.line(points.cbNeck)
|
||||||
.move(points.cbYoke)
|
.move(points.cbYoke)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue