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:
| Property | Type | Description |
|---|---|---|
| x | number | Angular velocity around the X axis (rad/s) |
| y | number | Angular velocity around the Y axis (rad/s) |
| z | number | Angular velocity around the Z axis (rad/s) |
