setInterval(() => console.log(" ".repeat(9 + Math.sin(a/2) *9) + "*x"[a++&1]), 99, a = 0)
Disclaimer: I have no idea what I'm talking about, all my answers are guesses.
Open source: GitHub