1
0
Fork 0
freesewing/packages/carlton/src/shared.js
2020-07-18 17:55:16 +02:00

13 lines
519 B
JavaScript

/**
* This calculates a bunch of helper variables and stores them
*/
export const 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'))
}