diff options
Diffstat (limited to 'public/bluebey-studio/src/faceArt.js')
| -rw-r--r-- | public/bluebey-studio/src/faceArt.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/public/bluebey-studio/src/faceArt.js b/public/bluebey-studio/src/faceArt.js index 01890b5..f61a865 100644 --- a/public/bluebey-studio/src/faceArt.js +++ b/public/bluebey-studio/src/faceArt.js @@ -281,6 +281,10 @@ export const MOUTH_LAYOUT = { // the corners, which is what reads as a *gentler* curve at the same depth. sagBend: 0.2, thickness: 21, + // How big the round "O" oval gets at `round: 1`, as a multiple of the smile's + // own sag. The oval's size comes from this and `round` alone: `thickness` is + // only the stroke weight, so 口の太さ and 丸く開く no longer move together. + roundScale: 1.3, // Kept for reference: the 2022 plane only showed these rows. bandTop: 46, bandBottom: 332, @@ -1571,12 +1575,13 @@ export function drawMouth(ctx, p) { // --- a round "O" mouth (surprised, singing) --------------------------- const roundAmount = clamp(p.round ?? 0, 0, 1); if (roundAmount > 0.004) { - let ry = L.sag * 1.05 * roundAmount * clamp(p.thickness ?? 1, 0.5, 2); + let ry = L.sag * 1.05 * L.roundScale * roundAmount; // Keep the oval below the nose and inside the plate, but allow it to grow to - // roughly half the head. - ry = Math.min(ry, (edgeBottom - thickness / 2 - L.noseClear) / 2.1); + // roughly half the head. The stroke's share is a fixed margin, not the live + // `thickness`: otherwise 口の太さ would quietly resize the oval too. + ry = Math.min(ry, (edgeBottom - L.thickness / 2 - L.noseClear) / 2.1); const rx = Math.min(ry * 1.15 * clamp(p.width ?? 1, 0.2, 1.6), L.halfChord * 1.4); - const centreY = clamp(y0 + sag * 0.5, L.noseClear + ry * 1.02, edgeBottom - thickness / 2 - ry * 1.02); + const centreY = clamp(y0 + sag * 0.5, L.noseClear + ry * 1.02, edgeBottom - L.thickness / 2 - ry * 1.02); if (ry > 5) { ctx.save(); ctx.translate(pivot.x, pivot.y); |
