0.90 - shake

Rating: No reviews yet
Downloads: 79728
Released: May 6, 2012
Updated: May 7, 2012 by neuedigitale
Dev status: Stable Help Icon

Downloads

Application jgestures.js
application, 60K, uploaded May 7, 2012 - 22054 downloads
Application jgestures.min.js
application, 16K, uploaded May 7, 2012 - 28738 downloads
Example index.html
example, 8K, uploaded May 7, 2012 - 24154 downloads
Documentation LICENSE
documentation, 11K, uploaded May 7, 2012 - 4782 downloads

Release Notes

Motion events:

A "motion event" is an interpretation of changes in space, e.g. a "shaking motion"
consists of a specified number of acceleration changes in a given interval.

For understanding "directions", place your mobile device on a table with the bottom
(home button) close to you:
  • x-axis: horizontal left / right
  • y-axis: horizontal front / back (through the home button)
  • z-axis: vertical through your device

Note: Devicemotion / deviceorientation don't send custom event (such as: jGestures.touchstart).
Note: Devicemotion should be bound on the "window-element" - because the whole device moves

New Events

'shake'
Is triggered when a shaking motion is detected
obj.description:
shake:leftright:x-axis:frontback:y-axis:updown:z-axis

'shakefrontback'
Is triggered when a shaking motion is detected and the gesture can be interpreted as a mainly front-back movement.
obj.description:
shakefrontback:frontback:y-axis:

'shakeleftright'
Is triggered when a shaking motion is detected and the gesture can be interpreted as a mainly left-right movement.
obj.description:
shakeleftright:leftright:x-axis

'shakeupdown'
Is triggered when a shaking motion is detected and the gesture can be interpreted as a mainly up-down movement.
obj.description:
shakeupdown:updown:z-axis

New options

thresholdShake = {
requiredShakes : 10, // required motions
freezeShakes: 100, // cool down after an event - normal users won't stop the motion immediately
frontback : {
sensitivity: 10 // lower number to increase sensitivity
},
leftright : {
sensitivity: 10 // lower number to increase sensitivity
},
updown : {
sensitivity: 10 // lower number to increase sensitivity
}
};

Reviews for this release

No reviews yet for this release.