Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars2🌍 Public
Jjjlaber
Last edited Jan 12, 2023
Created on Jan 12, 2023

A circle tracks the cursor across a full-screen SVG canvas. Each mouse movement updates the circle’s center coordinates via a state object and a custom `setState` callback. The visualization uses d3.v7’s `select` API to bind SVG elements and handle `mousemove` events, while `join` synchronizes the circle’s `cx` and `cy` attributes. The canvas resizes to the browser window dimensions.

AI-generated description

A circle that follows the mouse.

Comments

Sign in to join the discussion.

MIT Licensed