Table of Contents

Class Gyroscope

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The Gyroscope interface of the Sensor APIs provides on each reading the angular velocity of the device along all three axes.

[Value("Gyroscope")]
public class Gyroscope : Sensor
Inheritance
Gyroscope
Inherited Members

Remarks

To use this sensor, the user must grant permission to the 'gyroscope' device sensor through the Permissions API. In addition, this feature may be blocked by a Permissions Policy set on your server.

See also on MDN

Constructors

Gyroscope()

public Gyroscope()

Gyroscope(GyroscopeSensorOptions)

The Gyroscope() constructor
creates a new Gyroscope object which provides on each reading the
angular velocity of the device along all three axes.

public Gyroscope(GyroscopeSensorOptions sensorOptions = null)

Parameters

sensorOptions GyroscopeSensorOptions

Remarks

-'sensor.Reading' event

See also on MDN

Properties

X

The x read-only property of the
Gyroscope interface returns a number specifying the
angular velocity of the device along its x-axis.

[Value("x")]
public Number? X { get; }

Property Value

Number

A 'Number'.

Remarks

Y

The y read-only property of the Gyroscope interface returns a number specifying the angular velocity of the device along its y-axis.

[Value("y")]
public Number? Y { get; }

Property Value

Number

A 'Number'.

Remarks

Z

The z read-only property of the
Gyroscope interface returns a number specifying the
angular velocity of the device along its z-axis.

[Value("z")]
public Number? Z { get; }

Property Value

Number

A 'Number'.

Remarks