mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Added first-cut implementation of XR layers
This commit is contained in:
parent
7ae11588dc
commit
fda8da0e9d
19 changed files with 585 additions and 15 deletions
63
components/script/dom/webidls/XRLayer.webidl
Normal file
63
components/script/dom/webidls/XRLayer.webidl
Normal file
|
@ -0,0 +1,63 @@
|
|||
/* 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://immersive-web.github.io/layers/#xrlayertype
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XRLayer {
|
||||
readonly attribute unsigned long pixelWidth;
|
||||
readonly attribute unsigned long pixelHeight;
|
||||
|
||||
// attribute boolean blendTextureSourceAlpha;
|
||||
// attribute boolean chromaticAberrationCorrection;
|
||||
|
||||
void destroy();
|
||||
};
|
||||
//
|
||||
// TODO: Implement the layer types
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.enabled"]
|
||||
// interface XRProjectionLayer : XRLayer {
|
||||
// readonly attribute boolean ignoreDepthValues;
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XRQuadLayer : XRLayer {
|
||||
// readonly attribute XRLayerLayout layout;
|
||||
// attribute XRRigidTransform transform;
|
||||
//
|
||||
// attribute float width;
|
||||
// attribute float height;
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XRCylinderLayer : XRLayer {
|
||||
// readonly attribute XRLayerLayout layout;
|
||||
// attribute XRReferenceSpace referenceSpace;
|
||||
//
|
||||
// attribute XRRigidTransform transform;
|
||||
// attribute float radius;
|
||||
// attribute float centralAngle;
|
||||
// attribute float aspectRatio;
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XREquirectLayer : XRLayer {
|
||||
// readonly attribute XRLayerLayout layout;
|
||||
// attribute XRReferenceSpace referenceSpace;
|
||||
//
|
||||
// attribute XRRigidTransform transform;
|
||||
// attribute float radius;
|
||||
// attribute float scaleX;
|
||||
// attribute float scaleY;
|
||||
// attribute float biasX;
|
||||
// attribute float biasY;
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XRCubeLayer : XRLayer {
|
||||
// readonly attribute XRLayerLayout layout;
|
||||
// attribute XRReferenceSpace referenceSpace;
|
||||
//
|
||||
// attribute DOMPoint orientation;
|
||||
// };
|
Loading…
Add table
Add a link
Reference in a new issue