The Accelerometer interface of the Sensor APIs provides on each the acceleration applied to the device along all three axes.
The Accelerometer interface of the Sensor APIs provides on each the acceleration applied to the device along all three axes.
Constructor.
The Accelerometer constructor creates a new web.Accelerometer
object which returns the acceleration of the device along all three axes at the time it is read.
options Optional Options are as follows:
frequency: The desired number of times per second a sample should be taken, meaning the number of times per second that web.sensor.onerror
will be called. A whole number or decimal may be used, the latter for frequencies less than a second. The actual reading frequency depends device hardware and consequently may be less than requested.
referenceFrame: Either 'device' or 'screen'. The default is 'device'.
See also: https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/Accelerometer
Constructor. The Accelerometer constructor creates a new `web.Accelerometer` object which returns the acceleration of the device along all three axes at the time it is read. options Optional Options are as follows: frequency: The desired number of times per second a sample should be taken, meaning the number of times per second that `web.sensor.onerror` will be called. A whole number or decimal may be used, the latter for frequencies less than a second. The actual reading frequency depends device hardware and consequently may be less than requested. referenceFrame: Either 'device' or 'screen'. The default is 'device'. See also: `https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/Accelerometer`
(set-x! this val)
Property.
The x read-only property of the web.Accelerometer
interface
a double precision integer containing the acceleration of the
along the its x axis.
var xAcceleration = accelerometer.x
See also: https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/x
Property. The x read-only property of the `web.Accelerometer` interface a double precision integer containing the acceleration of the along the its x axis. `var xAcceleration = accelerometer.x` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/x`
(set-y! this val)
Property.
The y read-only property of the web.Accelerometer
interface
a double precision integer containing the acceleration of the
along the its y axis.
var yAcceleration = accelerometer.y
See also: https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/y
Property. The y read-only property of the `web.Accelerometer` interface a double precision integer containing the acceleration of the along the its y axis. `var yAcceleration = accelerometer.y` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/y`
(set-z! this val)
Property.
The z read-only property of the web.Accelerometer
interface
a double precision integer containing the acceleration of the
along the its z axis.
var zAcceleration = accelerometer.z
See also: https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/z
Property. The z read-only property of the `web.Accelerometer` interface a double precision integer containing the acceleration of the along the its z axis. `var zAcceleration = accelerometer.z` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/z`
(x this)
Property.
The x read-only property of the web.Accelerometer
interface
a double precision integer containing the acceleration of the
along the its x axis.
var xAcceleration = accelerometer.x
See also: https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/x
Property. The x read-only property of the `web.Accelerometer` interface a double precision integer containing the acceleration of the along the its x axis. `var xAcceleration = accelerometer.x` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/x`
(y this)
Property.
The y read-only property of the web.Accelerometer
interface
a double precision integer containing the acceleration of the
along the its y axis.
var yAcceleration = accelerometer.y
See also: https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/y
Property. The y read-only property of the `web.Accelerometer` interface a double precision integer containing the acceleration of the along the its y axis. `var yAcceleration = accelerometer.y` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/y`
(z this)
Property.
The z read-only property of the web.Accelerometer
interface
a double precision integer containing the acceleration of the
along the its z axis.
var zAcceleration = accelerometer.z
See also: https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/z
Property. The z read-only property of the `web.Accelerometer` interface a double precision integer containing the acceleration of the along the its z axis. `var zAcceleration = accelerometer.z` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer/z`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close