-
Book Overview & Buying
-
Table Of Contents
JavaScript from Beginner to Professional
By :
This exercise will create a continuous animation of text moving from top to bottom. The final effect produced will show characters moving down the screen within the canvas element and appearing to disappear and fade as they approach the bottom of the screen as more new characters will be added to the canvas in their place. The random character can be either a 0 or 1, and will be in place in the position according to the number, which will represent the vertical position of where the character is drawn.
The canvas will be filled with a black background, which is going to use opacity to create the fading effect once it's redrawn:
Figure 14.11: Matrix effect desired outcome
Take the following steps:
getContent element as 2d.