VRStageParameters.sittingToStandingTransform

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The sittingToStandingTransform read-only property of the VRStageParameters interface contains a matrix that transforms the sitting-space view matrices of VRFrameData to standing-space.

Basically, this can be passed into your WebGL code to transform the rendered view from a sitting to standing view.

Syntax

var myTransform = vrStageParametersInstance.sittingToStandingTransform;

Value

A 16-element Float32Array containing the components of a 4×4 transform matrix.

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 'sittingToStandingTransform' in that specification.
Draft Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No Yes

555

636

No ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No561 2 3 4 ? ? ? ?6.0

1. Only works in an experimental version of Chrome. (Other builds won't return any devices when Navigator.getVRDisplays() is invoked.)

2. Daydream View supported in Chrome 56.

3. Google Cardboard supported in Chrome 57.

4. From version 56: this feature is behind the WebVR preference. To change preferences in Chrome, visit chrome://flags.

5. Windows support was enabled in Firefox 55.

6. macOS support was enabled in Firefox 63.

See also

Document Tags and Contributors

Contributors to this page: fscholz, chrisdavidmills
Last updated by: fscholz,