Skip to main content
100%

first_assignment

✓ Published0🌍 Public
NNavak94
Last edited Jan 17, 2023
Created on Jan 17, 2023

This example shows a black outlined circle that tracks the mouse across the screen, growing larger when the user moves the cursor faster. It uses `d3.select` and `selection.on('mousemove')` to capture pointer coordinates and movement deltas, then calculates a radius based on the movement speed, capping it at 100 pixels. The visualization renders in an SVG that dynamically resizes to the window dimensions via `window.innerWidth` and `window.innerHeight`. The state updates through a custom `setState` function that triggers a re-render through the `viz` function.

AI-generated description

A mouse finder which the circle will enlarge when the user moves the mouse faster.

MIT Licensed

Similar vizzes