reverted
This commit is contained in:
parent
427a84d823
commit
9d9a0fe95e
@ -105,18 +105,11 @@
|
||||
|
||||
document.body.appendChild(nekoEl);
|
||||
|
||||
// Desktop: Track mouse movement
|
||||
document.addEventListener('mousemove', function (event) {
|
||||
document.addEventListener("mousemove", function (event) {
|
||||
mousePosX = event.clientX;
|
||||
mousePosY = event.clientY;
|
||||
});
|
||||
|
||||
// Mobile: Track touch movement (including during scrolling)
|
||||
document.addEventListener('touchmove', function (event) {
|
||||
const touch = event.touches[0]; // Use the first touch point
|
||||
mousePosX = touch.clientX;
|
||||
mousePosY = touch.clientY;
|
||||
}, { passive: true });
|
||||
|
||||
window.requestAnimationFrame(onAnimationFrame);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user