Skip to main content
100%

Fork of Smiley face part 1

✓ Published0🌍 Public
Zzyniax
Last edited Apr 7, 2021
Created on Apr 6, 2021
Forked from Smiley face part 1

This example renders a single interactive circle that follows the mouse cursor across an SVG canvas. The visualization uses React’s `useState` and `useCallback` hooks to track `clientX` and `clientY` coordinates from the `onMouseMove` event, updating the circle’s center position in real time. Rendered via ReactDOM and SVG, the circle’s radius is fixed at 30 pixels, and the initial position is set to the center of a 960×500 viewport. The underlying d3 library is loaded but not directly used in the interaction logic.

AI-generated description

Half way towards a smiley face. Smiley mark down (MD).

MIT Licensed

Similar vizzes