1
0
Fork 0

🎨 Updated prettier config

This commit is contained in:
Joost De Cock 2019-08-03 15:03:33 +02:00
parent b8e632998b
commit 6710d76b08
401 changed files with 13193 additions and 15620 deletions

View file

@ -15,33 +15,33 @@ export default part => {
complete,
paperless,
macro
} = part.shorthand();
} = part.shorthand()
// Wrist
let top = paths.sleevecap.bbox().topLeft.y;
let top = paths.sleevecap.bbox().topLeft.y
debug({
style: "info",
label: "🗸 Sleevecap height",
style: 'info',
label: '🗸 Sleevecap height',
msg: units(Math.abs(top))
});
})
debug({
style: "info",
label: "🗸 Sleevecap width",
style: 'info',
label: '🗸 Sleevecap width',
msg: units(points.bicepsRight.x * 2)
});
})
points.centerWrist = new Point(
0,
top + measurements.shoulderToWrist * (1 + options.sleeveLengthBonus)
);
)
points.wristRight = points.centerWrist.shift(
0,
(measurements.wristCircumference * (1 + options.cuffEase)) / 2
);
points.wristLeft = points.wristRight.rotate(180, points.centerWrist);
points.sleeveTip = paths.sleevecap.shiftFractionAlong(0.5);
)
points.wristLeft = points.wristRight.rotate(180, points.centerWrist)
points.sleeveTip = paths.sleevecap.shiftFractionAlong(0.5)
// Paths
paths.sleevecap.render = false;
paths.sleevecap.render = false
paths.seam = new Path()
.move(points.bicepsLeft)
.move(points.wristLeft)
@ -49,67 +49,64 @@ export default part => {
.line(points.bicepsRight)
.join(paths.sleevecap)
.close()
.attr("class", "fabric");
.attr('class', 'fabric')
// Anchor point for sampling
points.gridAnchor = new Point(0, 0);
points.gridAnchor = new Point(0, 0)
// Complete pattern?
if (complete) {
points.logo = points.centerBiceps.shiftFractionTowards(
points.centerWrist,
0.3
);
snippets.logo = new Snippet("logo", points.logo);
macro("title", { at: points.centerBiceps, nr: 3, title: "sleeve" });
macro("grainline", { from: points.centerWrist, to: points.centerBiceps });
points.logo = points.centerBiceps.shiftFractionTowards(points.centerWrist, 0.3)
snippets.logo = new Snippet('logo', points.logo)
macro('title', { at: points.centerBiceps, nr: 3, title: 'sleeve' })
macro('grainline', { from: points.centerWrist, to: points.centerBiceps })
points.scaleboxAnchor = points.scalebox = points.centerBiceps.shiftFractionTowards(
points.centerWrist,
0.5
);
macro("scalebox", { at: points.scalebox });
)
macro('scalebox', { at: points.scalebox })
points.frontNotch = paths.sleevecap.shiftAlong(
paths.sleevecap.length() / 2 -
store.get("frontShoulderToArmholePitch") -
store.get("sleevecapEase") / 2
);
store.get('frontShoulderToArmholePitch') -
store.get('sleevecapEase') / 2
)
points.backNotch = paths.sleevecap.shiftAlong(
paths.sleevecap.length() / 2 +
store.get("backShoulderToArmholePitch") +
store.get("sleevecapEase") / 2
);
snippets.frontNotch = new Snippet("notch", points.frontNotch);
snippets.backNotch = new Snippet("bnotch", points.backNotch);
if (sa) paths.sa = paths.seam.offset(sa).attr("class", "fabric sa");
store.get('backShoulderToArmholePitch') +
store.get('sleevecapEase') / 2
)
snippets.frontNotch = new Snippet('notch', points.frontNotch)
snippets.backNotch = new Snippet('bnotch', points.backNotch)
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
}
// Paperless?
if (paperless) {
macro("vd", {
macro('vd', {
from: points.wristLeft,
to: points.bicepsLeft,
x: points.bicepsLeft.x - sa - 15
});
macro("vd", {
})
macro('vd', {
from: points.wristLeft,
to: points.sleeveTip,
x: points.bicepsLeft.x - sa - 30
});
macro("hd", {
})
macro('hd', {
from: points.bicepsLeft,
to: points.bicepsRight,
y: points.sleeveTip.y - sa - 30
});
macro("hd", {
})
macro('hd', {
from: points.wristLeft,
to: points.wristRight,
y: points.wristLeft.y + sa + 30
});
macro("pd", {
})
macro('pd', {
path: paths.sleevecap.reverse(),
d: -1 * sa - 15
});
})
}
return part;
};
return part
}