WebVR
Discouraged
This feature is discouraged. Consider using WebXR instead. For the rationale, see:
The navigator.getVRDisplays()
API represents virtual reality (VR) devices, including sensors and head-mounted displays.
Learning resources on MDN
- Gamepad: displayId property
- Navigator: activeVRDisplays property
- WebVR API
- PositionSensorVRDevice
- PositionSensorVRDevice: getImmediateState() method
- PositionSensorVRDevice: getState() method
- PositionSensorVRDevice: resetSensor() method
- VRDisplay
- VRDisplay: cancelAnimationFrame() method
- VRDisplay: capabilities property
- VRDisplay: depthFar property
- VRDisplay: depthNear property
- VRDisplay: displayId property
- VRDisplay: displayName property
- VRDisplay: exitPresent() method
- VRDisplay: getEyeParameters() method
- VRDisplay: getFrameData() method
- VRDisplay: getImmediatePose() method
- VRDisplay: getLayers() method
- VRDisplay: getPose() method
- VRDisplay: isConnected property
- VRDisplay: isPresenting property
- VRDisplay: requestAnimationFrame() method
- VRDisplay: requestPresent() method
- VRDisplay: resetPose() method
- VRDisplay: stageParameters property
- VRDisplay: submitFrame() method
- VRDisplayCapabilities
- VRDisplayCapabilities: canPresent property
- VRDisplayCapabilities: hasExternalDisplay property
- VRDisplayCapabilities: hasOrientation property
- VRDisplayCapabilities: hasPosition property
- VRDisplayCapabilities: maxLayers property
- VRDisplayEvent
- VRDisplayEvent: VRDisplayEvent() constructor
- VRDisplayEvent: display property
- VRDisplayEvent: reason property
- VREyeParameters
- VREyeParameters: fieldOfView property
- VREyeParameters: maximumFieldOfView property
- VREyeParameters: minimumFieldOfView property
- VREyeParameters: offset property
- VREyeParameters: renderHeight property
- VREyeParameters: renderWidth property
- VRFieldOfView
- VRFieldOfView: downDegrees property
- VRFieldOfView: leftDegrees property
- VRFieldOfView: rightDegrees property
- VRFieldOfView: upDegrees property
- VRFrameData
- VRFrameData: VRFrameData() constructor
- VRFrameData: leftProjectionMatrix property
- VRFrameData: leftViewMatrix property
- VRFrameData: pose property
- VRFrameData: rightProjectionMatrix property
- VRFrameData: rightViewMatrix property
- VRFrameData: timestamp property
- VRPose
- VRPose: angularAcceleration property
- VRPose: angularVelocity property
- VRPose: linearAcceleration property
- VRPose: linearVelocity property
- VRPose: orientation property
- VRPose: position property
- VRStageParameters
- VRStageParameters: sittingToStandingTransform property
- VRStageParameters: sizeX property
- VRStageParameters: sizeY property
- Window: vrdisplayactivate event
- Window: vrdisplayconnect event
- Window: vrdisplaydeactivate event
- Window: vrdisplaydisconnect event
- Window: vrdisplaypresentchange event
Browser support (view on caniuse.com)
- Chrome ❌
- Chrome Android ❌
- Edge ❌
- Firefox ❌
- Firefox for Android ❌
- Safari ❌
- Safari on iOS ❌