🎨 Updated prettier config
This commit is contained in:
parent
b8e632998b
commit
6710d76b08
401 changed files with 13193 additions and 15620 deletions
|
@ -1,30 +1,24 @@
|
|||
export default function(part) {
|
||||
let { Point, points, Path, paths, measurements, options } = part.shorthand();
|
||||
let { Point, points, Path, paths, measurements, options } = part.shorthand()
|
||||
|
||||
let tweak = 1;
|
||||
let target = (measurements.headCircumference * options.neckRatio) / 4;
|
||||
let delta;
|
||||
let tweak = 1
|
||||
let target = (measurements.headCircumference * options.neckRatio) / 4
|
||||
let delta
|
||||
do {
|
||||
points.right = new Point((tweak * measurements.headCircumference) / 10, 0);
|
||||
points.bottom = new Point(0, (tweak * measurements.headCircumference) / 12);
|
||||
points.right = new Point((tweak * measurements.headCircumference) / 10, 0)
|
||||
points.bottom = new Point(0, (tweak * measurements.headCircumference) / 12)
|
||||
|
||||
points.rightCp1 = points.right.shift(
|
||||
90,
|
||||
points.bottom.dy(points.right) / 2
|
||||
);
|
||||
points.bottomCp2 = points.bottom.shift(
|
||||
0,
|
||||
points.bottom.dx(points.right) / 2
|
||||
);
|
||||
points.rightCp1 = points.right.shift(90, points.bottom.dy(points.right) / 2)
|
||||
points.bottomCp2 = points.bottom.shift(0, points.bottom.dx(points.right) / 2)
|
||||
|
||||
paths.neck = new Path()
|
||||
.move(points.right)
|
||||
.curve(points.rightCp1, points.bottomCp2, points.bottom);
|
||||
.curve(points.rightCp1, points.bottomCp2, points.bottom)
|
||||
|
||||
delta = paths.neck.length() - target;
|
||||
if (delta > 0) tweak = tweak * 0.99;
|
||||
else tweak = tweak * 1.02;
|
||||
} while (Math.abs(delta) > 1);
|
||||
delta = paths.neck.length() - target
|
||||
if (delta > 0) tweak = tweak * 0.99
|
||||
else tweak = tweak * 1.02
|
||||
} while (Math.abs(delta) > 1)
|
||||
|
||||
return part;
|
||||
return part
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue