In my CSS code, I have a shape element with an animation that spins infinitely for 50 seconds.
#shape {
-webkit-animation: spin 50s infinite linear;
}
@-webkit-keyframes spin {
0% { transform: rotateY(0); }
100% { transform: rotateY(-360deg); }
}
I want to detect when the rotation reaches a specific angle, like -30 degrees on the Y-axis. I have attempted various methods using JavaScript and jQuery, but so far, nothing has worked successfully.