aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bluebey-studio/src/face.js
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-04 01:09:24 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-04 01:09:24 +0900
commitb939182d5a51b8535dd411a754c2088f7f1bafff (patch)
treefd9cf4c50cd9902552632efc9ef6792adf363f45 /public/bluebey-studio/src/face.js
parente9b8f3194c8604f5d0826df1b1e6a17cf27f68f7 (diff)
bluebey-studio: ゴル風の眉画像と口の長さを追加
髭と同じ仕組みで、右側だけの眉画像(assets/brows/gol-right.png)を左右に描けるようにした(「ゴル風」で自動適用、チェックで切替)。口に「口の長さ」スライダーを追加。
Diffstat (limited to 'public/bluebey-studio/src/face.js')
-rw-r--r--public/bluebey-studio/src/face.js12
1 files changed, 12 insertions, 0 deletions
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/<shape>.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/<kind>.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,