提交 2941033a 编写于 作者: M Mr.doob

WebVR: Support exclusive and immersive webxr sessions.

上级 2c6ca0f2
...@@ -78,7 +78,10 @@ var WEBVR = { ...@@ -78,7 +78,10 @@ var WEBVR = {
if ( currentSession === null ) { if ( currentSession === null ) {
// TODO Remove exclusive
device.requestSession( { exclusive: true } ).then( onSessionStarted ); device.requestSession( { exclusive: true } ).then( onSessionStarted );
device.requestSession( { immersive: true } ).then( onSessionStarted );
} else { } else {
...@@ -137,11 +140,15 @@ var WEBVR = { ...@@ -137,11 +140,15 @@ var WEBVR = {
navigator.xr.requestDevice().then( function ( device ) { navigator.xr.requestDevice().then( function ( device ) {
device.supportsSession( { exclusive: true } ).then( function () { // TODO Remove exclusive
showEnterXR( device ); device.supportsSession( { exclusive: true } )
.then( function () { showEnterXR( device ); } )
.catch( showVRNotFound );
} ).catch( showVRNotFound ); device.supportsSession( { immersive: true } )
.then( function () { showEnterXR( device ); } )
.catch( showVRNotFound );
} ).catch( showVRNotFound ); } ).catch( showVRNotFound );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册