Export Code
index.js
import { select, range, symbols, symbol } from 'd3'; //ES6 to import specifc packages of d3

const width = window.innerWidth;
const height = window.innerHeight;

const svg = select('body')
.append('svg')
.attr('width', width)
.attr('height', height);

const n = 100;

svg
.append('g')
.selectAll('rect')
.data(range(n))
.join('rect')
.attr('y', (d) => d * 20)
.attr('width', width)
.attr('height', 10)
.attr('mask', 'url(#mask-even-1)'); // to new name

svg
.append('g')
.selectAll('rect')
.data(range(n))
.join('rect')
.attr('y', (d) => d * 20)
.attr('width', width)
.attr('height', 10)
.attr('mask', 'url(#mask-odd-1)'); // to new name

svg
.append('g')
.selectAll('rect')
.data(range(n))

GiRiB&W_Ep4-Sol_LeWitt-FullRepo Ex V2

JimMaltby

Last edited Oct 24, 2021
Created on Oct 10, 2021

A reproduction of a Sol LeWitt art piece.

MIT Licensed