summaryrefslogtreecommitdiff
path: root/src/js/mouseblob.js
blob: f2e954d34c45925a9a37b3459e98f9349bcda44e (plain)
1
2
3
4
5
6
7
8
9
const blob = document.querySelector('.sblob');

window.onpointermove = event => { 
    const { clientX, clientY } = event;
    blob.animate({
        left: `${clientX}px`,
        top: `${clientY}px`
    }, { duration: 1000, fill: "forwards" });
}