@rickmeijer/mousemove
v1.0.0
Published
Small script that should track mouse movement over an element.
Readme
Small script that should track mouse movement over an element. Should be used other scripts that need the mouse position.
Usage:
import { mouseMove } from '@rickmeijer/utils/mousemove'
let interactiveHTMLElement = document.body;
mouseMove(interactiveHTMlElement, (x, y) => {
// do stuff here with the mousecursor
}, .2);