sparkles: Back part
This commit is contained in:
parent
7581a6c0fb
commit
58729a32b0
14 changed files with 7025 additions and 1 deletions
18
packages/simon/src/shared.js
Normal file
18
packages/simon/src/shared.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
export const calculateReduction = function(part) {
|
||||
let { store, measurements, options } = part.shorthand();
|
||||
if(store.get('reduction') === true) return;
|
||||
|
||||
let chest = measurements.chestCircumference * (1+ options.chestEase);
|
||||
let waist = measurements.naturalWaist * (1+ options.waistEase);
|
||||
let hips = measurements.hipsCircumference * (1+ options.hipsEase);
|
||||
let waistReduction = chest - waist;
|
||||
let hipsReduction = chest - hips;
|
||||
|
||||
// If your waist > chest, this pattern is not going to work for you as-is.
|
||||
if (waistReduction < 0) waistReduction = 0;
|
||||
if (hipsReduction < 0) hipsReduction = 0;
|
||||
store.set("waistReduction", waistReduction);
|
||||
store.set("hipsReduction", hipsReduction);
|
||||
store.set("reduction", true);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue