| interval | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | x | 4.41 | x | x | x |
| 回调频率 |
| 合法值 | 兼容性 | 描述 | | game | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | x | - | x | x | x |
| 适用于更新游戏的回调频率,在 20ms/次 左右 | | ui | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | x | - | x | x | x |
| 适用于更新游戏的回调频率,在 20ms/次 左右 | | normal | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | x | - | x | x | x |
| 普通的回调频率,在 200ms/次 左右 |
|
| success | (result: StartAccelerometerSuccess) => void | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | x | 4.41 | x | x | x |
| 成功返回的回调函数 |
| fail | (result: UniError) => void | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | x | 4.41 | x | x | x |
| 失败的回调函数 |
| complete | (result: any) => void | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | x | 4.41 | x | x | x |
| 结束的回调函数(调用成功、失败都会执行) |