The deviceTurned() function is called when the device rotates by more than 90 degrees continuously.
The axis that triggers the deviceTurned() method is stored in the turnAxis variable. The deviceTurned() method can be locked to trigger on any axis: X, Y or Z by comparing the turnAxis variable to 'X', 'Y' or 'Z'.
예제
관련 레퍼런스
accelerationX
The system variable accelerationX always contains the acceleration of the device along the x axis.
accelerationY
The system variable accelerationY always contains the acceleration of the device along the y axis.
accelerationZ
The system variable accelerationZ always contains the acceleration of the device along the z axis.
deviceMoved
The deviceMoved() function is called when the device is moved by more than the threshold value along X, Y or Z axis.