p5.js rotationX Event
The system variable rotationX in p5.js is responsible for the rotation of mobile devices (smartphones and tablets) always along the x-axis. It can be used in the draw() function to continuously get the current rotation along the x-axis. If the graphics angleMode() is set to DEGREES, then the value will be in the range of -180 to 180. When it is set to RADIANS, the value will be -PI to PI.
Note: The order the rotations are called is important if all the three variables are used together. It is required to call them in the order Z, Y, and X to prevent inconsistencies.