Table of Contents

Class Accelerometer

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The Accelerometer 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.

See also on MDN

Constructors

Accelerometer()

public Accelerometer()

Accelerometer(AccelerometerSensorOptions)

NOTE
Experimental
The Accelerometer() 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

options AccelerometerSensorOptions

Remarks

-'sensor.Reading' event

See also on MDN

Properties

X

NOTE
Experimental
The x 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
Experimental
The y 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
Experimental
The z 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'.

Remarks