aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bluebey-studio/src/faceArt.js
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-05 13:41:29 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-05 13:41:29 +0900
commitcdc88d268019ee9cb335ac14e0dbc8ebabb5b801 (patch)
treea0870a36496523f40284a30b1b4e71980e58ac7b /public/bluebey-studio/src/faceArt.js
parentee7c87a56252ec295119823a2821e5c1f8ec5163 (diff)
bluebey-studio: 口メニューを「ふつうの口/丸く開く(O)」の切替に整理
口の形を切り替えると、その形で使うスライダーだけを表示する。Oの大きさはroundだけで決まり、口の太さがOのサイズを変えないようにした。
Diffstat (limited to 'public/bluebey-studio/src/faceArt.js')
-rw-r--r--public/bluebey-studio/src/faceArt.js13
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);