Your awaits are random and not synced to your animations. On line 5 you start a 500ms animation but you tell the await to pause for 2000ms. Try 500ms or even 300ms with the current easing.
this post was submitted on 23 Oct 2023
4 points (83.3% liked)
Web Development
0 readers
1 users here now
Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient
founded 1 year ago
MODERATORS
I set such delays so that I have time to watch things happening in devtools, that's all.
However, reducing delays still doesn't allow the next text to appear simultaneously with the previous text disappearing.
The solution is figuring out how to overlay the texts without requiring a background color.
Have you thought of splitting up the string into single letters and animating one letter at a time? The animation would be slightly different than the wipe animation you have going right now, but you wouldn’t have to worry about backgrounds anymore