Reference rotationX

rotationX

The system variable rotationX always contains the rotation of the device along the x axis. If the sketch angleMode() is set to DEGREES, the value will be -180 to 180. If it is set to RADIANS, the value will be -PI to PI.

Note: The order the rotations are called is important, ie. if used together, it must be called in the order Z-X-Y or there might be unexpected behaviour.

Examples

This page is generated from the comments in src/events/acceleration.js . Please feel free to edit it and submit a pull request!

Related References