1
0
Fork 0

format and camelCase changes

This commit is contained in:
unknown 2021-08-24 15:37:35 +01:00
parent f34208aaae
commit a45e1a1db8
3 changed files with 10 additions and 10 deletions

View file

@ -4,16 +4,16 @@ import { version } from '../package.json'
export default {
name: 'holmes',
version: "2.17.5",
version,
design: 'Erica Alcusa Sáez',
code: 'Erica Alcusa Sáez, bobgeorgethe3rd',
code: ['Erica Alcusa Sáez', 'bobgeorgethe3rd'],
department: 'accessories',
type: 'pattern',
difficulty: 3,
optionGroups: {
fit: ['head_ease'],
style: ['lengthRatio', 'goreNumber', 'billAngle', 'billWidth','ear_length','ear_width','buttonhole'],
advanced:['bill_length'],
style: ['lengthRatio', 'goreNumber', 'billAngle', 'billWidth','earLength','earWidth','buttonhole'],
advanced:['billLength'],
},
measurements: ['head'],
dependencies: {},
@ -26,9 +26,9 @@ export default {
goreNumber: { count: 6, min: 4, max: 20 },
billAngle: { deg: 45, min: 10, max: 90 },
billWidth: { mm: 30, min: 5, max: 100 },
ear_length: { pct: 100, min: 80, max: 150 },
ear_width: { pct: 100, min: 80, max: 150 },
bill_length: { pct: 100, min: 80, max: 150 },
earLength: { pct: 100, min: 80, max: 150 },
earWidth: { pct: 100, min: 80, max: 150 },
billLength: { pct: 100, min: 80, max: 150 },
buttonhole: {bool: false}
},
}

View file

@ -15,7 +15,7 @@ export default function (part) {
let headCircumference = measurements.head + options.head_ease
let headRadius = headCircumference / 2 / Math.PI
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 cpDistance =
((4 / 3) * billRadius * (1 - Math.cos(billSectorAngle / 2))) / Math.sin(billSectorAngle / 2)

View file

@ -16,8 +16,8 @@ export default function (part) {
// Design pattern here
let headCircumference = measurements.head + options.head_ease
let earFlapLength = ((options.lengthRatio * headCircumference) / 2)*options.ear_length
let earFlapWidth = (headCircumference / 12)*options.ear_width
let earFlapLength = ((options.lengthRatio * headCircumference) / 2)*options.earLength
let earFlapWidth = (headCircumference / 12)*options.earWidth
points.top = new Point(0, 0)
points.bottom = new Point(earFlapWidth, earFlapLength)
points.topC = points.top.shift(0, points.bottom.x)