From b939182d5a51b8535dd411a754c2088f7f1bafff Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Sun, 4 Oct 2026 01:09:24 +0900 Subject: bluebey-studio: ゴル風の眉画像と口の長さを追加 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 髭と同じ仕組みで、右側だけの眉画像(assets/brows/gol-right.png)を左右に描けるようにした(「ゴル風」で自動適用、チェックで切替)。口に「口の長さ」スライダーを追加。 --- public/bluebey-studio/src/face.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'public/bluebey-studio/src/face.js') diff --git a/public/bluebey-studio/src/face.js b/public/bluebey-studio/src/face.js index f2440d3..0a00399 100644 --- a/public/bluebey-studio/src/face.js +++ b/public/bluebey-studio/src/face.js @@ -52,6 +52,8 @@ export class Face { // Drawings supplied for a beard kind (assets/beards/.png). Loaded by the // app; a kind without one falls back to the built-in drawing (see drawBeard). this.beardImages = {}; + // Drawings for the brows (assets/brows/.png), loaded the same way. + this.browImages = {}; this.eyeCanvas = makeCanvas(this.eyeLayout); this.mouthCanvas = makeCanvas(this.mouthLayout); this.hairCanvas = this.hairLayout ? makeCanvas(this.hairLayout, HAIR_SCALE) : null; @@ -163,6 +165,15 @@ export class Face { this.dirty = true; } + /** + * Set the drawings used for the brows, keyed by brow kind (`gol`). Called by the + * app once the files are loaded; the next redraw picks them up. + */ + setBrowImages(map) { + this.browImages = map ?? {}; + this.dirty = true; + } + /** `kind` is `'eyes'` or `'mouth'`; `source` is `'parametric'` or a variant key. */ setSource(kind, source) { if (kind === 'eyes') { @@ -237,6 +248,7 @@ export class Face { // object hung off the nose - see src/main.js - so it is not drawn here.) beard: p.eyes.beard, beards: this.beardImages, + brows: this.browImages, // 眼鏡 / サングラス are shared by both eyes and drawn into this same // texture, so they travel with the other shared eye fields. glasses: p.eyes.glasses, -- cgit v1.3.1