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
Name | Type |
---|---|
cb | OnAccelerometerChangeCallback |
Returns
void
OnAccelerometerChangeCallback
Ƭ OnAccelerometerChangeCallback: (result
: OnAccelerometerChangeCallbackResult
) => void
Type declaration
▸ (result
): void
Acceleration Data Event Callback Function
Parameters
Name | Type |
---|---|
result | OnAccelerometerChangeCallbackResult |
Returns
void
Interface: OnAccelerometerChangeCallbackResult
Name | Type | Description |
---|---|---|
x | number | X axis |
y | number | Y axis |
z | number | Z axis |