瀏覽代碼

WebVR: Simplified immersive/exclusive support code.

Mr.doob 7 年之前
父節點
當前提交
5052098b82
共有 1 個文件被更改,包括 2 次插入11 次删除
  1. 2 11
      examples/js/vr/WebVR.js

+ 2 - 11
examples/js/vr/WebVR.js

@@ -78,10 +78,7 @@ var WEBVR = {
 
 				if ( currentSession === null ) {
 
-					// TODO Remove exclusive
-
-					device.requestSession( { exclusive: true } ).then( onSessionStarted );
-					device.requestSession( { immersive: true } ).then( onSessionStarted );
+					device.requestSession( { immersive: true, exclusive: true /* DEPRECATED */ } ).then( onSessionStarted );
 
 				} else {
 
@@ -140,13 +137,7 @@ var WEBVR = {
 
 			navigator.xr.requestDevice().then( function ( device ) {
 
-				// TODO Remove exclusive
-
-				device.supportsSession( { exclusive: true } )
-					.then( function () { showEnterXR( device ); } )
-					.catch( showVRNotFound );
-
-				device.supportsSession( { immersive: true } )
+				device.supportsSession( { immersive: true, exclusive: true /* DEPRECATED */ } )
 					.then( function () { showEnterXR( device ); } )
 					.catch( showVRNotFound );