See the Pen Text Is Flying by Kabir Shah (@KingKabir) on CodePen.

} } function particle() { //speed, life, location, life, colors //speed range = -2.5 to 2.5 this.speed = { x: -2.5 + Math.random() * 5, y: -2.5 + Math.random() * 5 }; //location = center of the screen if (mouse.x && mouse.y) { this.location = { x: mouse.x, y: mouse.y }; } else { this.location = { x: W / 2, y: H / 2 }; } this.color = randomColor() this.font = { size: randomInt(3, 15) } this.word = randomWord() }