Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower Xizhi

Public visualization

Viewing a saved revision (read-only)

4644c8e57a4c4b899752e45af58dad59

Mouse Follower Xizhi

0 stars1🌍 Public
XXizhiW
Last edited Jan 12, 2022
Created on Jan 12, 2022

A smiling face rendered as an SVG circle follows the mouse cursor across a 960-by-500 viewport. Built with React and D3 v7, the component tracks pointer movement via the `onMouseMove` event, updating the circle's `cx` and `cy` coordinates with the event's `clientX` and `clientY` values. The visualization uses React's `useState` and `useCallback` hooks to manage and update the cursor position, with the SVG output rendered directly to the DOM.

AI-generated description

Smiley face implementation with React.