Function Fork of SVG Fundamentals - D3 (group)
✓ Published1🌍 Public
SSidney Oluoch
Last edited Aug 24, 2022
Created on Aug 24, 2022
Forked from Symbol Fork of SVG Fundamentals - D3 (group)
This example demonstrates how SVG masks can create intricate grid patterns from overlapping horizontal and vertical rectangles. Using D3.js version 7, the code generates 100 rect elements in each direction, applying two distinct masks that feature D3's built-in symbol shapes. The `renderMask` function constructs each mask with a path for every symbol from the `d3.symbols` array, positioned horizontally across the canvas. A boolean parameter controls whether the mask is inverted, switching between black and white fills to produce contrasting effects on the final visualization.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed