# wx.startGyroscope(Object object)
Start from base library version 2.3.0. Please remaining backward compatible.
with Promise style call: Supported
Mini Program plugin: Support, need to Mini Program base library version no less than 2.9.1
Start monitoring the gyroscope data.
# parameter
# Object object
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
interval | string | normal | no | Monitor the execution frequency of the gyro data callback function |
success | function | no | Interface calls the successful callback function | |
fail | function | no | Interface calls failed callback functions | |
complete | function | no | Callback function at the end of an interface call (both successful and unsuccessful calls are executed) |
object.interval Legal value
value | Introductions | Minimum version |
---|---|---|
game | The callback frequency for updating the game, in 20ms/second About | |
ui | Apply to update UI Callback frequency of 60ms/second About | |
normal | Normal callback frequency, in the 200ms/second About |