Skip to main content

bn.startDeviceMotionListening

startDeviceMotionListening(options?): Promise<void>

description Start listening for changes in device orientation.

example

 bn.startDeviceMotionListening()

Parameters

NameType
options?StartDeviceMotionListeningOption

Returns

Promise<void>


Interface: StartDeviceMotionListeningOption#

NameTypeDescription
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.