chore: Prettier run
This commit is contained in:
parent
dd64f7492c
commit
f32fdd45ad
17 changed files with 47 additions and 50 deletions
|
@ -1,12 +1,12 @@
|
||||||
import { dimensions } from './shared.mjs'
|
import { dimensions } from './shared.mjs'
|
||||||
import { front } from "./front.mjs"
|
import { front } from './front.mjs'
|
||||||
|
|
||||||
export const back = {
|
export const back = {
|
||||||
from: front,
|
from: front,
|
||||||
name: 'aaron.back',
|
name: 'aaron.back',
|
||||||
options: {
|
options: {
|
||||||
backNeckCutout: 0.05,
|
backNeckCutout: 0.05,
|
||||||
backlineBend: { pct: 50, min: 25, max: 100, menu: 'style' }
|
backlineBend: { pct: 50, min: 25, max: 100, menu: 'style' },
|
||||||
},
|
},
|
||||||
draft: ({
|
draft: ({
|
||||||
store,
|
store,
|
||||||
|
@ -24,7 +24,6 @@ export const back = {
|
||||||
measurements,
|
measurements,
|
||||||
part,
|
part,
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
// Lower back neck a bit
|
// Lower back neck a bit
|
||||||
points.cbNeck.y = measurements.neck / 10
|
points.cbNeck.y = measurements.neck / 10
|
||||||
|
|
||||||
|
@ -108,6 +107,5 @@ export const back = {
|
||||||
}
|
}
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { pctBasedOn } from '@freesewing/core'
|
||||||
import { base } from '@freesewing/brian'
|
import { base } from '@freesewing/brian'
|
||||||
import { dimensions } from './shared.mjs'
|
import { dimensions } from './shared.mjs'
|
||||||
|
|
||||||
|
|
||||||
export const front = {
|
export const front = {
|
||||||
from: base,
|
from: base,
|
||||||
name: 'aaron.front',
|
name: 'aaron.front',
|
||||||
|
@ -44,7 +43,6 @@ export const front = {
|
||||||
macro,
|
macro,
|
||||||
part,
|
part,
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
// Hide Brian paths
|
// Hide Brian paths
|
||||||
for (let key of Object.keys(paths)) paths[key].render = false
|
for (let key of Object.keys(paths)) paths[key].render = false
|
||||||
|
|
||||||
|
@ -79,7 +77,10 @@ export const front = {
|
||||||
points.necklineCorner,
|
points.necklineCorner,
|
||||||
options.necklineBend
|
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
|
// This will come in handy
|
||||||
store.set('armholeY', points.armhole.y * (1 + options.armholeDrop))
|
store.set('armholeY', points.armhole.y * (1 + options.armholeDrop))
|
||||||
|
@ -193,6 +194,5 @@ export const front = {
|
||||||
}
|
}
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { front } from './front.mjs'
|
||||||
// Setup our new design
|
// Setup our new design
|
||||||
const Aaron = new Design({
|
const Aaron = new Design({
|
||||||
data,
|
data,
|
||||||
parts: [ back, front ],
|
parts: [back, front],
|
||||||
})
|
})
|
||||||
|
|
||||||
// Named exports
|
// Named exports
|
||||||
|
|
|
@ -35,4 +35,3 @@ export function dimensions(macro, points, sa) {
|
||||||
y: points.neck.y - sa - 45,
|
y: points.neck.y - sa - 45,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,14 +61,14 @@ const crossBox = {
|
||||||
|
|
||||||
export const front = {
|
export const front = {
|
||||||
name: 'albert.front',
|
name: 'albert.front',
|
||||||
measurements: [ 'chest', 'hpsToWaistBack', 'waist', 'waistToKnee', 'hips' ],
|
measurements: ['chest', 'hpsToWaistBack', 'waist', 'waistToKnee', 'hips'],
|
||||||
options: {
|
options: {
|
||||||
backOpening: { pct: 10, min: 0, max: 25, menu: 'fit' },
|
backOpening: { pct: 10, min: 0, max: 25, menu: 'fit' },
|
||||||
bibWidth: { pct: 100, min: 50, max: 125, menu: 'style' },
|
bibWidth: { pct: 100, min: 50, max: 125, menu: 'style' },
|
||||||
bibLength: { pct: 75, min: 0, max: 90, menu: 'style' },
|
bibLength: { pct: 75, min: 0, max: 90, menu: 'style' },
|
||||||
lengthBonus: { pct: 0, min: -20, max: 25, menu: 'style' },
|
lengthBonus: { pct: 0, min: -20, max: 25, menu: 'style' },
|
||||||
},
|
},
|
||||||
plugins: [ pluginBundle, crossBox ],
|
plugins: [pluginBundle, crossBox],
|
||||||
draft: ({
|
draft: ({
|
||||||
options,
|
options,
|
||||||
measurements,
|
measurements,
|
||||||
|
@ -84,7 +84,6 @@ export const front = {
|
||||||
macro,
|
macro,
|
||||||
part,
|
part,
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
let chestWidth = measurements.chest / 4
|
let chestWidth = measurements.chest / 4
|
||||||
let bibWidth = chestWidth * options.bibWidth
|
let bibWidth = chestWidth * options.bibWidth
|
||||||
let bibLength = measurements.hpsToWaistBack * options.bibLength
|
let bibLength = measurements.hpsToWaistBack * options.bibLength
|
||||||
|
@ -125,7 +124,10 @@ export const front = {
|
||||||
points.pocketLeftBottom = points.pocketLeftTop.shift(270, pocketSize)
|
points.pocketLeftBottom = points.pocketLeftTop.shift(270, pocketSize)
|
||||||
points.pocketRightBottom = points.pocketLeftBottom.shift(0, 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.crossBoxTo2 = new Point(
|
||||||
points.topRightBack.x - strapWidth,
|
points.topRightBack.x - strapWidth,
|
||||||
points.topRightBack.y + hemWidth
|
points.topRightBack.y + hemWidth
|
||||||
|
@ -253,5 +255,5 @@ export const front = {
|
||||||
}
|
}
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,9 +7,8 @@ import { strap } from './strap.mjs'
|
||||||
// Setup our new design
|
// Setup our new design
|
||||||
const Albert = new Design({
|
const Albert = new Design({
|
||||||
data,
|
data,
|
||||||
parts: [ front, pocket, strap ],
|
parts: [front, pocket, strap],
|
||||||
})
|
})
|
||||||
|
|
||||||
// Named exports
|
// Named exports
|
||||||
export { front, pocket, strap, Albert }
|
export { front, pocket, strap, Albert }
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ export const pocket = {
|
||||||
macro,
|
macro,
|
||||||
part,
|
part,
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
let apronLength =
|
let apronLength =
|
||||||
measurements.hpsToWaistBack * options.bibLength +
|
measurements.hpsToWaistBack * options.bibLength +
|
||||||
measurements.waistToKnee * (1 + options.lengthBonus)
|
measurements.waistToKnee * (1 + options.lengthBonus)
|
||||||
|
@ -87,6 +86,5 @@ export const pocket = {
|
||||||
}
|
}
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ export const strap = {
|
||||||
macro,
|
macro,
|
||||||
part,
|
part,
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
let chestWidth = measurements.chest / 4
|
let chestWidth = measurements.chest / 4
|
||||||
let bibWidth = chestWidth * options.bibWidth
|
let bibWidth = chestWidth * options.bibWidth
|
||||||
/*
|
/*
|
||||||
|
@ -137,5 +136,5 @@ export const strap = {
|
||||||
}
|
}
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,8 @@ export const bandTie = {
|
||||||
let bandTieLength
|
let bandTieLength
|
||||||
if (options.crossBackTies)
|
if (options.crossBackTies)
|
||||||
bandTieLength = (measurements.underbust * options.bandLength) / 2 + options.neckTieWidth * 2
|
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
|
let bandTieWidth
|
||||||
if (options.crossBackTies) bandTieWidth = absoluteOptions.bandTieWidth * 2
|
if (options.crossBackTies) bandTieWidth = absoluteOptions.bandTieWidth * 2
|
||||||
else bandTieWidth = absoluteOptions.bandTieWidth
|
else bandTieWidth = absoluteOptions.bandTieWidth
|
||||||
|
@ -86,7 +87,10 @@ export const bandTie = {
|
||||||
|
|
||||||
if (complete) {
|
if (complete) {
|
||||||
points.cofLeft = points.bottomLeft.shift(0, bandTieWidth * (1 / 8))
|
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))
|
points.title = points.topLeft.translate(bandTieWidth * (1 / 8), bandTieLength * (1 / 4))
|
||||||
if (!options.crossBackTies) {
|
if (!options.crossBackTies) {
|
||||||
macro('title', {
|
macro('title', {
|
||||||
|
@ -201,6 +205,5 @@ export const bandTie = {
|
||||||
}
|
}
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -391,6 +391,5 @@ export const cup = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return part
|
return part
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,7 @@ import { bandTie } from './band-tie.mjs'
|
||||||
|
|
||||||
const Bee = new Design({
|
const Bee = new Design({
|
||||||
data,
|
data,
|
||||||
parts: [ cup, neckTie, bandTie ],
|
parts: [cup, neckTie, bandTie],
|
||||||
})
|
})
|
||||||
|
|
||||||
export { cup, neckTie, bandTie, Bee }
|
export { cup, neckTie, bandTie, Bee }
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { pluginBundle } from '@freesewing/plugin-bundle'
|
||||||
|
|
||||||
export const neckTie = {
|
export const neckTie = {
|
||||||
name: 'bee.neckTie',
|
name: 'bee.neckTie',
|
||||||
measurements: [ 'underbust', 'hpsToBust', 'hpsToWaistFront' ],
|
measurements: ['underbust', 'hpsToBust', 'hpsToWaistFront'],
|
||||||
options: {
|
options: {
|
||||||
ties: { bool: true, menu: 'style' },
|
ties: { bool: true, menu: 'style' },
|
||||||
crossBackTies: { bool: false, menu: 'style' },
|
crossBackTies: { bool: false, menu: 'style' },
|
||||||
|
@ -23,7 +23,7 @@ export const neckTie = {
|
||||||
neckTieEnds: { dflt: 'straight', list: ['straight', 'pointed'], menu: 'style' },
|
neckTieEnds: { dflt: 'straight', list: ['straight', 'pointed'], menu: 'style' },
|
||||||
neckTieColours: { dflt: 'one', list: ['one', 'two'], menu: 'style' },
|
neckTieColours: { dflt: 'one', list: ['one', 'two'], menu: 'style' },
|
||||||
},
|
},
|
||||||
plugins: [ pluginBundle ],
|
plugins: [pluginBundle],
|
||||||
draft: ({
|
draft: ({
|
||||||
store,
|
store,
|
||||||
sa,
|
sa,
|
||||||
|
@ -55,7 +55,8 @@ export const neckTie = {
|
||||||
measurements.underbust -
|
measurements.underbust -
|
||||||
measurements.underbust * options.bandLength * options.neckTieLength) /
|
measurements.underbust * options.bandLength * options.neckTieLength) /
|
||||||
2
|
2
|
||||||
else neckTieLength = (measurements.hpsToBust + measurements.hpsToBust * options.neckTieLength) / 2
|
else
|
||||||
|
neckTieLength = (measurements.hpsToBust + measurements.hpsToBust * options.neckTieLength) / 2
|
||||||
store.set('neckTieLength', neckTieLength * 2)
|
store.set('neckTieLength', neckTieLength * 2)
|
||||||
points.topLeft = new Point(0, 0)
|
points.topLeft = new Point(0, 0)
|
||||||
points.topRight = new Point(absoluteOptions.neckTieWidth * 2, points.topLeft.y)
|
points.topRight = new Point(absoluteOptions.neckTieWidth * 2, points.topLeft.y)
|
||||||
|
@ -187,6 +188,5 @@ export const neckTie = {
|
||||||
}
|
}
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { testPatternDrafting } from '../../../tests/designs/drafting.mjs'
|
||||||
testPatternConfig(Bee)
|
testPatternConfig(Bee)
|
||||||
|
|
||||||
// Test drafting - Change the second parameter to `true` to log errors
|
// 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
|
// Test sampling - Change the second parameter to `true` to log errors
|
||||||
//testPatternSampling(Bee, false)
|
//testPatternSampling(Bee, false)
|
||||||
|
|
|
@ -49,7 +49,7 @@ export const back = {
|
||||||
frontShoulderWidth: { pct: 95, max: 98, min: 92, menu: 'advanced' },
|
frontShoulderWidth: { pct: 95, max: 98, min: 92, menu: 'advanced' },
|
||||||
highBustWidth: { pct: 86, max: 92, min: 80, menu: 'advanced' },
|
highBustWidth: { pct: 86, max: 92, min: 80, menu: 'advanced' },
|
||||||
},
|
},
|
||||||
plugins: [ pluginBundle ],
|
plugins: [pluginBundle],
|
||||||
draft: ({
|
draft: ({
|
||||||
store,
|
store,
|
||||||
sa,
|
sa,
|
||||||
|
@ -66,7 +66,6 @@ export const back = {
|
||||||
log,
|
log,
|
||||||
part,
|
part,
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
// Get to work
|
// Get to work
|
||||||
points.cbNeck = new Point(0, measurements.neck * options.backNeckCutout)
|
points.cbNeck = new Point(0, measurements.neck * options.backNeckCutout)
|
||||||
points.hps = new Point(measurements.neck * options.neckWidthBack, 0)
|
points.hps = new Point(measurements.neck * options.neckWidthBack, 0)
|
||||||
|
@ -107,7 +106,10 @@ export const back = {
|
||||||
(reduction * (1 - options.backCenterWaistReduction * 0.5)) / 2
|
(reduction * (1 - options.backCenterWaistReduction * 0.5)) / 2
|
||||||
)
|
)
|
||||||
points.dartBottomRight = points.dartBottomLeft.rotate(180, points.dartBottomCenter)
|
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)
|
points.dartRightCp = new Point(points.dartBottomRight.x, points.dartLeftCp.y)
|
||||||
// Find out location of the armhole
|
// Find out location of the armhole
|
||||||
let armholeDepth = measurements.hpsToWaistBack * options.armholeDepth + points.shoulder.y
|
let armholeDepth = measurements.hpsToWaistBack * options.armholeDepth + points.shoulder.y
|
||||||
|
@ -366,6 +368,5 @@ export const back = {
|
||||||
}
|
}
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ export const frontSideDart = {
|
||||||
measurements,
|
measurements,
|
||||||
part,
|
part,
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
// Get to work
|
// Get to work
|
||||||
points.cfNeck = new Point(0, measurements.neck * options.collarFactor)
|
points.cfNeck = new Point(0, measurements.neck * options.collarFactor)
|
||||||
points.hps = new Point(measurements.neck * options.neckWidthFront, 0)
|
points.hps = new Point(measurements.neck * options.neckWidthFront, 0)
|
||||||
|
@ -161,7 +160,10 @@ export const frontSideDart = {
|
||||||
points.bust,
|
points.bust,
|
||||||
options.waistDartLength
|
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(
|
points.waistDartRightCp = points.waistDartRight.shift(
|
||||||
90,
|
90,
|
||||||
points.waistDartHem.dist(points.bust) / 2
|
points.waistDartHem.dist(points.bust) / 2
|
||||||
|
@ -333,6 +335,5 @@ export const frontSideDart = {
|
||||||
}
|
}
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,7 @@ import { frontSideDart } from './front-side-dart.mjs'
|
||||||
|
|
||||||
const Bella = new Design({
|
const Bella = new Design({
|
||||||
data,
|
data,
|
||||||
parts: [ back, frontSideDart ],
|
parts: [back, frontSideDart],
|
||||||
})
|
})
|
||||||
|
|
||||||
export { back, frontSideDart, Bella }
|
export { back, frontSideDart, Bella }
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { testPatternDrafting } from '../../../tests/designs/drafting.mjs'
|
||||||
testPatternConfig(Bent)
|
testPatternConfig(Bent)
|
||||||
|
|
||||||
// Test drafting - Change the second parameter to `true` to log errors
|
// 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
|
// Test sampling - Change the second parameter to `true` to log errors
|
||||||
//testPatternSampling(Bent, false)
|
//testPatternSampling(Bent, false)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue