Skip to main content
100%

Connected Particles

✓ Published0🌍 Public
AAjayyy
Last edited Jul 6, 2018
Created on Jun 19, 2018

This example shows 100 blue particles drifting vertically across a canvas, with lines connecting any pair whose distance falls below a threshold; the lines fade out as particles approach a maximum separation, creating a dynamic web that shifts as particles move. Using the d3-timer module for animation, the code updates particle positions on each tick, draws connections with varying opacity based on squared distances, and renders the particles as circles via the Canvas 2D API. The underlying data is procedurally generated random coordinates, with particles wrapping around the top and bottom edges.

AI-generated description

A test of the d3-timer module.

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/157333662ef11c151080'>Connected Particles</a>

gpl-3.0 Licensed

Similar vizzes