Motion, v0.1.9

Use the hardware based motion sensor or mouse position to attain the (virtual) orientation of the computing device. Mouse position allows a resonable fallback for machines that don't contain an accesible motion sensor. Inspired by Amit Singh (http://www.kernelthread.com/software/ams/).

Other Versions

0.1.9, 0.1.8, 0.1.7

BrowserPlus.Motion.Coords({params}, function{}())

Access the current coordinates of the device, return value is a map containing x, y, & z, coordinates

Test: Coords()

Parameters

method: string (Optional)
The method to use for attaining orientation, either 'mouse' or 'motion'. the Methods function should be used to determine availabe methods on the client platform.

BrowserPlus.Motion.Methods({params}, function{}())

Return the available input methods for motion detection. Options are 'mouse' and 'motion'. The former lets the onscreen mouse position artificially represent the 'tilt' of the device. The latter is available when the device contains a motion sensor that provides actual data

Test: Methods()

Parameters

No Parameters