diff options
| author | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-05 14:21:12 +0900 |
|---|---|---|
| committer | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-05 14:21:12 +0900 |
| commit | 8598b20ff6ebd68bf139fc361d5b311f7a553882 (patch) | |
| tree | a7c6a7a8a9758fdbf6f3255e39de18b6a45f6912 /public/bluebey-studio/src/faceArt.js | |
| parent | 174886a483d90756b1320c12aef0e6f296c6d425 (diff) | |
bluebey-studio: 目の形の反映を修正、まぶたに高さ追加・まつげ実装、キャッシュ対策
レンダラーへ shape を渡しておらず目の形ボタンが効かなかったのを修正。上まぶた・下まぶたの高さを「まぶた」グループへ。まつげを追加。bluebey-studio配下のHTML/JS/CSSをno-cacheにし、更新時に古い版が残らないようにした。
Diffstat (limited to 'public/bluebey-studio/src/faceArt.js')
| -rw-r--r-- | public/bluebey-studio/src/faceArt.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/public/bluebey-studio/src/faceArt.js b/public/bluebey-studio/src/faceArt.js index 04dd6e3..765c0db 100644 --- a/public/bluebey-studio/src/faceArt.js +++ b/public/bluebey-studio/src/faceArt.js @@ -130,6 +130,8 @@ export const EYE_LAYOUT = { armX: 104, }, arch: { edgesUp: 8, apexUp: 44 }, + // まつげ: a few strokes flicking out from the upper-outer lid (see drawEyes). + lash: { length: 34, width: 9, angles: [26, 52, 78] }, }; /** @@ -1540,6 +1542,24 @@ export function drawEyes(ctx, p) { ctx.restore(); } + // --- まつげ -------------------------------------------------------- + // 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) { + const outDir = -eye.towardNose; + for (const deg of EYE_LAYOUT.lash.angles) { + const t = (deg * Math.PI) / 180; + const ux = outDir * Math.cos(t); + const uy = -Math.sin(t); + const r0 = eye.r * 0.96; + const r1 = r0 + EYE_LAYOUT.lash.length; + strokePolyline(ctx, [ + { x: eye.cx + ux * r0, y: eye.cy + uy * r0 }, + { x: eye.cx + ux * r1, y: eye.cy + uy * r1 }, + ], { color: lineColor, width: EYE_LAYOUT.lash.width }); + } + } + // --- outline (line-art mode only) --------------------------------- if (line) strokeCircle(ctx, eye.cx, eye.cy, eye.r, lineColor, lidWidth * 0.75); } |
