This one I tweaked works!!! But there is a issue. Can anyone please tell me how can attract cursor only when the cursor is at the boundary. In the example it attract before entering the boundary. https://codepen.io/sddvr/pen/JjBwoBZ
I want to recreate this effect with DOM elements instead of canvas. I tried to understand it, but I'm confused as the DOM elements and the canvas elements are different.