1
0
Fork 0

Added everything for Model Graph component

This commit is contained in:
Joost De Cock 2019-08-24 18:25:05 +02:00
parent aa112bb206
commit 1e37f1147c
12 changed files with 622 additions and 713 deletions

View file

@ -7,6 +7,7 @@ export default [
'defaultSa',
'formatImperial',
'formatMm',
'neckstimate',
'optionDefault',
'optionType',
'roundMm',

View file

@ -0,0 +1,24 @@
import withBreasts from './with-breasts'
import withoutBreasts from './without-breasts'
// This estimates a measurement based on the neck circumference
const neckstimate = (neckCircumference = false, measurement = false, breasts = false) => {
const data = breasts ? withBreasts : withoutBreasts
if (!neckCircumference)
throw new Error('neckstimate() requires a neck circumference in mm as first parameter')
if (!measurement || typeof data[measurement] === 'undefined') {
throw new Error(
'neckstimate() requires a valid measurement name as second parameter. (received ' +
measurement +
')'
)
}
return (
data[measurement].base +
(neckCircumference - data.neckCircumference.base) * data[measurement].slope
)
}
export default neckstimate

View file

@ -0,0 +1,114 @@
export default {
ankleCircumference: {
slope: 0.15,
base: 245
},
bicepsCircumference: {
slope: 0.45,
base: 280
},
centerBackNeckToWaist: {
slope: 0.15,
base: 416
},
chestCircumference: {
slope: 2.0,
base: 880
},
headCircumference: {
slope: 0.15,
base: 496
},
hipsCircumference: {
slope: 2.0,
base: 880
},
hipsToUpperLeg: {
slope: 0.1,
base: 190
},
inseam: {
slope: 0.2,
base: 799
},
kneeCircumference: {
slope: 0.15,
base: 360
},
naturalWaist: {
slope: 2.0,
base: 720
},
naturalWaistToFloor: {
slope: 0.1,
base: 1060
},
naturalWaistToHip: {
slope: 0.05,
base: 125
},
naturalWaistToKnee: {
slope: 0.07,
base: 530
},
naturalWaistToSeat: {
slope: 0.05,
base: 206
},
neckCircumference: {
slope: 1,
base: 360
},
seatCircumference: {
slope: 2,
base: 970
},
seatDepth: {
slope: 0.02,
base: 261
},
shoulderSlope: {
slope: 0.01,
base: 40
},
shoulderToElbow: {
slope: 0.1,
base: 325
},
shoulderToShoulder: {
slope: 0.3,
base: 410
},
shoulderToWrist: {
slope: 0.15,
base: 599
},
upperLegCircumference: {
slope: 0.35,
base: 520
},
wristCircumference: {
slope: 0.1,
base: 158
},
bustSpan: {
slope: 0.1,
base: 160
},
highBust: {
slope: 2,
base: 820
},
highPointShoulderToBust: {
slope: 0.1,
base: 28.5
},
naturalWaistToUnderbust: {
slope: 0.1,
base: 135
},
underbust: {
slope: 2,
base: 710
}
}

View file

@ -0,0 +1,94 @@
export default {
ankleCircumference: {
slope: 0.15,
base: 256
},
bicepsCircumference: {
slope: 0.45,
base: 325
},
centerBackNeckToWaist: {
slope: 0.15,
base: 453
},
chestCircumference: {
slope: 2.0,
base: 1040
},
headCircumference: {
slope: 0.15,
base: 579
},
hipsCircumference: {
slope: 2.0,
base: 920
},
hipsToUpperLeg: {
slope: 0.1,
base: 220
},
inseam: {
slope: 0.2,
base: 850
},
kneeCircumference: {
slope: 0.15,
base: 410
},
naturalWaist: {
slope: 2.0,
base: 880
},
naturalWaistToFloor: {
slope: 0.1,
base: 1300
},
naturalWaistToHip: {
slope: 0.05,
base: 180
},
naturalWaistToKnee: {
slope: 0.07,
base: 580
},
naturalWaistToSeat: {
slope: 0.05,
base: 280
},
neckCircumference: {
slope: 1,
base: 420
},
seatCircumference: {
slope: 2,
base: 1060
},
seatDepth: {
slope: 0.02,
base: 300
},
shoulderSlope: {
slope: 0.01,
base: 50
},
shoulderToElbow: {
slope: 0.1,
base: 345
},
shoulderToShoulder: {
slope: 0.3,
base: 460
},
shoulderToWrist: {
slope: 0.15,
base: 640
},
upperLegCircumference: {
slope: 0.35,
base: 599
},
wristCircumference: {
slope: 0.1,
base: 180
}
}