waud.js
API Docs for v0.0.4
Show:

Motion

Defined in: src/Motion.hx:16

Summary

Class for shake(devicemotion) functionality.

Constructor

Motion

Defined in src/Motion.hx:16

Syntax

Motion

()

Summary

Example:

    var motion = new Motion();
    motion.shake(onShake);
    function onShake() {
        trace("shake detected");
  }

Item Index

Methods

Methods

shake

Defined in src/Motion.hx:32

Syntax

shake

(
  • callback
  • [threshold = 10]
  • [interval = 1000]
)

Summary

Function to detect shake motion.

Parameters:

  • callback Function
  • [threshold = 10] Int optional
  • [interval = 1000] Int optional

stopShake

Defined in src/Motion.hx:49

Syntax

stopShake

()

Summary

Function to stop shake motion detection.