The options for constructing a Shake handler.

interface ShakeOptions {
    threshold: number;
    timeout: number;
}

Properties

Properties

threshold: number

Minimum acceleration needed to dispatch an event: meters per second squared (m/s²).

https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/acceleration

timeout: number

After a shake event is dispatched, subsequent events will not be dispatched until after a duration greater than or equal to this value (milliseconds).