mobile improvements, particles for mobile, hekate's protection widget
All checks were successful
/ test (push) Successful in 15s
All checks were successful
/ test (push) Successful in 15s
This commit is contained in:
parent
79404a47be
commit
38d5476e81
4 changed files with 59 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue