Glad to hear you are unblocked
There are several things with the SO solution that aren’t ideal. I wouldn’t use the slower getBoundingClientRect
to get the mouse position relative to any offsets on the page. I would use getMousePosition
from here: https://www.kirupa.com/canvas/follow_mouse_cursor.htm
There are a few areas where I would just use requestAnimationFrame
instead of mousemove, and I will try to provide you with a working solution in a couple of days.