This demo uses the devicemotion event listener. This is also Part of the geo api. The devicemotion event listener comes with three values - x, y and z.

Here are some live x, y and z readings from the accelerationIncludingGravity object; this is more likely to be supported (doesn't require compensating for gravity!). If you're looking at this page on a mobile device with a browser that can display this stuff, they'll update automatically as you wave it around:

As you can see, they're pretty noisy values, so some kind of smoothing or filter might be appropriate.