Skip to content

sud.onGyroscopeChange ​

JS
    sud.onGyroscopeChange(function callback)

Listens for gyroscope data change events.

The interval follows the interval parameter of sud.startGyroscope(). Listening starts automatically after the interface is called.

Parameters

  • function callback: Callback function for gyroscope data change events

Parameters of the callback function

  • Object res: Returns gyroscope data

Properties of the gyroscope data:

PropertyTypeDescription
xnumberAngular velocity around the X axis (rad/s)
ynumberAngular velocity around the Y axis (rad/s)
znumberAngular velocity around the Z axis (rad/s)