Skip to main content

bn.onAccelerometerChange

onAccelerometerChange(cb): void

description Listen for acceleration data events. Frequency basis bn.startAccelerometer() of interval Parameters, Interface calls automatically start listening.

example

 bn.onAccelerometerChange(callback)

Parameters

NameType
cbOnAccelerometerChangeCallback

Returns

void


OnAccelerometerChangeCallback

Ƭ OnAccelerometerChangeCallback: (result: OnAccelerometerChangeCallbackResult) => void

Type declaration

▸ (result): void

Acceleration Data Event Callback Function

Parameters

NameType
resultOnAccelerometerChangeCallbackResult

Returns

void


Interface: OnAccelerometerChangeCallbackResult

NameTypeDescription
xnumberX axis
ynumberY axis
znumberZ axis