Skip to main content
100%

SVG Fundamentals

✓ Published1🌍 Public
HHenrique Peixoto
Last edited Jul 22, 2025
Created on Jul 21, 2025
Forked from HTML Starter

This example demonstrates how D3.js SVG masks can combine overlapping rectangular grids with symbolic cutouts to create intricate geometric patterns. The visualization renders 100 horizontal and vertical bars whose intersection is selectively revealed through two complementary masks. The first mask shows white space around circle, triangle, and cross symbols, while the second inverts this effect. Using D3’s `select`, `range`, `symbol`, and `symbols` APIs, the code generates SVG paths and applies mask attributes dynamically. The result is a layered interplay of shapes, highlighting SVG’s masking capabilities for pattern composition.

AI-generated description
MIT Licensed

Similar vizzes