Skip to main content
100%

Sol LeWitt in Vanilla JavaScript (2)

✓ Published0🌍 Public
Xxinyuwangxyw
Last edited Mar 17, 2023
Created on Mar 16, 2023

This example reproduces a Sol LeWitt art piece using only vanilla JavaScript and the SVG API. It shows a grid of black vertical and horizontal rectangles intersecting within a central white area, created through layered masking. The code builds an SVG mask with a large white rectangle and a smaller black rectangle to hide portions of the vertical stripes, while a foreground mask with a white center reveals the horizontal stripes within the same central region. The rendering approach relies on programmatic SVG element creation and mask compositing.

AI-generated description

A reproduction of a Sol LeWitt art piece.

MIT Licensed

Similar vizzes