From 629dfd09777d1abb3cdecd8fc58d18234d1063cf Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Mon, 5 Oct 2026 00:08:30 +0900 Subject: bluebey-studio: 帽子の高さ・傾き、髪の下地書き出し、目の形メニューの再構成 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/bluebey-studio/src/faceArt.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'public/bluebey-studio/src/faceArt.js') 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) { -- cgit v1.3.1