Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Make Something: Fork of Mouse Follower

Public visualization

Viewing a saved revision (read-only)

30d53330239d482aa62f00f012a29f7d

Make Something: Fork of Mouse Follower

0 stars0🌍 Public
Fflanagancarlie@gmail.com
Last edited Jan 15, 2023
Created on Jan 10, 2023
Forked from Mouse Follower

This example demonstrates a paint tool where a circle follows the mouse and leaves a trail of colored dots. Users draw by moving the pointer, cycle through nine colors by clicking, and adjust brush size from five preset values by right-clicking. The visualization uses a unidirectional data flow with a custom `viz` function and a `setState` callback. D3 selections handle mouse events and append SVG circles dynamically, while a text label shows the "Paint!" instruction in the center-top of the viewport.

AI-generated description

A circle that follows the mouse using unidirectional data flow. This is a paint tool. Move the mouse to draw! Click to change colors, and right click to change brush size!