_DC.Gyro🔗 create a gyroscopic listener (e.g. for use with mobile phones or tablets)

Constructor: [callback [interval [page]]]

interval – the number of milliseconds to wait between requests sent to the server

page – the URL of the page to which to send the request

Public Fields:

Interval – the number of milliseconds to wait between requests sent to the server (default is 250ms)

Page – the URL of the page to which to send the request (default is calling page)

Callback – the name of the callback function to execute (default is 'APLJax')

NoAlert – boolean value to optionally suppress the Alert if DeviceOrientation-Event not supported (if set to 1)

Notes:

returns the following data elements to the server

event – "deviceorientation"

alpha – direction

beta – front/back tilt

gamma – left/right tilt

Relevant Sample Pages:

Controls used on this page: Dyalog: Tabs Base HTML: style