This can happen if the page is inside an iframe that doesn't have an `allowvr` attribute set or if permission is otherwise denied.
@@ -37,7 +37,11 @@ THREE.VRControls = function ( object, onError ) {
if ( navigator.getVRDisplays ) {
- navigator.getVRDisplays().then( gotVRDisplays );
+ navigator.getVRDisplays().then( gotVRDisplays ).catch ( function () {
+
+ console.warn( 'THREE.VRControls: Unable to get VR Displays' );
+ } );
}
@@ -42,7 +42,11 @@ THREE.VREffect = function ( renderer, onError ) {
+ console.warn( 'THREE.VREffect: Unable to get VR Displays' );