format and camelCase changes
This commit is contained in:
parent
f34208aaae
commit
a45e1a1db8
3 changed files with 10 additions and 10 deletions
|
@ -4,16 +4,16 @@ import { version } from '../package.json'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'holmes',
|
name: 'holmes',
|
||||||
version: "2.17.5",
|
version,
|
||||||
design: 'Erica Alcusa Sáez',
|
design: 'Erica Alcusa Sáez',
|
||||||
code: 'Erica Alcusa Sáez, bobgeorgethe3rd',
|
code: ['Erica Alcusa Sáez', 'bobgeorgethe3rd'],
|
||||||
department: 'accessories',
|
department: 'accessories',
|
||||||
type: 'pattern',
|
type: 'pattern',
|
||||||
difficulty: 3,
|
difficulty: 3,
|
||||||
optionGroups: {
|
optionGroups: {
|
||||||
fit: ['head_ease'],
|
fit: ['head_ease'],
|
||||||
style: ['lengthRatio', 'goreNumber', 'billAngle', 'billWidth','ear_length','ear_width','buttonhole'],
|
style: ['lengthRatio', 'goreNumber', 'billAngle', 'billWidth','earLength','earWidth','buttonhole'],
|
||||||
advanced:['bill_length'],
|
advanced:['billLength'],
|
||||||
},
|
},
|
||||||
measurements: ['head'],
|
measurements: ['head'],
|
||||||
dependencies: {},
|
dependencies: {},
|
||||||
|
@ -26,9 +26,9 @@ export default {
|
||||||
goreNumber: { count: 6, min: 4, max: 20 },
|
goreNumber: { count: 6, min: 4, max: 20 },
|
||||||
billAngle: { deg: 45, min: 10, max: 90 },
|
billAngle: { deg: 45, min: 10, max: 90 },
|
||||||
billWidth: { mm: 30, min: 5, max: 100 },
|
billWidth: { mm: 30, min: 5, max: 100 },
|
||||||
ear_length: { pct: 100, min: 80, max: 150 },
|
earLength: { pct: 100, min: 80, max: 150 },
|
||||||
ear_width: { pct: 100, min: 80, max: 150 },
|
earWidth: { pct: 100, min: 80, max: 150 },
|
||||||
bill_length: { pct: 100, min: 80, max: 150 },
|
billLength: { pct: 100, min: 80, max: 150 },
|
||||||
buttonhole: {bool: false}
|
buttonhole: {bool: false}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default function (part) {
|
||||||
let headCircumference = measurements.head + options.head_ease
|
let headCircumference = measurements.head + options.head_ease
|
||||||
let headRadius = headCircumference / 2 / Math.PI
|
let headRadius = headCircumference / 2 / Math.PI
|
||||||
let billRadius = (headRadius / Math.sin((options.billAngle * Math.PI) / 180))
|
let billRadius = (headRadius / Math.sin((options.billAngle * Math.PI) / 180))
|
||||||
let sectorAngle = (Math.PI / 3)*options.bill_length
|
let sectorAngle = (Math.PI / 3)*options.billLength
|
||||||
let billSectorAngle = (sectorAngle * headRadius) / billRadius
|
let billSectorAngle = (sectorAngle * headRadius) / billRadius
|
||||||
let cpDistance =
|
let cpDistance =
|
||||||
((4 / 3) * billRadius * (1 - Math.cos(billSectorAngle / 2))) / Math.sin(billSectorAngle / 2)
|
((4 / 3) * billRadius * (1 - Math.cos(billSectorAngle / 2))) / Math.sin(billSectorAngle / 2)
|
||||||
|
|
|
@ -16,8 +16,8 @@ export default function (part) {
|
||||||
|
|
||||||
// Design pattern here
|
// Design pattern here
|
||||||
let headCircumference = measurements.head + options.head_ease
|
let headCircumference = measurements.head + options.head_ease
|
||||||
let earFlapLength = ((options.lengthRatio * headCircumference) / 2)*options.ear_length
|
let earFlapLength = ((options.lengthRatio * headCircumference) / 2)*options.earLength
|
||||||
let earFlapWidth = (headCircumference / 12)*options.ear_width
|
let earFlapWidth = (headCircumference / 12)*options.earWidth
|
||||||
points.top = new Point(0, 0)
|
points.top = new Point(0, 0)
|
||||||
points.bottom = new Point(earFlapWidth, earFlapLength)
|
points.bottom = new Point(earFlapWidth, earFlapLength)
|
||||||
points.topC = points.top.shift(0, points.bottom.x)
|
points.topC = points.top.shift(0, points.bottom.x)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue