feat: add dynamic ship tracking for sentences mode

- Ship now moves to center of each character as you type
- Calculate and store X position of current character during rendering
- Ship smoothly tracks typing progress across both lines
- Handles line transitions seamlessly
- Creates engaging targeting effect as ship 'shoots' each letter
This commit is contained in:
2025-11-04 17:45:36 +00:00
parent d1de98793a
commit 7860c7e729
3 changed files with 17 additions and 4 deletions
+2
View File
@@ -37,6 +37,8 @@ export type FallingLetter = {
// For line transitions in sentences/paragraphs
lineTransition?: boolean;
lineTransitionTime?: number;
// For ship tracking in sentences
currentCharX?: number; // X position of current character to type
};
// ============================================================================