参考 rotationY

rotationY

The system variable rotationY always contains the rotation of the device along the y axis. If the sketch angleMode() is set to DEGREES, the value will be -90 to 90. If it is set to RADIANS, the value will be -PI/2 to PI/2.

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.

示例

Notice any errors or typos? Please let us know. Please feel free to edit src/events/acceleration.js and open a pull request!

相关参考