p5.js turnAxis variable
The turnAxis variable is used to store the axis triggered by the deviceTurned() method. This takes place when a mobile device is rotated in any of the X, Y or Z axis. This variable is only defined within the scope of the deviceTurned() function.
The below example demonstrates the turnAxis variable in p5.js: