aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bluebey-studio/src
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-05 13:23:28 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-05 13:23:28 +0900
commit645b204e26962c9adfc11047052020a777b1ca1d (patch)
treed59cfef382262853e0f0773816e13248fc8d936b /public/bluebey-studio/src
parenteecb25b1ac52ec87e382ff8249fa3dfb9e295c13 (diff)
bluebey-studio: 髪型の「まえがみ」を「ぎざぎざ」にしてギザギザの生え際に
Diffstat (limited to 'public/bluebey-studio/src')
-rw-r--r--public/bluebey-studio/src/faceArt.js24
-rw-r--r--public/bluebey-studio/src/panel.js4
2 files changed, 12 insertions, 16 deletions
diff --git a/public/bluebey-studio/src/faceArt.js b/public/bluebey-studio/src/faceArt.js
index 71e7487..5e99be5 100644
--- a/public/bluebey-studio/src/faceArt.js
+++ b/public/bluebey-studio/src/faceArt.js
@@ -867,14 +867,12 @@ function drawHeadCover(ctx, spec, limits) {
const halfSpan = width / 2;
const boundary = (x) => {
const t = clamp((x - cx) / halfSpan, -1, 1);
- // まえがみ: 富士額 / M字 (a widow's peak). The covering dips to a point at
- // the centre and at the two temples, receding in between - the two valleys
- // and three points of an "M". The points scale with `size`, so a smaller
- // まえがみ is a smaller M rather than a thin band with a tall spike.
+ // ぎざぎざ: a jagged, saw-toothed hairline. A triangle wave across the front
+ // gives the teeth, and `size` scales how far they reach down.
if (shape === 'fringe') {
- const dip = (x, centre, reach) => Math.max(0, 1 - Math.abs(x - centre) / reach);
- const shape01 = Math.max(dip(t, 0, 0.36), 0.6 * Math.max(dip(t, -0.82, 0.26), dip(t, 0.82, 0.26)));
- return base + 190 * size * shape01;
+ const teeth = 8;
+ const saw = Math.abs((((t * teeth) % 2) + 2) % 2 - 1); // 0..1 triangle
+ return base + 200 * size * saw;
}
// はちわれ: 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);
@@ -947,13 +945,11 @@ export function drawHeadCoverWrap(ctx, spec, layout) {
// centre (the peak) and at the temples, with the corners between receded -
// the three peaks and two valleys of an "M". `t` is -1..1 across the front.
if (shape === 'fringe') {
- const dip = (x, centre, reach) => Math.max(0, 1 - Math.abs(x - centre) / reach);
- // The centre dips the lowest, the two temples dip less, and the hairline
- // recedes between them - the two valleys and three points of an "M".
- const shape01 = Math.max(dip(t, 0, 0.36), 0.6 * Math.max(dip(t, -0.82, 0.26), dip(t, 0.82, 0.26)));
- // The points grow with `size`, so a small まえがみ is a small M rather than
- // a thin band with a tall spike (a spindle).
- return base + 0.16 * size * shape01;
+ // ぎざぎざ: a jagged, saw-toothed hairline. A triangle wave across the front
+ // gives the teeth, and `size` scales how far they reach down.
+ const teeth = 8;
+ const saw = Math.abs((((t * teeth) % 2) + 2) % 2 - 1); // 0..1 triangle
+ return base + 0.20 * size * saw;
}
// はちわれ: 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);
diff --git a/public/bluebey-studio/src/panel.js b/public/bluebey-studio/src/panel.js
index e6f6446..d95826f 100644
--- a/public/bluebey-studio/src/panel.js
+++ b/public/bluebey-studio/src/panel.js
@@ -1117,7 +1117,7 @@ export function buildPanel(app, root) {
options: [
{ value: 'off', label: 'なし' },
{ value: 'cap', label: 'かぶせ' },
- { value: 'fringe', label: 'まえがみ' },
+ { value: 'fringe', label: 'ぎざぎざ' },
{ value: 'fringe-up', label: 'はちわれ' },
{ value: 'curve', label: 'カーブ' },
],
@@ -1163,7 +1163,7 @@ export function buildPanel(app, root) {
});
headMarkBox.add(headMarkColor.el);
headMarkBox.add(headMarkColor2.el);
- headMarkBox.add(hint('「かぶせ」は頭にかぶせる丸い髪、「まえがみ」は中央とこめかみが下がるM字(富士額)の前髪、'
+ headMarkBox.add(hint('「かぶせ」は頭にかぶせる丸い髪、「ぎざぎざ」は生え際がギザギザにとがった髪、'
+ '「はちわれ」は中央が鋭く持ち上がった生え際、「カーブ」はドラえもんのように単純にカーブした髪です。'
+ '「たかさ」で生え際を目の中心あたりまで下げられます。'
+ '「髪を目の前に出す」を切ると、髪が目の後ろに回ります。'));