Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "index"

The library exposes the ShakeDetector class.

module

ShakeDetector

Index

Functions

emitShakeEvent

  • emitShakeEvent(): void
  • Fires the shake event on window

    Returns void

isShake

  • isShake(dx: number, dy: number, dz: number, tr: number): boolean
  • Compares changes in acceleration with the threshold

    Parameters

    • dx: number

      change in acceleration on X-axis

    • dy: number

      change in acceleration on Y-axis

    • dz: number

      change in acceleration on Z-axis

    • tr: number

      threshold

    Returns boolean

Generated using TypeDoc