Skip to main content
100%

OMG Particles!

✓ Published0🌍 Public
TThanaporn-sk
Last edited Mar 9, 2017
Created on Mar 9, 2017

Mouse movement over the SVG causes concentric, stroked circles to briefly expand and fade away, creating a particle-like trail. The color cycles through the HSL spectrum. The code appends circles using D3’s data join and transition methods with `ease(Math.sqrt)`, then removes them after 2 seconds. It uses D3 v3’s `d3.mouse` to track pointer coordinates and `d3.hsl` for color generation.

AI-generated description

Mouseover to make particles. Built with D3. I’ve written a slight newer version that creates particles continuously via d3.timer rather than on mouseover. So, check that out.

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/1062544'>OMG Particles!</a>

forked from <a href='http://bl.ocks.org/linnnes/'>linnnes</a>'s block: <a href='http://bl.ocks.org/linnnes/32bf55c76ec4f23b192a03bdbeb4e5f4'>OMG Particles!</a>

gpl-3.0 Licensed

Similar vizzes