This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The VRStageParameters interface of the WebVR API represents the values describing the the stage area for devices that support room-scale experiences.
This interface is accessible through the VRDisplay.stageParameters property.
Properties
VRStageParameters.sittingToStandingTransformRead only- Contains a matrix that transforms the sitting-space view matrices of
VRFrameDatato standing-space. VRStageParameters.sizeXRead only- Returns the width of the play-area bounds in meters.
VRStageParameters.sizeYRead only- Returns the depth of the play-area bounds in meters.
Examples
var info = document.querySelector('p');
var vrDisplay;
navigator.getVRDisplays().then(function(displays) {
vrDisplay = displays[0];
var stageParams = vrDisplay.stageParameters;
// stageParams is a VRStageParameters object
if(stageParams === null) {
info.textContent = 'Your VR Hardware does not support room-scale experiences.'
} else {
info.innerHTML = '<strong>Display stage parameters</strong>'
+ '<br>Sitting to standing transform: ' + stageParams.sittingToStandingTransform
+ '<br>Play area width (m): ' + stageParams.sizeX
+ '<br>Play area depth (m): ' + stageParams.sizeY
}
});
Specifications
| Specification | Status | Comment |
|---|---|---|
| WebVR 1.1 The definition of 'VRStageParameters' in that specification. |
Draft | Initial definition |
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
VRStageParameters | Chrome No support No | Edge No support ≤18 — 79 | Firefox
Full support
55
| IE No support No | Opera ? | Safari No support No | WebView Android No support No | Chrome Android
No support
56 — 80
| Firefox Android Full support 55 | Opera Android ? | Safari iOS ? | Samsung Internet Android
Full support
6.0
|
sittingToStandingTransform | Chrome No support No | Edge No support ≤18 — 79 | Firefox
Full support
55
| IE No support No | Opera ? | Safari No support No | WebView Android No support No | Chrome Android
No support
56 — 80
| Firefox Android Full support 55 | Opera Android ? | Safari iOS ? | Samsung Internet Android
Full support
6.0
|
sizeX | Chrome No support No | Edge No support ≤18 — 79 | Firefox
Full support
55
| IE No support No | Opera ? | Safari No support No | WebView Android No support No | Chrome Android
No support
56 — 80
| Firefox Android Full support 55 | Opera Android ? | Safari iOS ? | Samsung Internet Android
Full support
6.0
|
sizeY | Chrome No support No | Edge No support ≤18 — 79 | Firefox
Full support
55
| IE No support No | Opera ? | Safari No support No | WebView Android No support No | Chrome Android
No support
56 — 80
| Firefox Android Full support 55 | Opera Android ? | Safari iOS ? | Samsung Internet Android
Full support
6.0
|
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Experimental. Expect behavior to change in the future.
- Experimental. Expect behavior to change in the future.
- Deprecated. Not for use in new websites.
- Deprecated. Not for use in new websites.
- See implementation notes.
- See implementation notes.
- User must explicitly enable this feature.
- User must explicitly enable this feature.
See also
- WebVR API homepage
- MozVr.com — demos, downloads, and other resources from the Mozilla VR team.
