GravitySensor Example
W3C GravitySensor reports acceleration due to gravity on the selected reference frame axes.
Expected Behavior
- Screen-up on a table:
zshould be roughly+9.8. - Page vertical with the rendered page bottom pointing down:
yshould be roughly+9.8. referenceFrame="device"follows the physical device axes.referenceFrame="screen"follows the visible page orientation.
Controls
Reading
| Status | idle |
|---|---|
| x | null |
| y | null |
| z | null |
| |v| | null |
| timestamp | null |
| count | 0 |