From cdc88d268019ee9cb335ac14e0dbc8ebabb5b801 Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Mon, 5 Oct 2026 13:41:29 +0900 Subject: bluebey-studio: 口メニューを「ふつうの口/丸く開く(O)」の切替に整理 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 口の形を切り替えると、その形で使うスライダーだけを表示する。Oの大きさはroundだけで決まり、口の太さがOのサイズを変えないようにした。 --- public/bluebey-studio/src/faceArt.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 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 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); -- cgit v1.3.1