Class Accelerometer
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalAccelerometer interface of the Sensor APIs provides on each reading the acceleration applied to the device along all three axes.
[Value("Accelerometer")]
public class Accelerometer : Sensor
- Inheritance
-
Accelerometer
- Derived
- Inherited Members
Remarks
To use this sensor, the user must grant permission to the 'accelerometer', device sensor through the Permissions API.
This feature may be blocked by a Permissions Policy set on your server.
Constructors
Accelerometer()
public Accelerometer()
Accelerometer(AccelerometerSensorOptions)
NOTE
ExperimentalAccelerometer() constructor creates a new Accelerometer object which returns the acceleration of the device along all three axes at the time it is read.
public Accelerometer(AccelerometerSensorOptions options = null)
Parameters
optionsAccelerometerSensorOptions
Remarks
-'sensor.Reading' event
Properties
X
NOTE
Experimentalx read-only property of the Accelerometer interface returns a number specifying the acceleration of the device along its x-axis.
[Value("x")]
public Number? X { get; }
Property Value
- Number
A 'Number'.
Remarks
Y
NOTE
Experimentaly read-only property of the Accelerometer interface returns a number specifying the acceleration of the device along its y-axis.
[Value("y")]
public Number? Y { get; }
Property Value
- Number
A 'Number'.
Remarks
Z
NOTE
Experimentalz read-only property of the Accelerometer interface returns a number specifying the acceleration of the device along its z-axis.
[Value("z")]
public Number? Z { get; }
Property Value
- Number
A 'Number'.