1.0.0 • Published 3 years ago
@rickmeijer/mousemove v1.0.0
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);
1.0.0
3 years ago