diff options
Diffstat (limited to 'public/bluebey-studio')
| -rw-r--r-- | public/bluebey-studio/src/faceArt.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/public/bluebey-studio/src/faceArt.js b/public/bluebey-studio/src/faceArt.js index 9e07ac6..9ed6c83 100644 --- a/public/bluebey-studio/src/faceArt.js +++ b/public/bluebey-studio/src/faceArt.js @@ -1416,7 +1416,7 @@ export function drawEyes(ctx, p) { // A heart is not an eyeball, so once the eye is fully open it is not clipped // to the eyeball circle - that is what lets a heart be much larger than the // iris. While the lid is partly closed the clip is still needed. - if (!isHeart || open < 0.999) clipEye(ctx, eye, open, lowerLid, lidFlat, lidTilt * eye.towardNose); + if (!isHeart || open < 0.999) clipEye(ctx, eye, open, isHeart ? 0 : lowerLid, lidFlat, lidTilt * eye.towardNose); const eyeTravel = isHeart ? heartTravel * lookMax : travel * lookMax; let dx = clamp(spec.lookX ?? 0, -1, 1) * eyeTravel; @@ -1482,7 +1482,10 @@ export function drawEyes(ctx, p) { // The upper lid line has to sit where the clip put it - and that is set by // `open` alone, so it stays put when the lower lid moves. const upperAmt = clamp(open, 0, 1); - if (lidFade > 0.01 || lowerLid > 0.01) { + // A heart is a replacement for the eyeball, not an eye behind a lid: it keeps + // no lower-lid line, which used to cut across the heart. + const showLowerLid = lowerLid > 0.01 && !isHeart; + if (lidFade > 0.01 || showLowerLid) { ctx.save(); if (eyeTilt) { ctx.translate(eye.cx, eye.cy); @@ -1498,7 +1501,7 @@ export function drawEyes(ctx, p) { lidPath(ctx, eye, upperAmt, false, lidFlat); ctx.stroke(); } - if (lowerLid > 0.01) { + if (showLowerLid) { ctx.globalAlpha = line ? 1 : lowerLid; lidPath(ctx, eye, lowerLid, true, lidFlat); ctx.stroke(); |
