From 6e94906b1724c06256fb2f48a332571388f06144 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Thu, 9 Jan 2025 15:33:28 +0100 Subject: [PATCH 1/3] Add WebVR feature (deprecated) --- features/webvr.yml | 84 +++++++++++++++++++++++++++++++++++++ features/webvr.yml.dist | 93 +++++++++++++++++++++++++++++++++++++++++ scripts/specs.ts | 4 ++ 3 files changed, 181 insertions(+) create mode 100644 features/webvr.yml create mode 100644 features/webvr.yml.dist diff --git a/features/webvr.yml b/features/webvr.yml new file mode 100644 index 00000000000..ab01be35166 --- /dev/null +++ b/features/webvr.yml @@ -0,0 +1,84 @@ +name: WebVR +description: Accessing virtual reality (VR) devices, including sensors and head-mounted displays. +spec: https://immersive-web.github.io/webvr/spec/1.1/ +caniuse: webvr +discouraged: + according_to: + - https://immersive-web.github.io/webvr/spec/1.1/#abstract + alternatives: + - webxr-device +compat_features: + - api.Gamepad.displayId + - api.Navigator.activeVRDisplays + - api.Navigator.activeVRDisplays.secure_context_required + - api.Navigator.getVRDisplays + - api.PositionSensorVRDevice + - api.PositionSensorVRDevice.getImmediateState + - api.PositionSensorVRDevice.getState + - api.PositionSensorVRDevice.resetSensor + - api.VRDisplay + - api.VRDisplay.cancelAnimationFrame + - api.VRDisplay.capabilities + - api.VRDisplay.depthFar + - api.VRDisplay.depthNear + - api.VRDisplay.displayId + - api.VRDisplay.displayName + - api.VRDisplay.exitPresent + - api.VRDisplay.getEyeParameters + - api.VRDisplay.getFrameData + - api.VRDisplay.getImmediatePose + - api.VRDisplay.getLayers + - api.VRDisplay.getPose + - api.VRDisplay.isConnected + - api.VRDisplay.isPresenting + - api.VRDisplay.requestAnimationFrame + - api.VRDisplay.requestPresent + - api.VRDisplay.resetPose + - api.VRDisplay.stageParameters + - api.VRDisplay.submitFrame + - api.VRDisplayCapabilities + - api.VRDisplayCapabilities.canPresent + - api.VRDisplayCapabilities.hasExternalDisplay + - api.VRDisplayCapabilities.hasOrientation + - api.VRDisplayCapabilities.hasPosition + - api.VRDisplayCapabilities.maxLayers + - api.VRDisplayEvent.VRDisplayEvent + - api.VRDisplayEvent + - api.VRDisplayEvent.display + - api.VRDisplayEvent.reason + - api.VREyeParameters + - api.VREyeParameters.fieldOfView + - api.VREyeParameters.maximumFieldOfView + - api.VREyeParameters.minimumFieldOfView + - api.VREyeParameters.offset + - api.VREyeParameters.renderHeight + - api.VREyeParameters.renderWidth + - api.VRFieldOfView + - api.VRFieldOfView.downDegrees + - api.VRFieldOfView.leftDegrees + - api.VRFieldOfView.rightDegrees + - api.VRFieldOfView.upDegrees + - api.VRFrameData.VRFrameData + - api.VRFrameData + - api.VRFrameData.leftProjectionMatrix + - api.VRFrameData.leftViewMatrix + - api.VRFrameData.pose + - api.VRFrameData.rightProjectionMatrix + - api.VRFrameData.rightViewMatrix + - api.VRFrameData.timestamp + - api.VRPose + - api.VRPose.angularAcceleration + - api.VRPose.angularVelocity + - api.VRPose.linearAcceleration + - api.VRPose.linearVelocity + - api.VRPose.orientation + - api.VRPose.position + - api.VRStageParameters + - api.VRStageParameters.sittingToStandingTransform + - api.VRStageParameters.sizeX + - api.VRStageParameters.sizeY + - api.Window.vrdisplayactivate_event + - api.Window.vrdisplayconnect_event + - api.Window.vrdisplaydeactivate_event + - api.Window.vrdisplaydisconnect_event + - api.Window.vrdisplaypresentchange_event diff --git a/features/webvr.yml.dist b/features/webvr.yml.dist new file mode 100644 index 00000000000..f8bea26b30e --- /dev/null +++ b/features/webvr.yml.dist @@ -0,0 +1,93 @@ +# Generated from: webvr.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: {} +compat_features: + # baseline: false + # support: + # chrome_android: "56" + # firefox_android: "55" + - api.Window.vrdisplaydisconnect_event + + # baseline: false + # support: + # firefox_android: "55" + - api.Window.vrdisplayactivate_event + - api.Window.vrdisplayconnect_event + - api.Window.vrdisplaydeactivate_event + - api.Window.vrdisplaypresentchange_event + + # ⬇️ Same status as overall feature ⬇️ + # baseline: false + # support: {} + - api.Gamepad.displayId + - api.Navigator.activeVRDisplays + - api.Navigator.activeVRDisplays.secure_context_required + - api.Navigator.getVRDisplays + - api.PositionSensorVRDevice + - api.PositionSensorVRDevice.getImmediateState + - api.PositionSensorVRDevice.getState + - api.PositionSensorVRDevice.resetSensor + - api.VRDisplay + - api.VRDisplay.cancelAnimationFrame + - api.VRDisplay.capabilities + - api.VRDisplay.depthFar + - api.VRDisplay.depthNear + - api.VRDisplay.displayId + - api.VRDisplay.displayName + - api.VRDisplay.exitPresent + - api.VRDisplay.getEyeParameters + - api.VRDisplay.getFrameData + - api.VRDisplay.getImmediatePose + - api.VRDisplay.getLayers + - api.VRDisplay.getPose + - api.VRDisplay.isConnected + - api.VRDisplay.isPresenting + - api.VRDisplay.requestAnimationFrame + - api.VRDisplay.requestPresent + - api.VRDisplay.resetPose + - api.VRDisplay.stageParameters + - api.VRDisplay.submitFrame + - api.VRDisplayCapabilities + - api.VRDisplayCapabilities.canPresent + - api.VRDisplayCapabilities.hasExternalDisplay + - api.VRDisplayCapabilities.hasOrientation + - api.VRDisplayCapabilities.hasPosition + - api.VRDisplayCapabilities.maxLayers + - api.VRDisplayEvent + - api.VRDisplayEvent.VRDisplayEvent + - api.VRDisplayEvent.display + - api.VRDisplayEvent.reason + - api.VREyeParameters + - api.VREyeParameters.fieldOfView + - api.VREyeParameters.maximumFieldOfView + - api.VREyeParameters.minimumFieldOfView + - api.VREyeParameters.offset + - api.VREyeParameters.renderHeight + - api.VREyeParameters.renderWidth + - api.VRFieldOfView + - api.VRFieldOfView.downDegrees + - api.VRFieldOfView.leftDegrees + - api.VRFieldOfView.rightDegrees + - api.VRFieldOfView.upDegrees + - api.VRFrameData + - api.VRFrameData.VRFrameData + - api.VRFrameData.leftProjectionMatrix + - api.VRFrameData.leftViewMatrix + - api.VRFrameData.pose + - api.VRFrameData.rightProjectionMatrix + - api.VRFrameData.rightViewMatrix + - api.VRFrameData.timestamp + - api.VRPose + - api.VRPose.angularAcceleration + - api.VRPose.angularVelocity + - api.VRPose.linearAcceleration + - api.VRPose.linearVelocity + - api.VRPose.orientation + - api.VRPose.position + - api.VRStageParameters + - api.VRStageParameters.sittingToStandingTransform + - api.VRStageParameters.sizeX + - api.VRStageParameters.sizeY diff --git a/scripts/specs.ts b/scripts/specs.ts index 2cbf37fb90a..0aeac23e4fa 100644 --- a/scripts/specs.ts +++ b/scripts/specs.ts @@ -92,6 +92,10 @@ const defaultAllowlist: allowlistItem[] = [ [ "https://github.com/WebAssembly/exception-handling/blob/main/proposals/exception-handling/legacy/Exceptions.md", "Allowed because there is no other specification to link to." + ], + [ + "https://immersive-web.github.io/webvr/spec/1.1/", + "Allowed because this is the legacy spec that defines WebVR" ] ]; From a9325f2b54f6d01c15b14c25213a467c70397ab8 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Thu, 16 Jan 2025 17:12:11 +0100 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Daniel D. Beck --- features/webvr.yml | 2 +- scripts/specs.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/features/webvr.yml b/features/webvr.yml index ab01be35166..08af23a6bd1 100644 --- a/features/webvr.yml +++ b/features/webvr.yml @@ -1,5 +1,5 @@ name: WebVR -description: Accessing virtual reality (VR) devices, including sensors and head-mounted displays. +description: The `navigator.getVRDisplays()` API represents virtual reality (VR) devices, including sensors and head-mounted displays. spec: https://immersive-web.github.io/webvr/spec/1.1/ caniuse: webvr discouraged: diff --git a/scripts/specs.ts b/scripts/specs.ts index 0aeac23e4fa..ea8763aca1e 100644 --- a/scripts/specs.ts +++ b/scripts/specs.ts @@ -95,7 +95,7 @@ const defaultAllowlist: allowlistItem[] = [ ], [ "https://immersive-web.github.io/webvr/spec/1.1/", - "Allowed because this is the legacy spec that defines WebVR" + "Allowed because this is the legacy spec that defines WebVR." ] ]; From 91aff82dcdf3339a5850020a22f7992a83a32af4 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Thu, 16 Jan 2025 17:16:35 +0100 Subject: [PATCH 3/3] Rerun dist --- features/webvr.yml.dist | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/features/webvr.yml.dist b/features/webvr.yml.dist index f8bea26b30e..b5fe46dac40 100644 --- a/features/webvr.yml.dist +++ b/features/webvr.yml.dist @@ -5,23 +5,6 @@ status: baseline: false support: {} compat_features: - # baseline: false - # support: - # chrome_android: "56" - # firefox_android: "55" - - api.Window.vrdisplaydisconnect_event - - # baseline: false - # support: - # firefox_android: "55" - - api.Window.vrdisplayactivate_event - - api.Window.vrdisplayconnect_event - - api.Window.vrdisplaydeactivate_event - - api.Window.vrdisplaypresentchange_event - - # ⬇️ Same status as overall feature ⬇️ - # baseline: false - # support: {} - api.Gamepad.displayId - api.Navigator.activeVRDisplays - api.Navigator.activeVRDisplays.secure_context_required @@ -91,3 +74,8 @@ compat_features: - api.VRStageParameters.sittingToStandingTransform - api.VRStageParameters.sizeX - api.VRStageParameters.sizeY + - api.Window.vrdisplayactivate_event + - api.Window.vrdisplayconnect_event + - api.Window.vrdisplaydeactivate_event + - api.Window.vrdisplaydisconnect_event + - api.Window.vrdisplaypresentchange_event