aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bluebey-studio
diff options
context:
space:
mode:
Diffstat (limited to 'public/bluebey-studio')
-rw-r--r--public/bluebey-studio/src/caption.js2
-rw-r--r--public/bluebey-studio/src/face.js10
2 files changed, 11 insertions, 1 deletions
diff --git a/public/bluebey-studio/src/caption.js b/public/bluebey-studio/src/caption.js
index 7865295..08b962f 100644
--- a/public/bluebey-studio/src/caption.js
+++ b/public/bluebey-studio/src/caption.js
@@ -100,7 +100,7 @@ const COLUMN_END_FORBIDDEN = new Set(['「', '『', '(', '〔', '【', '〈',
const VERTICAL_OFFSETS = new Map();
for (const ch of SMALL_KANA) VERTICAL_OFFSETS.set(ch, { dx: 0.12, dy: -0.12 });
// 縦書きの句読点は、横書きの左下ではなく、字枠の右上に置く。
-for (const ch of HANGING_PUNCTUATION) VERTICAL_OFFSETS.set(ch, { dx: 0.55, dy: -0.8 });
+for (const ch of HANGING_PUNCTUATION) VERTICAL_OFFSETS.set(ch, { dx: 0.55, dy: -0.55 });
for (const ch of '「『(〔') VERTICAL_OFFSETS.set(ch, { dx: 0.14, dy: -0.12 });
for (const ch of '」』)〕') VERTICAL_OFFSETS.set(ch, { dx: -0.14, dy: 0.12 });
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') {