diff options
Diffstat (limited to 'public/bluebey-studio/src')
| -rw-r--r-- | public/bluebey-studio/src/faceArt.js | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/public/bluebey-studio/src/faceArt.js b/public/bluebey-studio/src/faceArt.js index ca23b74..5ed821d 100644 --- a/public/bluebey-studio/src/faceArt.js +++ b/public/bluebey-studio/src/faceArt.js @@ -847,8 +847,12 @@ function drawHeadCover(ctx, spec, limits) { const halfSpan = width / 2; const boundary = (x) => { const t = clamp((x - cx) / halfSpan, -1, 1); - // まえがみ: swept down towards the cheeks, raised in the middle. - if (shape === 'fringe') return base - 175 * (1 - t * t); + // まえがみ: falls towards the cheeks with a needle pulled down at the centre. + if (shape === 'fringe') { + const sweep = 420 * t * t; + const needle = 500 * Math.max(0, 1 - Math.abs(t) * 6); + return base - 100 + sweep + needle; + } // はちわれ: the same V upside down - a widow's peak. if (shape === 'fringe-up') return base - 320 * Math.max(0, 1 - Math.abs(t) * 1.5); // カーブ: a plain shallow curve, higher (more hair) round the sides. @@ -934,9 +938,13 @@ export function drawHeadCoverWrap(ctx, spec, layout) { const cx = layout.offsetX + span * 0.5 + clamp(spec.offsetX ?? 0, -600, 600); const vBound = (x) => { const t = clamp((x - cx) / half, -1, 1); - // まえがみ: swept down towards the cheeks, raised in the middle - the - // opposite curvature to a central point (concave towards the cheeks). - if (shape === 'fringe') return base + 0.22 * t * t; + // まえがみ: the hair falls towards the cheeks on both sides (a strong + // concave sweep) with a narrow needle pulled down at the centre of the head. + if (shape === 'fringe') { + const sweep = 0.30 * t * t; + const needle = 0.42 * Math.max(0, 1 - Math.abs(t) * 6); + return base + sweep + needle; + } // はちわれ: the same V upside down - a widow's peak. if (shape === 'fringe-up') return base - 0.18 * Math.max(0, 1 - Math.abs(t) * 1.5); // カーブ: a deep round cover - low at the sides, high in the middle, like the |
