Liking cljdoc? Tell your friends :D

web.sensors.Magnetometer

The Magnetometer interface of the Sensor APIs provides information the magnetic field as detected by the device’s primary magnetometer

The Magnetometer interface of the Sensor APIs provides information
the magnetic field as detected by the device’s primary magnetometer
raw docstring

constructorcljs

Constructor.

The Magnetometer constructor creates a new web.sensors.Magnetometer object which returns information about the magnetic field as detected by a device’s primary magnetometer sensor.

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 sensor.onreading will be called. A whole number or decimal may be used, the latter for frequencies less than a second. The actual reading frequency depends on 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/Magnetometer/Magnetometer

Constructor.

The Magnetometer constructor creates a new `web.sensors.Magnetometer` object which returns information about the magnetic field as detected by a device’s primary magnetometer sensor.

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 `sensor.onreading` will be called. A whole number or decimal may be used, the latter for frequencies less than a second. The actual reading frequency depends on 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/Magnetometer/Magnetometer`
sourceraw docstring

set-x!cljs

(set-x! this val)

Property.

The x read-only property of the web.sensors.Magnetometer interface a double precision integer containing the magnetic field around device's x axis.

var magnetometerx = magnetometer.x

See also: https://developer.mozilla.org/en-US/docs/Web/API/Magnetometer/x

Property.

The x read-only property of the `web.sensors.Magnetometer` interface
a double precision integer containing the magnetic field around
device's x axis.

`var magnetometerx = magnetometer.x`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Magnetometer/x`
sourceraw docstring

set-y!cljs

(set-y! this val)

Property.

The y read-only property of the web.sensors.Magnetometer interface a double precision integer containing the magnetic field around device's y axis.

var magnetometery = magnetometer.x

See also: https://developer.mozilla.org/en-US/docs/Web/API/Magnetometer/y

Property.

The y read-only property of the `web.sensors.Magnetometer` interface
a double precision integer containing the magnetic field around
device's y axis.

`var magnetometery = magnetometer.x`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Magnetometer/y`
sourceraw docstring

set-z!cljs

(set-z! this val)

Property.

The z read-only property of the web.sensors.Magnetometer interface a double-precision integer containing the magnetic field around device's z axis.

var magnetometerz = magnetometer.z

See also: https://developer.mozilla.org/en-US/docs/Web/API/Magnetometer/z

Property.

The z read-only property of the `web.sensors.Magnetometer` interface
a double-precision integer containing the magnetic field around
device's z axis.

`var magnetometerz = magnetometer.z`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Magnetometer/z`
sourceraw docstring

xcljs

(x this)

Property.

The x read-only property of the web.sensors.Magnetometer interface a double precision integer containing the magnetic field around device's x axis.

var magnetometerx = magnetometer.x

See also: https://developer.mozilla.org/en-US/docs/Web/API/Magnetometer/x

Property.

The x read-only property of the `web.sensors.Magnetometer` interface
a double precision integer containing the magnetic field around
device's x axis.

`var magnetometerx = magnetometer.x`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Magnetometer/x`
sourceraw docstring

ycljs

(y this)

Property.

The y read-only property of the web.sensors.Magnetometer interface a double precision integer containing the magnetic field around device's y axis.

var magnetometery = magnetometer.x

See also: https://developer.mozilla.org/en-US/docs/Web/API/Magnetometer/y

Property.

The y read-only property of the `web.sensors.Magnetometer` interface
a double precision integer containing the magnetic field around
device's y axis.

`var magnetometery = magnetometer.x`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Magnetometer/y`
sourceraw docstring

zcljs

(z this)

Property.

The z read-only property of the web.sensors.Magnetometer interface a double-precision integer containing the magnetic field around device's z axis.

var magnetometerz = magnetometer.z

See also: https://developer.mozilla.org/en-US/docs/Web/API/Magnetometer/z

Property.

The z read-only property of the `web.sensors.Magnetometer` interface
a double-precision integer containing the magnetic field around
device's z axis.

`var magnetometerz = magnetometer.z`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Magnetometer/z`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close