mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Remove WebVR
This commit is contained in:
parent
d8781c1054
commit
c611e46381
74 changed files with 97 additions and 3178 deletions
|
@ -122,17 +122,6 @@ interface mixin WindowEventHandlers {
|
|||
attribute EventHandler onunload;
|
||||
};
|
||||
|
||||
// https://w3c.github.io/webvr/spec/1.1/#interface-window
|
||||
partial interface mixin WindowEventHandlers {
|
||||
attribute EventHandler onvrdisplayconnect;
|
||||
attribute EventHandler onvrdisplaydisconnect;
|
||||
attribute EventHandler onvrdisplayactivate;
|
||||
attribute EventHandler onvrdisplaydeactivate;
|
||||
attribute EventHandler onvrdisplayblur;
|
||||
attribute EventHandler onvrdisplayfocus;
|
||||
attribute EventHandler onvrdisplaypresentchange;
|
||||
};
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#documentandelementeventhandlers
|
||||
[Exposed=Window]
|
||||
interface mixin DocumentAndElementEventHandlers {
|
||||
|
|
|
@ -14,13 +14,16 @@ interface Gamepad {
|
|||
[SameObject] readonly attribute GamepadButtonList buttons;
|
||||
};
|
||||
|
||||
// https://w3c.github.io/gamepad/extensions.html#dom-gamepad
|
||||
// https://w3c.github.io/gamepad/extensions.html#partial-gamepad-interface
|
||||
partial interface Gamepad {
|
||||
readonly attribute DOMString hand;
|
||||
readonly attribute VRPose? pose;
|
||||
readonly attribute GamepadHand hand;
|
||||
// readonly attribute FrozenArray<GamepadHapticActuator> hapticActuators;
|
||||
readonly attribute GamepadPose? pose;
|
||||
};
|
||||
|
||||
// https://w3c.github.io/webvr/spec/1.1/#interface-gamepad
|
||||
partial interface Gamepad {
|
||||
readonly attribute unsigned long displayId;
|
||||
// https://w3c.github.io/gamepad/extensions.html#gamepadhand-enum
|
||||
enum GamepadHand {
|
||||
"", /* unknown, both hands, or not applicable */
|
||||
"left",
|
||||
"right"
|
||||
};
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://w3c.github.io/webvr/#interface-vrpose
|
||||
[Exposed=Window, Pref="dom.webvr.enabled"]
|
||||
interface VRPose {
|
||||
// https://w3c.github.io/gamepad/extensions.html#gamepadpose-interface
|
||||
[Exposed=Window, Pref="dom.gamepad.enabled"]
|
||||
interface GamepadPose {
|
||||
readonly attribute boolean hasOrientation;
|
||||
readonly attribute boolean hasPosition;
|
||||
|
||||
readonly attribute Float32Array? position;
|
||||
readonly attribute Float32Array? linearVelocity;
|
||||
readonly attribute Float32Array? linearAcceleration;
|
|
@ -60,11 +60,6 @@ interface mixin NavigatorCookies {
|
|||
readonly attribute boolean cookieEnabled;
|
||||
};
|
||||
|
||||
// https://w3c.github.io/webvr/spec/1.1/#interface-navigator
|
||||
partial interface Navigator {
|
||||
[Pref="dom.webvr.enabled"] Promise<sequence<VRDisplay>> getVRDisplays();
|
||||
};
|
||||
|
||||
// https://w3c.github.io/permissions/#navigator-and-workernavigator-extension
|
||||
[Exposed=(Window)]
|
||||
partial interface Navigator {
|
||||
|
|
|
@ -1,131 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
enum VREye {
|
||||
"left",
|
||||
"right"
|
||||
};
|
||||
|
||||
|
||||
// https://w3c.github.io/webvr/#interface-vrdisplay
|
||||
[Exposed=Window, Pref="dom.webvr.enabled"]
|
||||
interface VRDisplay : EventTarget {
|
||||
readonly attribute boolean isConnected;
|
||||
readonly attribute boolean isPresenting;
|
||||
|
||||
/**
|
||||
* Dictionary of capabilities describing the VRDisplay.
|
||||
*/
|
||||
[SameObject] readonly attribute VRDisplayCapabilities capabilities;
|
||||
|
||||
/**
|
||||
* If this VRDisplay supports room-scale experiences, the optional
|
||||
* stage attribute contains details on the room-scale parameters.
|
||||
* The stageParameters attribute can not change between null
|
||||
* and non-null once the VRDisplay is enumerated; however,
|
||||
* the values within VRStageParameters may change after
|
||||
* any call to VRDisplay.submitFrame as the user may re-configure
|
||||
* their environment at any time.
|
||||
*/
|
||||
readonly attribute VRStageParameters? stageParameters;
|
||||
|
||||
/**
|
||||
* Return the current VREyeParameters for the given eye.
|
||||
*/
|
||||
VREyeParameters getEyeParameters(VREye whichEye);
|
||||
|
||||
/**
|
||||
* An identifier for this distinct VRDisplay. Used as an
|
||||
* association point in the Gamepad API.
|
||||
*/
|
||||
readonly attribute unsigned long displayId;
|
||||
|
||||
/**
|
||||
* A display name, a user-readable name identifying it.
|
||||
*/
|
||||
readonly attribute DOMString displayName;
|
||||
|
||||
/**
|
||||
* Populates the passed VRFrameData with the information required to render
|
||||
* the current frame.
|
||||
*/
|
||||
boolean getFrameData(VRFrameData frameData);
|
||||
|
||||
/**
|
||||
* Return a VRPose containing the future predicted pose of the VRDisplay
|
||||
* when the current frame will be presented. The value returned will not
|
||||
* change until JavaScript has returned control to the browser.
|
||||
*
|
||||
* The VRPose will contain the position, orientation, velocity,
|
||||
* and acceleration of each of these properties.
|
||||
*/
|
||||
[NewObject] VRPose getPose();
|
||||
|
||||
/**
|
||||
* Reset the pose for this display, treating its current position and
|
||||
* orientation as the "origin/zero" values. VRPose.position,
|
||||
* VRPose.orientation, and VRStageParameters.sittingToStandingTransform may be
|
||||
* updated when calling resetPose(). This should be called in only
|
||||
* sitting-space experiences.
|
||||
*/
|
||||
void resetPose();
|
||||
|
||||
/**
|
||||
* z-depth defining the near plane of the eye view frustum
|
||||
* enables mapping of values in the render target depth
|
||||
* attachment to scene coordinates. Initially set to 0.01.
|
||||
*/
|
||||
attribute double depthNear;
|
||||
|
||||
/**
|
||||
* z-depth defining the far plane of the eye view frustum
|
||||
* enables mapping of values in the render target depth
|
||||
* attachment to scene coordinates. Initially set to 10000.0.
|
||||
*/
|
||||
attribute double depthFar;
|
||||
|
||||
/**
|
||||
* The callback passed to `requestAnimationFrame` will be called
|
||||
* any time a new frame should be rendered. When the VRDisplay is
|
||||
* presenting the callback will be called at the native refresh
|
||||
* rate of the HMD. When not presenting this function acts
|
||||
* identically to how window.requestAnimationFrame acts. Content should
|
||||
* make no assumptions of frame rate or vsync behavior as the HMD runs
|
||||
* asynchronously from other displays and at differing refresh rates.
|
||||
*/
|
||||
unsigned long requestAnimationFrame(FrameRequestCallback callback);
|
||||
|
||||
/**
|
||||
* Passing the value returned by `requestAnimationFrame` to
|
||||
* `cancelAnimationFrame` will unregister the callback.
|
||||
*/
|
||||
void cancelAnimationFrame(unsigned long handle);
|
||||
|
||||
/**
|
||||
* Begin presenting to the VRDisplay. Must be called in response to a user gesture.
|
||||
* Repeat calls while already presenting will update the VRLayers being displayed.
|
||||
* If the number of values in the leftBounds/rightBounds arrays is not 0 or 4 for
|
||||
* any of the passed layers the promise is rejected.
|
||||
* If the source of any of the layers is not present (null), the promise is rejected.
|
||||
*/
|
||||
Promise<void> requestPresent(sequence<VRLayer> layers);
|
||||
|
||||
/**
|
||||
* Stops presenting to the VRDisplay.
|
||||
*/
|
||||
Promise<void> exitPresent();
|
||||
|
||||
/**
|
||||
* Get the layers currently being presented.
|
||||
*/
|
||||
sequence<VRLayer> getLayers();
|
||||
|
||||
/**
|
||||
* The VRLayer provided to the VRDisplay will be captured and presented
|
||||
* in the HMD. Calling this function has the same effect on the source
|
||||
* canvas as any other operation that uses its source image, and canvases
|
||||
* created without preserveDrawingBuffer set to true will be cleared.
|
||||
*/
|
||||
void submitFrame();
|
||||
};
|
|
@ -1,13 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://w3c.github.io/webvr/#interface-vrdisplaycapabilities
|
||||
[Exposed=Window, Pref="dom.webvr.enabled"]
|
||||
interface VRDisplayCapabilities {
|
||||
readonly attribute boolean hasPosition;
|
||||
readonly attribute boolean hasOrientation;
|
||||
readonly attribute boolean hasExternalDisplay;
|
||||
readonly attribute boolean canPresent;
|
||||
readonly attribute unsigned long maxLayers;
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://w3c.github.io/webvr/#interface-vrdisplayevent
|
||||
|
||||
enum VRDisplayEventReason {
|
||||
"navigation",
|
||||
"mounted",
|
||||
"unmounted",
|
||||
"requested"
|
||||
};
|
||||
|
||||
[Exposed=Window, Pref="dom.webvr.enabled"]
|
||||
interface VRDisplayEvent : Event {
|
||||
[Throws] constructor(DOMString type, VRDisplayEventInit eventInitDict);
|
||||
readonly attribute VRDisplay display;
|
||||
readonly attribute VRDisplayEventReason? reason;
|
||||
};
|
||||
|
||||
dictionary VRDisplayEventInit : EventInit {
|
||||
required VRDisplay display;
|
||||
VRDisplayEventReason reason;
|
||||
};
|
|
@ -1,13 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://w3c.github.io/webvr/#interface-vreyeparameters
|
||||
|
||||
[Exposed=Window, Pref="dom.webvr.enabled"]
|
||||
interface VREyeParameters {
|
||||
readonly attribute Float32Array offset;
|
||||
[SameObject] readonly attribute VRFieldOfView fieldOfView;
|
||||
readonly attribute unsigned long renderWidth;
|
||||
readonly attribute unsigned long renderHeight;
|
||||
};
|
|
@ -1,13 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://w3c.github.io/webvr/#interface-vrfieldofview
|
||||
|
||||
[Exposed=Window, Pref="dom.webvr.enabled"]
|
||||
interface VRFieldOfView {
|
||||
readonly attribute double upDegrees;
|
||||
readonly attribute double rightDegrees;
|
||||
readonly attribute double downDegrees;
|
||||
readonly attribute double leftDegrees;
|
||||
};
|
|
@ -1,16 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://w3c.github.io/webvr/#interface-vrframedata
|
||||
|
||||
[Exposed=Window, Pref="dom.webvr.enabled"]
|
||||
interface VRFrameData {
|
||||
[Throws] constructor();
|
||||
readonly attribute DOMHighResTimeStamp timestamp;
|
||||
readonly attribute Float32Array leftProjectionMatrix;
|
||||
readonly attribute Float32Array leftViewMatrix;
|
||||
readonly attribute Float32Array rightProjectionMatrix;
|
||||
readonly attribute Float32Array rightViewMatrix;
|
||||
readonly attribute VRPose pose;
|
||||
};
|
|
@ -1,13 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://w3c.github.io/webvr/#interface-vrlayer
|
||||
|
||||
//typedef (HTMLCanvasElement or OffscreenCanvas) VRSource;
|
||||
|
||||
dictionary VRLayer {
|
||||
HTMLCanvasElement source;
|
||||
sequence<float> leftBounds;
|
||||
sequence<float> rightBounds;
|
||||
};
|
|
@ -1,11 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://w3c.github.io/webvr/#interface-vrstageparameters
|
||||
[Exposed=Window, Pref="dom.webvr.enabled"]
|
||||
interface VRStageParameters {
|
||||
readonly attribute Float32Array sittingToStandingTransform;
|
||||
readonly attribute float sizeX;
|
||||
readonly attribute float sizeZ;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue