{{APIRef("WebVR API")}}{{SeeCompatTable}}
The VRFieldOfViewReadOnly
interface of the WebVR API contains the raw definition for the degree value properties required to define a field of view. Inherited by {{domxref("VRFieldOfView")}}.
Properties
- {{domxref("VRFieldOfViewReadOnly.upDegrees")}} {{readonlyInline}}
- The number of degrees upward that the field of view extends.
- {{domxref("VRFieldOfViewReadOnly.rightDegrees")}} {{readonlyInline}}
- The number of degrees to the right that the field of view extends.
- {{domxref("VRFieldOfViewReadOnly.downDegrees")}} {{readonlyInline}}
- The number of degrees downwards that the field of view extends.
- {{domxref("VRFieldOfViewReadOnly.leftDegrees")}} {{readonlyInline}}
- The number of degrees to the left that the field of view extends.
Examples
You wouldn't ever use this object directly; for some useful examples see the {{domxref("VRFieldOfView")}} page.
To access the properties directly, you could do something like this:
var lEye = myHMDVRDevice.getEyeParameters('left'); lEye.recommendedFieldOfView.upDegrees // returns something like 53.09438550469889 lEye.recommendedFieldOfView.rightDegrees // returns something like 47.52769258067174 lEye.recommendedFieldOfView.downDegrees // returns something like 53.09438550469889 lEye.recommendedFieldOfView.leftDegrees // returns something like 46.63209579904155
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('WebVR','#vrfieldofviewreadonly','VRFieldOfViewReadOnly')}} | {{Spec2('WebVR')}} | Initial definition |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}}[1] | {{CompatGeckoDesktop(46)}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} |
Feature | Android | Firefox Mobile (Gecko) | Firefox OS (Gecko) | IE Phone | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatGeckoMobile(39)}} {{CompatGeckoMobile(46)}} |
{{CompatNo}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} |
- [1] The support in Chrome is currently experimental. To find information on Chrome's WebVR implementation status including supporting builds, check out Bringing VR to Chrome by Brandon Jones.
See also
- WebVR API homepage.
- MozVr.com — demos, downloads, and other resources from the Mozilla VR team.