🎨 Updated prettier config
This commit is contained in:
parent
b8e632998b
commit
6710d76b08
401 changed files with 13193 additions and 15620 deletions
|
@ -2,19 +2,20 @@
|
|||
* This calculates a bunch of helper variables and stores them
|
||||
*/
|
||||
export const calculateRatios = part => {
|
||||
let { store, measurements, options } = part.shorthand();
|
||||
let { store, measurements, options } = part.shorthand()
|
||||
|
||||
// Make sure collar height makes sense
|
||||
if (options.collarHeight * 2 < options.rollLineCollarHeight) options.rollLineCollarHeight = options.collarHeight * 2;
|
||||
if (options.collarHeight * 2 < options.rollLineCollarHeight)
|
||||
options.rollLineCollarHeight = options.collarHeight * 2
|
||||
|
||||
// Calculate different values for reducing from chest to hips via waist
|
||||
store.set("chest", measurements.chestCircumference * (1 + options.chestEase));
|
||||
store.set("waist", measurements.naturalWaist * (1 + options.waistEase));
|
||||
store.set("hips", measurements.hipsCircumference * (1 + options.hipsEase));
|
||||
store.set('chest', measurements.chestCircumference * (1 + options.chestEase))
|
||||
store.set('waist', measurements.naturalWaist * (1 + options.waistEase))
|
||||
store.set('hips', measurements.hipsCircumference * (1 + options.hipsEase))
|
||||
|
||||
store.set("waistReduction", store.get("chest") - store.get("waist"));
|
||||
store.set("hipsReduction", store.get("chest") - store.get("hips"));
|
||||
};
|
||||
store.set('waistReduction', store.get('chest') - store.get('waist'))
|
||||
store.set('hipsReduction', store.get('chest') - store.get('hips'))
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the line seperating side panel (back-side boundary, aka bs)
|
||||
|
@ -27,32 +28,28 @@ export const calculateRatios = part => {
|
|||
*
|
||||
* The optional flip parameter mirrors this for the front part
|
||||
*/
|
||||
export const backSideBoundary = (part, flip=false) => {
|
||||
export const backSideBoundary = (part, flip = false) => {
|
||||
let { points, Point, paths, Path } = part.shorthand()
|
||||
|
||||
let { points, Point, paths, Path } = part.shorthand();
|
||||
|
||||
points.bsArmholeHollow = points.armholeHollow.clone();
|
||||
points.bsArmholeHollowCp2 = points.armholeHollowCp2.rotate(90, points.armholeHollow);
|
||||
points.bsWaist = new Point(
|
||||
points.bsArmholeHollowCp2.x,
|
||||
points.waist.y
|
||||
);
|
||||
points.bsHips = new Point(points.bsWaist.x, points.hips.y);
|
||||
points.bsHem = new Point(points.bsWaist.x, points.hem.y);
|
||||
points.bsArmholeHollow = points.armholeHollow.clone()
|
||||
points.bsArmholeHollowCp2 = points.armholeHollowCp2.rotate(90, points.armholeHollow)
|
||||
points.bsWaist = new Point(points.bsArmholeHollowCp2.x, points.waist.y)
|
||||
points.bsHips = new Point(points.bsWaist.x, points.hips.y)
|
||||
points.bsHem = new Point(points.bsWaist.x, points.hem.y)
|
||||
|
||||
if (flip) {
|
||||
points.bsArmholeHollowCp1 = points.armholeHollowCp1.clone();
|
||||
points.bsArmholeCp2 = points.armholeCp2.clone();
|
||||
points.bsArmholeHollowCp1 = points.armholeHollowCp1.clone()
|
||||
points.bsArmholeCp2 = points.armholeCp2.clone()
|
||||
for (let p of [
|
||||
"bsArmholeHollow",
|
||||
"bsArmholeHollowCp2",
|
||||
"bsWaist",
|
||||
"bsHips",
|
||||
"bsHem",
|
||||
"bsArmholeHollowCp1",
|
||||
"bsArmholeCp2"
|
||||
'bsArmholeHollow',
|
||||
'bsArmholeHollowCp2',
|
||||
'bsWaist',
|
||||
'bsHips',
|
||||
'bsHem',
|
||||
'bsArmholeHollowCp1',
|
||||
'bsArmholeCp2'
|
||||
]) {
|
||||
points[p] = points[p].flipX(points.armhole);
|
||||
points[p] = points[p].flipX(points.armhole)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,6 +59,6 @@ export const backSideBoundary = (part, flip=false) => {
|
|||
.move(points.bsHem)
|
||||
.line(points.bsWaist)
|
||||
._curve(points.bsArmholeHollowCp2, points.bsArmholeHollow)
|
||||
.attr("class", "stroke-xl lining lashed")
|
||||
if (flip) paths.bs.curve(points.bsArmholeHollowCp1, points.bsArmholeCp2, points.armhole);
|
||||
.attr('class', 'stroke-xl lining lashed')
|
||||
if (flip) paths.bs.curve(points.bsArmholeHollowCp1, points.bsArmholeCp2, points.armhole)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue