How is this effect achieved?

http://www.17sucai.com/pins/d.
asks this web site to enter, draw dots to move randomly on the page, and then connect the dots with lines around the mouse. Or give me a demo website that can see the source code so that I can study it, please boss!

Mar.03,2021

there is a similar canvas-nest.js


canvas drew it. Guess the structure
point (direction, coordinates, collision)
boundary (the point bounces against the boundary and is centered beyond the boundary connection range)
connection range (nearest point connection within the range)

construct basic structure
timer refresh action (reverse motion (including boundary judgment), connection range judgment)

that seems to be all. A relatively crude conjecture

It's on

gitHub, but I forgot my name

.
Menu