1
0
Fork 0

chore: Prettier run

This commit is contained in:
joostdecock 2022-09-10 20:26:11 +02:00
parent dd64f7492c
commit f32fdd45ad
17 changed files with 47 additions and 50 deletions

View file

@ -1,12 +1,12 @@
import { dimensions } from './shared.mjs'
import { front } from "./front.mjs"
import { front } from './front.mjs'
export const back = {
from: front,
name: 'aaron.back',
options: {
backNeckCutout: 0.05,
backlineBend: { pct: 50, min: 25, max: 100, menu: 'style' }
backlineBend: { pct: 50, min: 25, max: 100, menu: 'style' },
},
draft: ({
store,
@ -24,7 +24,6 @@ export const back = {
measurements,
part,
}) => {
// Lower back neck a bit
points.cbNeck.y = measurements.neck / 10
@ -108,6 +107,5 @@ export const back = {
}
return part
},
}
}

View file

@ -2,7 +2,6 @@ import { pctBasedOn } from '@freesewing/core'
import { base } from '@freesewing/brian'
import { dimensions } from './shared.mjs'
export const front = {
from: base,
name: 'aaron.front',
@ -44,7 +43,6 @@ export const front = {
macro,
part,
}) => {
// Hide Brian paths
for (let key of Object.keys(paths)) paths[key].render = false
@ -79,7 +77,10 @@ export const front = {
points.necklineCorner,
options.necklineBend
)
points.cfNeckCp1 = points.cfNeck.shiftFractionTowards(points.necklineCorner, options.necklineBend)
points.cfNeckCp1 = points.cfNeck.shiftFractionTowards(
points.necklineCorner,
options.necklineBend
)
// This will come in handy
store.set('armholeY', points.armhole.y * (1 + options.armholeDrop))
@ -193,6 +194,5 @@ export const front = {
}
return part
},
}
}

View file

@ -35,4 +35,3 @@ export function dimensions(macro, points, sa) {
y: points.neck.y - sa - 45,
})
}

View file

@ -84,7 +84,6 @@ export const front = {
macro,
part,
}) => {
let chestWidth = measurements.chest / 4
let bibWidth = chestWidth * options.bibWidth
let bibLength = measurements.hpsToWaistBack * options.bibLength
@ -125,7 +124,10 @@ export const front = {
points.pocketLeftBottom = points.pocketLeftTop.shift(270, pocketSize)
points.pocketRightBottom = points.pocketLeftBottom.shift(0, pocketSize)
points.crossBoxTo1 = new Point(points.topRightHem.x - strapWidth, points.topRightHem.y + hemWidth)
points.crossBoxTo1 = new Point(
points.topRightHem.x - strapWidth,
points.topRightHem.y + hemWidth
)
points.crossBoxTo2 = new Point(
points.topRightBack.x - strapWidth,
points.topRightBack.y + hemWidth
@ -253,5 +255,5 @@ export const front = {
}
return part
}
},
}

View file

@ -12,4 +12,3 @@ const Albert = new Design({
// Named exports
export { front, pocket, strap, Albert }

View file

@ -18,7 +18,6 @@ export const pocket = {
macro,
part,
}) => {
let apronLength =
measurements.hpsToWaistBack * options.bibLength +
measurements.waistToKnee * (1 + options.lengthBonus)
@ -87,6 +86,5 @@ export const pocket = {
}
return part
},
}
}

View file

@ -22,7 +22,6 @@ export const strap = {
macro,
part,
}) => {
let chestWidth = measurements.chest / 4
let bibWidth = chestWidth * options.bibWidth
/*
@ -137,5 +136,5 @@ export const strap = {
}
return part
}
},
}

View file

@ -45,7 +45,8 @@ export const bandTie = {
let bandTieLength
if (options.crossBackTies)
bandTieLength = (measurements.underbust * options.bandLength) / 2 + options.neckTieWidth * 2
else bandTieLength = (measurements.underbust + measurements.underbust * options.bandTieLength) / 2
else
bandTieLength = (measurements.underbust + measurements.underbust * options.bandTieLength) / 2
let bandTieWidth
if (options.crossBackTies) bandTieWidth = absoluteOptions.bandTieWidth * 2
else bandTieWidth = absoluteOptions.bandTieWidth
@ -86,7 +87,10 @@ export const bandTie = {
if (complete) {
points.cofLeft = points.bottomLeft.shift(0, bandTieWidth * (1 / 8))
points.grainlineLeft = points.topLeft.translate(bandTieWidth * (1 / 8), bandTieLength * (3 / 4))
points.grainlineLeft = points.topLeft.translate(
bandTieWidth * (1 / 8),
bandTieLength * (3 / 4)
)
points.title = points.topLeft.translate(bandTieWidth * (1 / 8), bandTieLength * (1 / 4))
if (!options.crossBackTies) {
macro('title', {
@ -201,6 +205,5 @@ export const bandTie = {
}
return part
},
}
}

View file

@ -391,6 +391,5 @@ export const cup = {
}
}
return part
},
}
}

View file

@ -10,4 +10,3 @@ const Bee = new Design({
})
export { cup, neckTie, bandTie, Bee }

View file

@ -55,7 +55,8 @@ export const neckTie = {
measurements.underbust -
measurements.underbust * options.bandLength * options.neckTieLength) /
2
else neckTieLength = (measurements.hpsToBust + measurements.hpsToBust * options.neckTieLength) / 2
else
neckTieLength = (measurements.hpsToBust + measurements.hpsToBust * options.neckTieLength) / 2
store.set('neckTieLength', neckTieLength * 2)
points.topLeft = new Point(0, 0)
points.topRight = new Point(absoluteOptions.neckTieWidth * 2, points.topLeft.y)
@ -187,6 +188,5 @@ export const neckTie = {
}
return part
},
}
}

View file

@ -10,7 +10,7 @@ import { testPatternDrafting } from '../../../tests/designs/drafting.mjs'
testPatternConfig(Bee)
// Test drafting - Change the second parameter to `true` to log errors
testPatternDrafting(Bee, false)
testPatternDrafting(Bee, true)
// Test sampling - Change the second parameter to `true` to log errors
//testPatternSampling(Bee, false)

View file

@ -66,7 +66,6 @@ export const back = {
log,
part,
}) => {
// Get to work
points.cbNeck = new Point(0, measurements.neck * options.backNeckCutout)
points.hps = new Point(measurements.neck * options.neckWidthBack, 0)
@ -107,7 +106,10 @@ export const back = {
(reduction * (1 - options.backCenterWaistReduction * 0.5)) / 2
)
points.dartBottomRight = points.dartBottomLeft.rotate(180, points.dartBottomCenter)
points.dartLeftCp = points.dartBottomLeft.shift(90, points.dartTip.dy(points.dartBottomLeft) / 2)
points.dartLeftCp = points.dartBottomLeft.shift(
90,
points.dartTip.dy(points.dartBottomLeft) / 2
)
points.dartRightCp = new Point(points.dartBottomRight.x, points.dartLeftCp.y)
// Find out location of the armhole
let armholeDepth = measurements.hpsToWaistBack * options.armholeDepth + points.shoulder.y
@ -366,6 +368,5 @@ export const back = {
}
return part
},
}
}

View file

@ -18,7 +18,6 @@ export const frontSideDart = {
measurements,
part,
}) => {
// Get to work
points.cfNeck = new Point(0, measurements.neck * options.collarFactor)
points.hps = new Point(measurements.neck * options.neckWidthFront, 0)
@ -161,7 +160,10 @@ export const frontSideDart = {
points.bust,
options.waistDartLength
)
points.waistDartLeftCp = points.waistDartLeft.shift(90, points.waistDartHem.dist(points.bust) / 2)
points.waistDartLeftCp = points.waistDartLeft.shift(
90,
points.waistDartHem.dist(points.bust) / 2
)
points.waistDartRightCp = points.waistDartRight.shift(
90,
points.waistDartHem.dist(points.bust) / 2
@ -333,6 +335,5 @@ export const frontSideDart = {
}
return part
},
}
}

View file

@ -9,4 +9,3 @@ const Bella = new Design({
})
export { back, frontSideDart, Bella }

View file

@ -10,7 +10,7 @@ import { testPatternDrafting } from '../../../tests/designs/drafting.mjs'
testPatternConfig(Bent)
// Test drafting - Change the second parameter to `true` to log errors
testPatternDrafting(Bent, false)
testPatternDrafting(Bent, true)
// Test sampling - Change the second parameter to `true` to log errors
//testPatternSampling(Bent, false)