aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-04 18:53:03 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-04 18:53:03 +0900
commit291408cc4939e68aac60fb7a4cd37d0fea85c57a (patch)
treefac952c1e5dc1815bf8d5a1a003cd4094312b3a5
parent793d0b6f8007f5e6d35044b2ffd709b25c1106f3 (diff)
bluebey-studio: 下まぶたの線が浮いて二重瞼に見えるのを修正
下まぶたの線だけクリップと量が違っていたため、眼球の底より上に浮いて別の線に見えていた。クリップと同じ lowerLid×(1-open) で描くようにした。
-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();