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 14:29:18 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-05 14:29:18 +0900
commit88010ce24f3a863518071c4bd5dd5d351d1bad26 (patch)
treec8a584defd55cdd3cb6763716c8899c7a1d695db /public/bluebey-studio/src/faceArt.js
parent8598b20ff6ebd68bf139fc361d5b311f7a553882 (diff)
bluebey-studio: まぶたを左右の目で個別設定に、目グループにアイコン追加
まぶた(形・太さ・傾き・まつげ・上下の高さ)を目のグループ内に移し、左右別々に設定できるようにした。上まぶたと下まぶたが交差しないようスライダー範囲を相互に制限。両目・左の目・右の目に見分け用アイコンを付けた。
Diffstat (limited to 'public/bluebey-studio/src/faceArt.js')
-rw-r--r--public/bluebey-studio/src/faceArt.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/public/bluebey-studio/src/faceArt.js b/public/bluebey-studio/src/faceArt.js
index 765c0db..aa1204b 100644
--- a/public/bluebey-studio/src/faceArt.js
+++ b/public/bluebey-studio/src/faceArt.js
@@ -1348,14 +1348,10 @@ export function drawEyes(ctx, p) {
const white = style.white ?? '#ffffff';
const irisColor = style.iris ?? '#150e1b';
const lineColor = style.line ?? '#55386e';
- const lidWidth = style.lidWidth ?? EYE_LAYOUT.lidStroke;
const lookMax = style.lookMax ?? 1;
const heartScale = 2;
const heartColor = style.heartColor ?? '#e0344f';
const heartTravel = EYE_LAYOUT.radius * 0.9;
- const lidFlat = (style.lidShape ?? 'curve') === 'flat';
- // How much the whole narrowed eye is tilted (e.g. an angry or gentle squint).
- const lidTilt = clamp(style.lidTilt ?? 0, -45, 45);
// ほっぺ and 頭の模様 belong to the whole face, so they are drawn once here
// rather than inside the per-eye loop below. 鼻ちょうちん comes along too.
@@ -1370,6 +1366,11 @@ export function drawEyes(ctx, p) {
r: EYE_LAYOUT.radius,
towardNose: layout.towardNose,
};
+ // Each lid can be set per eye, falling back to the shared value.
+ const lidWidth = spec.lidWidth ?? style.lidWidth ?? EYE_LAYOUT.lidStroke;
+ const lidFlat = (spec.lidShape ?? style.lidShape ?? 'curve') === 'flat';
+ // How much the whole narrowed eye is tilted (e.g. an angry or gentle squint).
+ const lidTilt = clamp(spec.lidTilt ?? style.lidTilt ?? 0, -45, 45);
const lineStyle = { line: lineColor, width: lidWidth };
// Which artwork this eye shows. `shape` is the explicit choice; older saved
// states and the おまかせ rolls only set `open`/`closed`, so fall back.
@@ -1545,7 +1546,7 @@ export function drawEyes(ctx, p) {
// --- まつげ --------------------------------------------------------
// Short strokes flicking outwards from the upper-outer lid. They sit outside
// the eyeball, so they are drawn after the lid block and are not clipped.
- if (style.lashes) {
+ if (spec.lashes ?? style.lashes) {
const outDir = -eye.towardNose;
for (const deg of EYE_LAYOUT.lash.angles) {
const t = (deg * Math.PI) / 180;