diff --git a/packages/models/.editorconfig b/packages/models/.editorconfig new file mode 100644 index 00000000000..9142239769f --- /dev/null +++ b/packages/models/.editorconfig @@ -0,0 +1,13 @@ +# editorconfig.org +root = true + +[*] +indent_size = 2 +indent_style = space +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/packages/models/README.md b/packages/models/README.md index 3d89ea69c05..110ed6bb0aa 100644 --- a/packages/models/README.md +++ b/packages/models/README.md @@ -1,2 +1,43 @@ -# models -A set of body measurement data for a range of standard models/sizes +# Models +A set of body measurement data for a range of standard models/sizes. + +This is used in freesewing for comparing made-to-measure sewing patterns to a range of standard sizes. + +## Install + +npm install --save @freesewing/models + +## Usage + +```js +import { manSize38 } from @freesewing/models +``` + +which will give you an object with `measurement: value` pairs. +The example above gives you: + +```js +{ + bicepsCircumference: 305, + centerBackNeckToWaist: 495, + chestCircumference: 965, + hipsCircumference: 838, + naturalWaistToHip: 110, + neckCircumference: 391, + shoulderSlope: 49, + shoulderToShoulder: 444, + shoulderToWrist: 680, + wristCircumference: 185 +} +``` + +Available imports are: + + - manSize34 + - manSize36 + - manSize40 + - manSize42 + - manSize44 + - men + + Note that `men` will return an object containing all the sizes. diff --git a/packages/models/index.js b/packages/models/index.js new file mode 100644 index 00000000000..0fffba4f488 --- /dev/null +++ b/packages/models/index.js @@ -0,0 +1,94 @@ +const manSize34 = { + bicepsCircumference: 335, + centerBackNeckToWaist: 489, + chestCircumference: 849, + hipsCircumference: 722, + naturalWaistToHip: 100, + neckCircumference: 366, + shoulderSlope: 43, + shoulderToShoulder: 419, + shoulderToWrist: 670, + wristCircumference: 175 +}; + +const manSize36 = { + bicepsCircumference: 290, + centerBackNeckToWaist: 492, + chestCircumference: 907, + hipsCircumference: 780, + naturalWaistToHip: 105, + neckCircumference: 378, + shoulderSlope: 46, + shoulderToShoulder: 431, + shoulderToWrist: 675, + wristCircumference: 180 +}; + +const manSize38 = { + bicepsCircumference: 305, + centerBackNeckToWaist: 495, + chestCircumference: 965, + hipsCircumference: 838, + naturalWaistToHip: 110, + neckCircumference: 391, + shoulderSlope: 49, + shoulderToShoulder: 444, + shoulderToWrist: 680, + wristCircumference: 185 +}; + +const manSize40 = { + bicepsCircumference: 320, + centerBackNeckToWaist: 498, + chestCircumference: 1023, + hipsCircumference: 896, + naturalWaistToHip: 115, + neckCircumference: 404, + shoulderSlope: 52, + shoulderToShoulder: 457, + shoulderToWrist: 685, + wristCircumference: 190 +}; + +const manSize42 = { + bicepsCircumference: 335, + centerBackNeckToWaist: 501, + chestCircumference: 1081, + hipsCircumference: 895, + naturalWaistToHip: 120, + neckCircumference: 416, + shoulderSlope: 55, + shoulderToShoulder: 470, + shoulderToWrist: 690, + wristCircumference: 195 +}; + +const manSize44 = { + bicepsCircumference: 350, + centerBackNeckToWaist: 505, + chestCircumference: 1139, + hipsCircumference: 1012, + naturalWaistToHip: 125, + neckCircumference: 429, + shoulderSlope: 58, + shoulderToShoulder: 483, + shoulderToWrist: 700, + wristCircumference: 200 +}; + +const men = { + manSize34, + manSize36, + manSize38, + manSize40, + manSize42, + manSize44 +} + +module.exports.manSize34 = manSize34; +module.exports.manSize36 = manSize36; +module.exports.manSize38 = manSize38; +module.exports.manSize40 = manSize40; +module.exports.manSize42 = manSize42; +module.exports.manSize44 = manSize44; +module.exports.men = men; diff --git a/packages/models/package.json b/packages/models/package.json new file mode 100644 index 00000000000..1044e6e38cc --- /dev/null +++ b/packages/models/package.json @@ -0,0 +1,19 @@ +{ + "name": "@freesewing/models", + "version": "0.0.1", + "description": "Body measurements data for a range of default sizes", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/joostdecock/models.git" + }, + "author": "Joost De Cock ", + "license": "MIT", + "bugs": { + "url": "https://github.com/joostdecock/models/issues" + }, + "homepage": "https://github.com/joostdecock/models#readme" +}