Skip to main content
100%

Illusion of rain

✓ Published0🌍 Public
Nnaisargidave
Last edited Sep 30, 2020
Created on Sep 30, 2020

A grid of small circles falls steadily down the canvas like rain, while a separate set of static grey circles and one gold circle sit in the upper region as a backdrop. The rain effect is animated with a Canvas 2D context, using `requestAnimationFrame` and `Math.sin` to oscillate each dot’s horizontal position and size. The drop size toggles between blue and light blue fills based on a sine threshold. The SVG defines the fixed circles, and the JavaScript loop redraws the moving grid each frame.

AI-generated description

Creating an illusion of rain!

From "MathPatterns, changingColors" tutorial given at MIT on July 28, 2013.

MIT Licensed

Similar vizzes