Update 1.js
This commit is contained in:
@@ -1,18 +1,3 @@
|
|||||||
/*BUTTON MOVEMENT*/
|
|
||||||
const glassyButtons = document.querySelectorAll(".glassy-button");
|
|
||||||
glassyButtons.forEach((button) => {
|
|
||||||
button.addEventListener("mousemove", (event) => {
|
|
||||||
const centerX = button.offsetWidth / 2;
|
|
||||||
const centerY = button.offsetHeight / 2;
|
|
||||||
|
|
||||||
const offsetX = event.offsetX - centerX;
|
|
||||||
const offsetY = event.offsetY - centerY;
|
|
||||||
|
|
||||||
button.style.setProperty("--_x-motion", `${offsetX}px`);
|
|
||||||
button.style.setProperty("--_y-motion", `${offsetY}px`);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
/*IMAGE CHANGER*/
|
/*IMAGE CHANGER*/
|
||||||
let currentIndex = 0;
|
let currentIndex = 0;
|
||||||
const images = document.querySelectorAll('#photo img');
|
const images = document.querySelectorAll('#photo img');
|
||||||
|
|||||||
Reference in New Issue
Block a user