feat: reduce font size and split sentences into two lines

- Reduce font size from 32px to 20px for sentences/paragraphs mode
- Add breakTextIntoLines helper to split sentences naturally at spaces
- Render sentences across two lines with proper color progression
- Add space character to allowed input regex
This commit is contained in:
2025-11-04 17:14:58 +00:00
parent c271d1c4bf
commit 9ed9a0510c
3 changed files with 97 additions and 28 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ export const useKeyBindings = (gameManager: GameManager) => {
// handle letter and punctuation typing during game
if (gameManager.gameStatus === "started") {
if (ev.key.length === 1 && /[a-zA-Z.,!?]/.test(ev.key)) {
if (ev.key.length === 1 && /[a-zA-Z.,!? ]/.test(ev.key)) {
gameManager.handleTypedLetter(ev.key);
}
}