aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bluebey-studio/src/faceArt.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/bluebey-studio/src/faceArt.js')
-rw-r--r--public/bluebey-studio/src/faceArt.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/public/bluebey-studio/src/faceArt.js b/public/bluebey-studio/src/faceArt.js
index 829defc..e63f197 100644
--- a/public/bluebey-studio/src/faceArt.js
+++ b/public/bluebey-studio/src/faceArt.js
@@ -131,7 +131,10 @@ export const EYE_LAYOUT = {
},
arch: { edgesUp: 8, apexUp: 44 },
// まつげ: a few strokes flicking out from the upper-outer lid (see drawEyes).
- lash: { length: 30, width: 8, angles: [46, 66, 86] },
+ // `raise` lifts them a touch above the lid edge (2% of the lid slider).
+ lash: { length: 30, width: 8, angles: [46, 66, 86], raise: 0.04 },
+ // "ふつう"の目の瞳を、両目とも少し鼻側に寄せてかわいく見せる(px)。
+ irisInward: 7,
};
/**
@@ -1481,7 +1484,7 @@ export function drawEyes(ctx, p) {
if (isShutShape && !showWhite) {
clipLids(ctx, eye, open, lowerLid, lidFlat, lidTilt * eye.towardNose);
} else if (!isHeart || open < 0.999 || showWhite) {
- clipEye(ctx, eye, open, isHeart ? 0 : lowerLid, lidFlat, lidTilt * eye.towardNose);
+ clipEye(ctx, eye, open, lowerLid, lidFlat, lidTilt * eye.towardNose);
}
if (!line && showWhite) fillCircle(ctx, eye.cx, eye.cy, eye.r, white);
if (isShutShape) {
@@ -1490,7 +1493,7 @@ export function drawEyes(ctx, p) {
} else if (isHeart) {
fillHeart(ctx, eye.cx + dx, eye.cy + dy, heartRadius, line ? lineColor : heartColor);
} else {
- const irisX = eye.cx + dx;
+ const irisX = eye.cx + dx + eye.towardNose * EYE_LAYOUT.irisInward;
const irisY = eye.cy + dy;
fillCircle(ctx, irisX, irisY, irisRadius, line ? lineColor : irisColor);
// 光彩 (the white glint) is per eye, falling back to the shared switch.
@@ -1532,7 +1535,7 @@ export function drawEyes(ctx, p) {
const upperAmt = clamp(open, 0, 1);
// 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;
+ const showLowerLid = lowerLid > 0.01;
if (lidFade > 0.01 || showLowerLid) {
ctx.save();
if (eyeTilt) {
@@ -1586,7 +1589,7 @@ export function drawEyes(ctx, p) {
const dy = ux * sa + uy * ca;
const r0 = eye.r * 0.96;
const bx = eye.cx + ux * r0;
- const by = eye.cy + uy * r0 + lidDrop;
+ const by = eye.cy + uy * r0 + lidDrop - eye.r * EYE_LAYOUT.lash.raise;
strokePolyline(ctx, [
{ x: bx, y: by },
{ x: bx + dx * EYE_LAYOUT.lash.length, y: by + dy * EYE_LAYOUT.lash.length },