Gyroscope Class
The gyroscope (https://w3c.github.io/gyroscope/#gyroscope-interface): the angular velocity of the device around its axes, in rad/s (rounded to 0.1 deg/s, as Chromium). It reads the DeviceSensorType.Gyroscope sensor of the device, and needs the gyroscope permission and permissions policy feature.
public sealed class Gyroscope : Sensor- Inheritance
SensorGyroscope
Constructors
| Name | Description |
|---|---|
| Gyroscope(GyroscopeSensorOptions?) | Creates a gyroscope. Throws a SecurityError DomException when the document is not allowed to use the gyroscope feature. |
Gyroscope(GyroscopeSensorOptions?)
MotionSensors.csCreates a gyroscope. Throws a SecurityError DomException when the document is not allowed to use the gyroscope feature.
public Gyroscope(GyroscopeSensorOptions? sensorOptions = null)Properties
| Name | Description |
|---|---|
| X | Gets the angular velocity around the X axis, or null. |
| Y | Gets the angular velocity around the Y axis, or null. |
| Z | Gets the angular velocity around the Z axis, or null. |
Gets the angular velocity around the X axis, or null.
public double? X { get; }Gets the angular velocity around the Y axis, or null.
public double? Y { get; }Gets the angular velocity around the Z axis, or null.
public double? Z { get; }