1
0
Fork 0
freesewing/designs/carlton/src/shared.mjs

14 lines
516 B
JavaScript
Raw Normal View History

2019-03-25 18:20:15 +01:00
/**
* This calculates a bunch of helper variables and stores them
*/
2022-09-11 12:54:41 +02:00
export function calculateRatios(part) {
2019-08-03 15:03:33 +02:00
let { store, measurements, options } = part.shorthand()
2019-03-25 18:20:15 +01:00
// 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))
2019-03-25 18:20:15 +01:00
2019-08-03 15:03:33 +02:00
store.set('waistReduction', store.get('chest') - store.get('waist'))
}