From 7329ba8c8901ee095ad7316b8554c5e44431eebc Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Mon, 5 Oct 2026 21:46:21 +0900 Subject: bluebey-studio: 縦書きのセリフとナレーション枠、コック帽改善、小物に鉛筆とコップなど MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit セリフを縦書き可能にし、縦書きのナレーションボックスを追加。ハートでも下まぶたを閉じられるようにし、ふつうの目の瞳を少し鼻側へ。HairPlateは髪が無いとき非表示(iPhoneの色ずれ対策)。コック帽をトック帽に、鉛筆とコップを小物に追加。 --- public/bluebey-studio/src/face.js | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (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 ac48527..3d21022 100644 --- a/public/bluebey-studio/src/face.js +++ b/public/bluebey-studio/src/face.js @@ -278,19 +278,28 @@ export class Face { } if (this.hairMesh) { - // `overEyes` decides the draw order: the hair plate sits in front of the - // eyes (bangs over the face) or behind them. - this.hairMesh.renderOrder = p.eyes.headMark?.overEyes === false ? 0 : 3; - const layout = this.hairLayout; - const ctx = this.hairCtx; - ctx.setTransform(1, 0, 0, 1, 0, 0); - ctx.clearRect(0, 0, layout.width * HAIR_SCALE, layout.height * HAIR_SCALE); - ctx.scale(HAIR_SCALE, HAIR_SCALE); - // `drawHeadCoverWrap` works in canvas coordinates (its x axis is the UV - // angle already normalised), so it is not shifted by the window offset. - drawHeadCoverWrap(ctx, p.eyes.headMark ?? {}, layout); - ctx.setTransform(1, 0, 0, 1, 0, 0); - this.hairTexture.needsUpdate = true; + const hairShape = p.eyes.headMark?.shape ?? 'off'; + // Shapes that draw nothing (the retired front-plate ones, or なし). A fully + // transparent texture still tinted the head on iOS, so the plate is hidden + // outright when there is no hair rather than left showing an empty texture. + const hairShown = !(hairShape === 'off' || hairShape === 'none' + || hairShape === 'split' || hairShape === 'wave' || hairShape === 'side'); + this.hairMesh.visible = hairShown; + if (hairShown) { + // `overEyes` decides the draw order: the hair plate sits in front of the + // eyes (bangs over the face) or behind them. + this.hairMesh.renderOrder = p.eyes.headMark?.overEyes === false ? 0 : 3; + const layout = this.hairLayout; + const ctx = this.hairCtx; + ctx.setTransform(1, 0, 0, 1, 0, 0); + ctx.clearRect(0, 0, layout.width * HAIR_SCALE, layout.height * HAIR_SCALE); + ctx.scale(HAIR_SCALE, HAIR_SCALE); + // `drawHeadCoverWrap` works in canvas coordinates (its x axis is the UV + // angle already normalised), so it is not shifted by the window offset. + drawHeadCoverWrap(ctx, p.eyes.headMark ?? {}, layout); + ctx.setTransform(1, 0, 0, 1, 0, 0); + this.hairTexture.needsUpdate = true; + } } this.dirty = false; -- cgit v1.3.1