aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bluebey-studio/src
diff options
context:
space:
mode:
Diffstat (limited to 'public/bluebey-studio/src')
-rw-r--r--public/bluebey-studio/src/faceArt.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/public/bluebey-studio/src/faceArt.js b/public/bluebey-studio/src/faceArt.js
index 5ed821d..c5eca6e 100644
--- a/public/bluebey-studio/src/faceArt.js
+++ b/public/bluebey-studio/src/faceArt.js
@@ -1472,9 +1472,14 @@ export function drawEyes(ctx, p) {
lidPath(ctx, eye, open, false, lidFlat);
ctx.stroke();
}
- if (lowerLid > 0.01) {
- ctx.globalAlpha = line ? 1 : lowerLid;
- lidPath(ctx, eye, lowerLid, true, lidFlat);
+ // The lower lid fades out as the eye closes (the upper lid does the work),
+ // and the *line* has to use the same amount as the clip above - using the
+ // raw `lowerLid` left the line floating inside the eyeball, which read as a
+ // second (doubled) lid.
+ const lower = lowerLid * (1 - open);
+ if (lower > 0.01) {
+ ctx.globalAlpha = line ? 1 : lower;
+ lidPath(ctx, eye, lower, true, lidFlat);
ctx.stroke();
}
ctx.restore();