Skip to main content
100%

Make Something: Fork of Mouse Follower

✓ Published0🌍 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!

MIT Licensed

Similar vizzes