There’s a lot of rain in autumn, so I came up with the idea of drawing the Rainy Autumn.

In this picture, I use the syntax of “random()” to make the background color changing from bright to dark with the mouse moving from left to right. In the meantime, the rain becomes heavier, and the leaves fall faster.

Also by useing the “random()” syntax, the rain drops appear outside the window randomly, and their opacity changes randomly. Because of the visual illusion, it feels that the rain is falling down continually.

The leaves’ falling movement loop over and over by using these codes:


But here is a difficult thing for me: I don’t wan’t the rain drops and the leaves appear outside the window frame. Can I draw a kind of mask layer to  restrict the animation’s area?

In this case, the area is like this: