sAnKeT
sAnKeT
KPCKevin Powell - Community
Created by sAnKeT on 3/23/2024 in #front-end
Cursor Animation
Got it:thumbup:
9 replies
KPCKevin Powell - Community
Created by sAnKeT on 3/23/2024 in #front-end
Cursor Animation
This is brilliant. Thank you very much. I just had one last question regarding this
function circleMouseFollower(angle, scale) {
window.addEventListener("mousemove", function (dets) {
document.querySelector("#minicircle").style.transform = `translate(${
dets.clientX
}px,${dets.clientY}px) rotate(${-angle}deg) scaleY(${scale})`;
});
}
function circleMouseFollower(angle, scale) {
window.addEventListener("mousemove", function (dets) {
document.querySelector("#minicircle").style.transform = `translate(${
dets.clientX
}px,${dets.clientY}px) rotate(${-angle}deg) scaleY(${scale})`;
});
}
In this function, if we are scaling only in Y axis [ scaleY(${scale}) ], how is the cursor scaling in X-axis too?
9 replies
KPCKevin Powell - Community
Created by sAnKeT on 3/23/2024 in #front-end
Cursor Animation
That was very stupid of me 🤦‍♂️ Thank you very much!
9 replies
KPCKevin Powell - Community
Created by sAnKeT on 3/23/2024 in #front-end
Cursor Animation
I spent enough time to know that I am not finding this by myself. Would you mind at least telling me why my cursor is not pinching when I am moving the cursor, upwards or left of the screen? It's working fine when cursor is going downwards or right.
9 replies