Class Magnetometer
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalMagnetometer interface of the Sensor APIs provides information about the magnetic field as detected by the device's primary magnetometer sensor.
[Value("Magnetometer")]
public class Magnetometer : Sensor
- Inheritance
-
Magnetometer
- Inherited Members
Remarks
To use this sensor, the user must grant permission to the 'magnetometer' device sensor through the Permissions API. In addition, this feature may be blocked by a Permissions Policy set on your server.
Constructors
Magnetometer()
public Magnetometer()
Magnetometer(MagnetometerSensorOptions)
NOTE
ExperimentalMagnetometer() constructorcreates a new Magnetometer object which returns information about the
magnetic field as detected by a device's primary magnetometer sensor.
public Magnetometer(MagnetometerSensorOptions sensorOptions = null)
Parameters
sensorOptionsMagnetometerSensorOptions
Remarks
-'sensor.Reading' event
Properties
X
NOTE
Experimentalx read-only property of theMagnetometer interface returns a number specifying
the magnetic field around the device's x-axis.
[Value("x")]
public Number? X { get; }
Property Value
- Number
A 'Number'.
Remarks
Y
NOTE
Experimentaly read-only property of theMagnetometer interface returns a number specifying
the magnetic field around the device's y-axis.
[Value("y")]
public Number? Y { get; }
Property Value
- Number
A 'Number'.
Remarks
Z
NOTE
Experimentalz read-only property of theMagnetometer interface returns a number specifying
the magnetic field around the device's z-axis.
[Value("z")]
public Number? Z { get; }
Property Value
- Number
A 'Number'.