jmbv Fork of Hello VizHub
✓ Published0🌍 Public
This example demonstrates D3.js SVG masking by drawing two sets of overlapping horizontal and vertical rectangles, each clipped by circular masks to reveal a central circular window. The code uses `d3.select` and `d3.range` to generate 100 rectangles per axis, with one mask using a black background and white circle, the other inverted. The visualization fills the browser viewport using `window.innerWidth` and `window.innerHeight`, producing a dynamic grid-like pattern visible only within the overlapping masked region.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed