From cc46abe3e5345588d7a89ba1b33d2e2a51c9af1d Mon Sep 17 00:00:00 2001
From: Anssi Kostiainen Copyright © 2023 World Wide Web Consortium. W3C® liability, trademark and permissive document license rules apply. Copyright © 2023 World Wide Web Consortium. W3C® liability, trademark and permissive document license rules apply. This document is governed by the 2 November 2021 W3C Process Document. This document is governed by the 12 June 2023 W3C Process Document. This document is maintained and updated at any time. Some parts of this document are work in progress.Gyroscope
-
+
More details about this document
Gyroscope
public list of any patent disclosures made in connection with the deliverables of the group;
that page also includes instructions for disclosing a patent.
An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
-
Table of Contents
- 5. The Gyroscope is a powerful feature that is identified by the name "gyroscope", which is also its associated sensor permission name. Its permission revocation algorithm is the
result of calling the generic sensor permission revocation algorithm with
"gyroscope".
Headers/Feature-Policy/gyroscope
-In only one current engine.
-The Gyroscope is a policy-controlled feature identified by the string "gyroscope". Its default allowlist is 'self'
.
A latest reading of a Sensor
of Gyroscope sensor type includes three entries whose keys are "x", "y", "z" and whose values contain current angular
velocity about the corresponding axes.
In only one current engine.
-In only one current engine.
-[- - - - - - - - - - - + - - + + + + \ No newline at end of file + function previousHighlightIndex(algoName, varName) { + return indexNames.get(algoName+"///"+varName); + } + function nameFromIndex(index) { + return "selected" + index; + } +} + \ No newline at end of fileSecureContext ,Exposed =Window ]interface :
Gyroscope Sensor {(
constructor optional GyroscopeSensorOptions = {}); @@ -1052,60 +1064,12 @@
sensorOptions Supported sensor options for
Gyroscope
are "frequency" and "referenceFrame".6.1.1. Gyroscope.x
-- -- --In only one current engine.
-- FirefoxNoneSafariNoneChrome67+ --
- Opera?Edge79+ -
- Edge (Legacy)?IENone -
- Firefox for Android?iOS Safari?Chrome for Android?Android WebView?Samsung Internet?Opera Mobile? -The
x
attribute of theGyroscope
interface represents the current angular velocity around X-axis. In other words, this attribute returns the result of invoking get value from latest reading withthis and "x" as arguments.6.1.2. Gyroscope.y
-- -- --In only one current engine.
-- FirefoxNoneSafariNoneChrome67+ --
- Opera?Edge79+ -
- Edge (Legacy)?IENone -
- Firefox for Android?iOS Safari?Chrome for Android?Android WebView?Samsung Internet?Opera Mobile? -The
y
attribute of theGyroscope
interface represents the current angular velocity around Y-axis. In other words, this attribute returns the result of invoking get value from latest reading withthis and "y" as arguments.6.1.3. Gyroscope.z
-- -- --In only one current engine.
-- FirefoxNoneSafariNoneChrome67+ --
- Opera?Edge79+ -
- Edge (Legacy)?IENone -
- Firefox for Android?iOS Safari?Chrome for Android?Android WebView?Samsung Internet?Opera Mobile? -The
z
attribute of theGyroscope
interface represents the current angular velocity around Z-axis. In other words, this attribute returns the result of invoking get value from latest reading withthis and "z" as arguments.7. Abstract Operations
@@ -1145,16 +1109,16 @@
8. Automation
- This section extends the automation section defined in the Generic Sensor API [GENERIC-SENSOR] to provide mocking information about the rate of rotation around the device’s local three primary axes -for the purposes of testing a user agent’s implementation ofGyroscope
API. -8.1. Mock Sensor Type
-The
-Gyroscope
class has an associated mock sensor type which is "gyroscope", its mock sensor reading values dictionary is defined as follows:+ This section extends Generic Sensor API § 9 Automation by providing Gyroscope-specific virtual sensor metadata. +dictionary { -
GyroscopeReadingValues required double ?; -
x required double ?; -
y required double ?; -}; -
z The per-type virtual sensor metadata map must have the following entry:
++
- key +
- +
"
+gyroscope
"- value +
- +
A virtual sensor metadata whose virtual sensor type is Gyroscope and reading parsing algorithm is parse xyz reading.
+9. Acknowledgements
Tobie Langel for the work on Generic Sensor API.
10. Conformance
@@ -1190,337 +1154,82 @@Gyroscope(), in § 6.1
GyroscopeLocalCoordinateSystem, in § 6.1 - GyroscopeReadingValues, in § 8.1 Gyroscope(sensorOptions), in § 6.1 GyroscopeSensorOptions, in § 6.1 referenceFrame, in § 6.1 "screen", in § 6.1 - - x - -
-- attribute for Gyroscope, in § 6.1 -
- dict-member for GyroscopeReadingValues, in § 8.1 -
- y - -
-- attribute for Gyroscope, in § 6.1 -
- dict-member for GyroscopeReadingValues, in § 8.1 -
- z - -
+- attribute for Gyroscope, in § 6.1 -
- dict-member for GyroscopeReadingValues, in § 8.1 -
x, in § 6.1 + y, in § 6.1 + z, in § 6.1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Terms defined by reference
- [ACCELEROMETER] defines the following terms:
-
- device coordinate system -
- screen coordinate system +
- device coordinate system +
- screen coordinate system
- [GENERIC-SENSOR] defines the following terms:
-
- "gyroscope" -
- Sensor -
- SensorOptions -
- automation -
- check sensor policy-controlled features -
- default sensor -
- eavesdropping -
- fingerprinting -
- generic mitigations -
- generic sensor permission revocation algorithm -
- get value from latest reading -
- initialize a sensor object -
- keylogging -
- latest reading -
- local coordinate system -
- location tracking -
- mock sensor reading values -
- mock sensor type -
- sensor permission name -
- sensor reading -
- sensor type -
- supported sensor options -
- user identifying +
- Sensor +
- SensorOptions +
- check sensor policy-controlled features +
- default sensor +
- eavesdropping +
- fingerprinting +
- generic mitigations +
- generic sensor permission revocation algorithm +
- get value from latest reading +
- initialize a sensor object +
- keylogging +
- latest reading +
- local coordinate system +
- location tracking +
- parse xyz reading +
- per-type virtual sensor metadata +
- reading parsing algorithm +
- sensor permission name +
- sensor reading +
- sensor type +
- supported sensor options +
- user identifying +
- virtual sensor metadata +
- virtual sensor type
- [INFRA] defines the following terms:
-
- entry -
- keys -
- values +
- entry +
- key +
- keys +
- map +
- value +
- values
- [PERMISSIONS] defines the following terms:
-
- name -
- permission revocation algorithm -
- powerful feature +
- name +
- permission revocation algorithm +
- powerful feature
- [PERMISSIONS-POLICY-1] defines the following terms:
-
- default allowlist -
- policy-controlled feature +
- default allowlist +
- policy-controlled feature
- [WEBIDL] defines the following terms:
-
- DOMException -
- Exposed -
- SecureContext -
- SecurityError -
- double -
- throw +
- DOMException +
- Exposed +
- SecureContext +
- SecurityError +
- double +
- throw
References
@@ -1565,231 +1274,800 @@I
GyroscopeLocalCoordinateSystem = "device"; }; -
referenceFrame dictionary { -
GyroscopeReadingValues required double ?; -
x required double ?; -
y required double ?; -}; -
z