bn.startDeviceMotionListening
▸ startDeviceMotionListening(options?
): Promise
<void
>
description
Start listening for changes in device orientation.
example
bn.startDeviceMotionListening()
Parameters
Name | Type |
---|---|
options? | StartDeviceMotionListeningOption |
Returns
Promise
<void
>
Interface: StartDeviceMotionListeningOption
Name | Type | Description |
---|---|---|
interval? | "normal" | "game" | "ui" | Monitor device direction change callback function execution frequency.; 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. |