diff options
| author | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-05 14:13:21 +0900 |
|---|---|---|
| committer | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-05 14:13:21 +0900 |
| commit | 174886a483d90756b1320c12aef0e6f296c6d425 (patch) | |
| tree | 9683ef2b818cbb13293f0fab6d3096c76e541d49 /public/bluebey-studio/src/gacha.js | |
| parent | 4808fc1cd44737200cfd51747a628585185f1f9f (diff) | |
bluebey-studio: 目メニューを再編し、閉じ目にもまぶたを効かせる
閉じ目を眼球の中身として上まぶた・下まぶたで隠せるようにした。まぶた設定を「まぶた」グループに、ハートの色を目の形の直下に、瞳と形の大きさを「大きさ」に統合。こまかい設定は解体し、横位置・手描きは個別の箱に分けた。
Diffstat (limited to 'public/bluebey-studio/src/gacha.js')
| -rw-r--r-- | public/bluebey-studio/src/gacha.js | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/public/bluebey-studio/src/gacha.js b/public/bluebey-studio/src/gacha.js index d689fa5..c44f80f 100644 --- a/public/bluebey-studio/src/gacha.js +++ b/public/bluebey-studio/src/gacha.js @@ -237,6 +237,8 @@ function rollEyes(random, spec) { const [openMin, openMax] = spec.open; let leftOpen = round2(rand(random, openMin, openMax)); let rightOpen = round2(clamp(leftOpen + rand(random, -0.06, 0.06), 0, 1)); + let leftShape = 'open'; + let rightShape = 'open'; let leftClosed = 'line'; let rightClosed = 'line'; let leftLines = 1; @@ -245,28 +247,37 @@ function rollEyes(random, spec) { if (spec.wink) { const side = chance(random, 0.5) ? 'left' : 'right'; const lines = pick(random, [2, 3]); + // A shut eye is the artwork with the lids open now; the lid height is its own + // slider, so `open` is 1 and the shape says which line it is. if (side === 'left') { - leftOpen = 0; + leftOpen = 1; leftLines = lines; + leftShape = `line${lines}`; } else { - rightOpen = 0; + rightOpen = 1; rightLines = lines; + rightShape = `line${lines}`; } } else if (spec.shutBoth && chance(random, spec.shutBoth.chance)) { - leftOpen = 0; - rightOpen = 0; + leftOpen = 1; + rightOpen = 1; leftClosed = spec.shutBoth.closed; rightClosed = spec.shutBoth.closed; leftLines = spec.shutBoth.closedLines; rightLines = spec.shutBoth.closedLines; + const shape = spec.shutBoth.closed === 'line' + ? `line${spec.shutBoth.closedLines}` + : spec.shutBoth.closed; + leftShape = shape; + rightShape = shape; } const lookX = round2(rand(random, spec.lookX[0], spec.lookX[1])); const lookY = round2(rand(random, spec.lookY[0], spec.lookY[1])); return { - left: { open: leftOpen, lookX, lookY, closed: leftClosed, closedLines: leftLines, irisShape: 'circle' }, - right: { open: rightOpen, lookX, lookY, closed: rightClosed, closedLines: rightLines, irisShape: 'circle' }, + left: { shape: leftShape, open: leftOpen, lookX, lookY, closed: leftClosed, closedLines: leftLines, irisShape: 'circle' }, + right: { shape: rightShape, open: rightOpen, lookX, lookY, closed: rightClosed, closedLines: rightLines, irisShape: 'circle' }, irisScale: round2(rand(random, spec.irisScale[0], spec.irisScale[1])), lookMax: round2(rand(random, spec.lookMax[0], spec.lookMax[1])), highlight: true, @@ -330,6 +341,8 @@ export function randomFace(random) { if (mood.heart && eyes.left.open >= 0.9 && eyes.right.open >= 0.9) { eyes.left.irisShape = 'heart'; eyes.right.irisShape = 'heart'; + eyes.left.shape = 'heart'; + eyes.right.shape = 'heart'; eyes.heartScale = round2(rand(random, 0.9, 1.15)); eyes.heartColor = '#e0344f'; eyes.highlight = false; |
