startGyroscope
Requires:
BaseKit≥2.3.2@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
Method signature
startGyroscope(params: )Minimum SDK versions
- iOS
ThingSmartBaseKitBizBundle - ≥ 5.2.1
- Android
com.thingclips.smart:thingsmart-bizbundle-basekit - ≥ 5.2.0
Description
Start listening to gyroscope data
Parameters
| Property | Type | Required | Default | Description | Minimum SDK versions |
|---|---|---|---|---|---|
interval | "game" | "ui" | "normal" | No | 'normal' | Frequency of the gyroscope data callback | — |
complete | () => void | No | - | Completion callback (executed on both success and failure) | — |
success | () => void | No | - | Callback on successful API call | — |
fail | (params: Object) => void | No | - | Failure callback | — |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None
Valid Values
interval
| Value | Description | BaseKit Since |
|---|---|---|
game | Callback frequency for game updates, about 20 ms per callback | - |
ui | Callback frequency for UI updates, about 60 ms per callback | - |
normal | Normal callback frequency, about 200 ms per callback | - |