Skip to main content
100%

Fork of Episode 3: Sol LeWitt in Vanilla JavaScript version 3

✓ Published0🌍 Public
Ssenghok789@gmail.com
Last edited Sep 29, 2025
Created on Sep 29, 2025

This example generates a dynamic grid of vertical rectangles, each filled with a randomly selected RGB color, and animates them by translating them vertically along the y-axis. A white circle is placed at the center of the canvas, and a mask is defined with a circular shape to clip a second set of horizontal rectangles, creating a patterned circle. The code uses the SVG `rect` and `circle` elements, along with the `mask` and `defs` elements, to apply the clipping. The animation is driven by calling the `animate` method on the rectangle elements with keyframes and timing options.

AI-generated description
MIT Licensed

Similar vizzes