Explorar el Código

WebVR.js: Correctness.

Mr.doob hace 7 años
padre
commit
45e4c7dafb
Se han modificado 1 ficheros con 9 adiciones y 1 borrados
  1. 9 1
      examples/js/vr/WebVR.js

+ 9 - 1
examples/js/vr/WebVR.js

@@ -95,7 +95,15 @@ var WEBVR = {
 			navigator.getVRDisplays()
 				.then( function ( displays ) {
 
-					if ( displays.length > 0 ) showEnterVR( displays[ 0 ] );
+					if ( displays.length > 0 ) {
+
+						showEnterVR( displays[ 0 ] );
+
+					} else {
+
+						showVRNotFound();
+
+					}
 
 				} );