Make Something - Gauri Jare
✓ Published0🌍 Public
A teal rectangle follows the mouse cursor across a full-window SVG canvas. The code uses d3.select to create the SVG and append the rectangle, setting its width and height based on the window dimensions. A mousemove event handler updates the rectangle’s x and y attributes with the cursor’s event coordinates. The plain black-stroked shape moves freely, demonstrating basic D3 interaction with the DOM.
AI-generated descriptionA circle that follows the mouse.
MIT Licensed