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