Skip to main content
100%

Fork of Smiley Face Part II

✓ Published2🌍 Public
DDavid Kim
Last edited Apr 16, 2022
Created on Apr 10, 2022

This interactive visualization displays a single circle that follows the mouse cursor as it moves across an SVG canvas. The circle’s position is updated continuously based on the user’s pointer coordinates. Built with React 16.9 and D3 v7, the app uses React’s `useState` and `useCallback` hooks to manage mouse-position state, while event handling is implemented via the SVG `onMouseMove` attribute. The visualization renders declaratively—when the mouse moves, the `cx` and `cy` attributes of the circle are recomputed, causing React to update the SVG in real time.

AI-generated description

A program that follows your mouse with circle

MIT Licensed

Similar vizzes