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

@ -6,7 +6,7 @@ import { front } from './front.mjs'
// Setup our new design
const Aaron = new Design({
data,
parts: [ back, front ],
parts: [back, front],
})
// Named exports

View file

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

View file

@ -61,14 +61,14 @@ const crossBox = {
export const front = {
name: 'albert.front',
measurements: [ 'chest', 'hpsToWaistBack', 'waist', 'waistToKnee', 'hips' ],
measurements: ['chest', 'hpsToWaistBack', 'waist', 'waistToKnee', 'hips'],
options: {
backOpening: { pct: 10, min: 0, max: 25, menu: 'fit' },
bibWidth: { pct: 100, min: 50, max: 125, menu: 'style' },
bibLength: { pct: 75, min: 0, max: 90, menu: 'style' },
lengthBonus: { pct: 0, min: -20, max: 25, menu: 'style' },
},
plugins: [ pluginBundle, crossBox ],
plugins: [pluginBundle, crossBox],
draft: ({
options,
measurements,
@ -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

@ -7,9 +7,8 @@ import { strap } from './strap.mjs'
// Setup our new design
const Albert = new Design({
data,
parts: [ front, pocket, strap ],
parts: [front, pocket, strap],
})
// 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

@ -6,8 +6,7 @@ import { bandTie } from './band-tie.mjs'
const Bee = new Design({
data,
parts: [ cup, neckTie, bandTie ],
parts: [cup, neckTie, bandTie],
})
export { cup, neckTie, bandTie, Bee }

View file

@ -3,7 +3,7 @@ import { pluginBundle } from '@freesewing/plugin-bundle'
export const neckTie = {
name: 'bee.neckTie',
measurements: [ 'underbust', 'hpsToBust', 'hpsToWaistFront' ],
measurements: ['underbust', 'hpsToBust', 'hpsToWaistFront'],
options: {
ties: { bool: true, menu: 'style' },
crossBackTies: { bool: false, menu: 'style' },
@ -23,7 +23,7 @@ export const neckTie = {
neckTieEnds: { dflt: 'straight', list: ['straight', 'pointed'], menu: 'style' },
neckTieColours: { dflt: 'one', list: ['one', 'two'], menu: 'style' },
},
plugins: [ pluginBundle ],
plugins: [pluginBundle],
draft: ({
store,
sa,
@ -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

@ -49,7 +49,7 @@ export const back = {
frontShoulderWidth: { pct: 95, max: 98, min: 92, menu: 'advanced' },
highBustWidth: { pct: 86, max: 92, min: 80, menu: 'advanced' },
},
plugins: [ pluginBundle ],
plugins: [pluginBundle],
draft: ({
store,
sa,
@ -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

@ -5,8 +5,7 @@ import { frontSideDart } from './front-side-dart.mjs'
const Bella = new Design({
data,
parts: [ back, frontSideDart ],
parts: [back, frontSideDart],
})
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)