mobile improvements, particles for mobile, hekate's protection widget
All checks were successful
/ test (push) Successful in 15s

This commit is contained in:
Soph :3 2024-08-05 16:48:31 +03:00
parent 79404a47be
commit 38d5476e81
Signed by: sophie
GPG key ID: EDA5D222A0C270F2
4 changed files with 59 additions and 5 deletions

View file

@ -93,3 +93,18 @@ document.documentElement.addEventListener("mousemove", (event) => {
const particle = new Particle(event.pageX, event.pageY);
particles.push(particle);
});
document.documentElement.addEventListener("touchmove", function(e) {
for(let i = 0; i < e.touches.length; i++) {
if (Date.now() - lastMoveTimestamp < 50) {
return;
}
lastMoveTimestamp = Date.now();
const touch = e.touches.item(i);
if(!touch) return;
const particle = new Particle(touch.pageX, touch.pageY);
particles.push(particle);
}
}, false);