diff options
| author | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-06 14:03:58 +0900 |
|---|---|---|
| committer | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-06 14:03:58 +0900 |
| commit | 3b89d6a412cd9a5450271d6a350f96d9d09470d1 (patch) | |
| tree | 4a63639dd39422847a886d9642ad8c6b61027720 /public | |
| parent | 3c63cfc2d4e8277ba9490141cc17b4570ba4d23a (diff) | |
bluebey-studio: 思考の雲のふくらみを垂直に、〇を80%に、縦書き句読点を右上へ
思考の雲は、ふくらみの向きを「枠から中心へ」ではなく「辺に垂直」に変更し、上下の枠の傾きをなくした。しっぽの〇は80%に。縦書きの句読点は字枠の右上(右上寄り)へ移動。
Diffstat (limited to 'public')
| -rw-r--r-- | public/bluebey-studio/src/caption.js | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/public/bluebey-studio/src/caption.js b/public/bluebey-studio/src/caption.js index d0318e7..7865295 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.3, dy: -0.3 }); +for (const ch of HANGING_PUNCTUATION) VERTICAL_OFFSETS.set(ch, { dx: 0.55, dy: -0.8 }); 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 }); @@ -831,10 +831,20 @@ function thinkEdges(box, scale) { const a = points[i]; const b = points[(i + 1) % points.length]; const mid = { x: (a.x + b.x) / 2, y: (a.y + b.y) / 2 }; - const nx = mid.x - cx; - const ny = mid.y - cy; - const length = Math.hypot(nx, ny) || 1; - edges.push(scallopEdge(a, b, { x: nx / length, y: ny / length }, amp)); + // Bulge perpendicular to the edge, not away from the centre: on a wide box + // the centre direction points sideways along the top and bottom edges, which + // is what tilted those scallops. The sign is flipped so it always faces out, + // which makes every edge scallop the same way the left and right ones do. + const dx = b.x - a.x; + const dy = b.y - a.y; + const length = Math.hypot(dx, dy) || 1; + let nx = -dy / length; + let ny = dx / length; + if (nx * (mid.x - cx) + ny * (mid.y - cy) < 0) { + nx = -nx; + ny = -ny; + } + edges.push(scallopEdge(a, b, { x: nx, y: ny }, amp)); } return { edges, amp }; } @@ -869,9 +879,10 @@ function thoughtTrail(box, state, scale, outer) { // Sized from the font, not the leftover room, so the puffs stay visible at any // bubble size; they start just outside the cloud (`outer`) and shrink away. const unit = resolveFontSize(state, scale); - const r1 = unit * 0.6; - const r2 = unit * 0.42; - const r3 = unit * 0.26; + // 80% of the first cut, which read a touch large. + const r1 = unit * 0.48; + const r2 = unit * 0.34; + const r3 = unit * 0.21; const gap = unit * 0.5; const d1 = outer + r1; const d2 = d1 + r1 + gap; |
