Browse Source

WebVR.js: Correctness.

Mr.doob 7 năm trước cách đây
mục cha
commit
45e4c7dafb
1 tập tin đã thay đổi với 9 bổ sung1 xóa
  1. 9 1
      examples/js/vr/WebVR.js

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

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