Blobbing Particles
Two layers of colored particles drift and bounce across a toroidal plane, each layer rendered as semi-transparent cells whose shapes merge and separate. The cells are computed with the `distanceLimitedVoronoi` plugin, and each cell’s fill uses a radial gradient, causing a flickering effect as the cell’s bounding box changes size. The animation runs via `d3.timer`, with particle positions updated by random acceleration and damping, and SVG paths are redrawn each frame.
AI-generated descriptionThis block is a recreation:
- apply radial gradient to distanceLimitedVornoy cells
- use 2 layers: cells of the same layer are blobbing/merging thanks to distanceLimitedVornoy technique; cells of distinct layers are overlapping
I guess the strange flickering effect comes from the definition of a radial gradient: it's center and width of the radial gradient are defined as a percentage. These percentages are computed among the BBox of the element on which the radial gradient is applied on. Because a cell's widht/height is constantly evolving (depending on neighbours proximity), the radial gradient's center/widht is also constantly evolving/shrinking.
See this block for a smoother version.
Acknowledgments to:
- <a href='https://d3js.org/'>D3.js</a> (v3.4)
- <a href='http://blockbuilder.org'>blockbuilder.org</a>