diff options
| author | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-05 00:08:30 +0900 |
|---|---|---|
| committer | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-05 00:08:30 +0900 |
| commit | 629dfd09777d1abb3cdecd8fc58d18234d1063cf (patch) | |
| tree | 6f0f01befc1a4283d716a24187e0fc570a7a905e /public/bluebey-studio/src/faceArt.js | |
| parent | 793bfd720525f7f1f14a507e1c962101db5ef283 (diff) | |
bluebey-studio: 帽子の高さ・傾き、髪の下地書き出し、目の形メニューの再構成
Diffstat (limited to 'public/bluebey-studio/src/faceArt.js')
| -rw-r--r-- | public/bluebey-studio/src/faceArt.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/public/bluebey-studio/src/faceArt.js b/public/bluebey-studio/src/faceArt.js index 1f7c4ee..01e5c31 100644 --- a/public/bluebey-studio/src/faceArt.js +++ b/public/bluebey-studio/src/faceArt.js @@ -1379,6 +1379,9 @@ export function drawEyes(ctx, p) { }; if (open <= 0.02) { + // A shut eye can still be given a white backing (the "白目" switch), which + // reads as a line drawn across an eyeball rather than a bare line. + if (!line && spec.white === true) fillCircle(ctx, eye.cx, eye.cy, eye.r, white); drawShutEye(ctx, eye, spec, lineStyle); // The glasses sit over the shut-eye artwork too, but under the tear below. drawGlasses(ctx, eye, line, style, limits); @@ -1402,11 +1405,12 @@ export function drawEyes(ctx, p) { dy = (dy / dist) * eyeTravel; } - // The eyeball's white can be hidden: for a heart it stops the white showing - // round the lobes, and `hideWhite` does the same for any style (e.g. a line - // squint) when the user asks for it. - const hideWhite = style.hideWhite === true || (isHeart && style.heartHideWhite); - if (!line && !hideWhite) fillCircle(ctx, eye.cx, eye.cy, eye.r, white); + // The white of the eye. `spec.white` is per eye and tri-state: `null` keeps + // the usual behaviour (an open eye shows its white, a heart does not), while + // true/false force it on or off - so an open eye can lose its white, and a + // shut eye or a heart can gain it. + const showWhite = spec.white == null ? !isHeart : spec.white === true; + if (!line && showWhite) fillCircle(ctx, eye.cx, eye.cy, eye.r, white); const irisX = eye.cx + dx; const irisY = eye.cy + dy; if (isHeart) { |
