1
0
Fork 0
freesewing/designs/carlton/src/shared.mjs
2022-09-11 12:54:41 +02:00

13 lines
516 B
JavaScript

/**
* This calculates a bunch of helper variables and stores them
*/
export function calculateRatios(part) {
let { store, measurements, options } = part.shorthand()
// Calculate different values for reducing from chest to hips via waist
store.set('chest', measurements.chest * (1 + options.chestEase))
store.set('waist', measurements.waist * (1 + options.waistEase))
store.set('seat', measurements.seat * (1 + options.seatEase))
store.set('waistReduction', store.get('chest') - store.get('waist'))
}