aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bluebey-studio/src/face.js
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-06 14:08:46 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-06 14:08:46 +0900
commitb02772f108fc9cf5271b9625ec89ec89323fe7b5 (patch)
tree82a0b7ab62484d88bfc0993e0e87c9a99d0eff0d /public/bluebey-studio/src/face.js
parent3b89d6a412cd9a5450271d6a350f96d9d09470d1 (diff)
bluebey-studio: 縦書き句読点の上下を戻し、閉じた口の舌が鼻に隠れないように
縦書きの句読点は右 +0.55em はそのまま、上方向は -0.55em に戻した(-0.8 だと上の文字に重なる)。閉じた口で舌が上を向くときは、口プレートを深度テストなしにして、3Dの鼻に隠れず舌が出るようにした(舌が無いときは従来どおり鼻や腕が隠す)。
Diffstat (limited to 'public/bluebey-studio/src/face.js')
-rw-r--r--public/bluebey-studio/src/face.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/public/bluebey-studio/src/face.js b/public/bluebey-studio/src/face.js
index 7de7c8d..cec7619 100644
--- a/public/bluebey-studio/src/face.js
+++ b/public/bluebey-studio/src/face.js
@@ -214,6 +214,16 @@ export class Face {
// Hiding the mouth has to hide the plane itself, not just stop drawing on
// it - otherwise the last drawing stays on screen.
this.setMouthVisible(p.mouth.visible !== false);
+ // A tongue poking over a *closed* lip can reach up behind the 3D nose, which
+ // would hide it. In that one case let the mouth artwork win the depth test,
+ // so the tongue reads; otherwise the nose (and an arm) still hide the mouth
+ // the way they should. The lip line and the rest of the mouth sit clear of
+ // the nose, so only the tongue can overlap it.
+ const mouth = p.mouth ?? {};
+ const tongueOverLip = (mouth.round ?? 0) <= 0.004
+ && (mouth.open ?? 0) <= 0.004
+ && (mouth.tongue ?? 1) > 0.01;
+ this.mouthMesh.material.depthTest = !tongueOverLip;
const mode = this.styleMode === 'line' ? 'line' : 'paint';
if (this.eyeSource === 'parametric') {