1
0
Fork 0

sparkles: Finalized front

This commit is contained in:
Joost De Cock 2019-03-16 16:35:33 +01:00
parent adebec8b4b
commit b1f28557c4
6 changed files with 83 additions and 8 deletions

View file

@ -90,7 +90,7 @@ export default {
sleeveLengthBonus: { pct: 0, min:-40, max: 10 },
// Jaeger options
frontOverlap: { pct: 2, min: 1, max: 3},
frontOverlap: { pct: 1.5, min: 1, max: 2},
sleeveVentLength: { pct: 35, min: 25, max: 55 },
sleeveVentWidth: { pct: 18, min: 10, max: 26 },

View file

@ -36,7 +36,7 @@
},
//"embed": true,
"sa": 0,
"paperless": true,
//"paperless": true,
"measurements": {
"bicepsCircumference": 335,
"centerBackNeckToWaist": 520,
@ -57,8 +57,8 @@
pattern.use(freesewing.plugins.theme);
pattern.use(freesewing.plugins.designer);
pattern.use(freesewing.plugins.validate);
//pattern.draft();
pattern.sampleOption("buttonLength");
pattern.draft();
//pattern.sampleOption("buttonLength");
document.getElementById("svg1").innerHTML = pattern.render();
function pointHover(evt) {

View file

@ -229,6 +229,11 @@
"@freesewing/plugin-title": "0.10.0"
}
},
"@freesewing/plugin-buttons": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-buttons/-/plugin-buttons-0.1.0.tgz",
"integrity": "sha512-X3C4duwnx0CT9Q6zUfPeErlz4A1nJMdTLJ/smhtkfjOK9G81hsKkyRO8JIGb7vHcz9McMD5yq3xbsBxVAvGyLw=="
},
"@freesewing/plugin-cutonfold": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-cutonfold/-/plugin-cutonfold-0.10.4.tgz",

View file

@ -49,6 +49,7 @@
"dependencies": {
"@freesewing/bent": "0.1.1",
"@freesewing/plugin-bundle": "latest",
"@freesewing/plugin-buttons": "0.1.0",
"freesewing": "latest"
},
"devDependencies": {

View file

@ -270,7 +270,6 @@ export default function(part) {
*/
// Paths
paths.saBase = new Path()
.move(points.hem)
@ -335,7 +334,7 @@ export default function(part) {
paths.breakLine = new Path()
.move(points.lapelBreakPoint)
.line(points.shoulderRoll)
.attr("class", "fabric lashed");
.attr("class", "canvas lashed");
paths.dart = new Path()
.move(points.dartBottom)
@ -353,8 +352,74 @@ export default function(part) {
.line(points.frontPocketBottomEnd)
.attr("class", "help");
if (complete) {
paths.chestPiece = new Path()
.move(points.lapelBreakPoint)
.curve(
points.cutawayPoint,
points.waist,
points.fsArmhole
)
.attr("class", "canvas lashed")
.attr("data-text", "chestPiece")
.attr("data-text-class", "center")
if (complete) {
// Logo
points.logo = new Point(
points.dartBottom.x,
points.hips.y
);
snippets.logo = new Snippet("logo", points.logo);
// Notches
macro("sprinkle", {
snippet: "notch",
on: [
"neck",
"shoulder",
"armholePitch",
"chestPocketBottomLeft",
"chestPocketBottomRight",
"lapelBreakPoint",
"notchMax",
"notch",
"innerPocketLeft",
"innerPocketRight",
"frontPocketTopLeft",
"frontPocketBottomLeft",
"armholeHollow"
]
});
// Buttons
points.button1 = new Point(
points.cfWaist.x,
points.lapelBreakPoint.y
);
let buttons = ["button1"];
if (options.buttons > 1) {
points.button2 = new Point(
points.cfWaist.x,
points.cutawayPoint.y
);
buttons.push("button2");
}
for (let button of buttons) snippets[button] = new Snippet("button", points[button]).attr("data-scale", 2);
// Instructions
paths.breakLine
.attr("data-text", "breakLine")
.attr("data-text-class", "center");
paths.flb
.attr("data-text-xml:space", "preserve")
.attr("data-text", " ")
.attr("data-text", "facingLiningBoundary")
// Grainline
macro("grainline", {
from: points.cfHips,
to: new Point(points.cfArmhole.x, points.collarCorner.y)
});
if (sa) {
paths.sa = paths.saBase
.offset(sa)

View file

@ -1,5 +1,6 @@
import freesewing from "freesewing";
import plugins from "@freesewing/plugin-bundle";
import buttons from "@freesewing/plugin-buttons";
import Bent from "@freesewing/bent";
import config from "../config";
// Parts
@ -20,7 +21,10 @@ import draftTopSleeve from "./topsleeve";
import draftUnderSleeve from "./undersleeve";
// Create new design
const Jaeger = new freesewing.Design(config, plugins);
const Jaeger = new freesewing.Design(config, [
plugins,
buttons
]);
// Attach draft methods from Bent to prototype
Jaeger.prototype.draftBentBase = function(part) {