Skip to content

Commit 51fd1c6

Browse files
authored
Merge pull request #18375 from Mugen87/dev29
WebXRManager: Improve timing when .isPresenting is changed.
2 parents 03ae50a + b4e92fa commit 51fd1c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/renderers/webxr/WebXRManager.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ function WebXRManager( renderer, gl ) {
9595
renderer.setRenderTarget( renderer.getRenderTarget() ); // Hack #15830
9696
animation.stop();
9797

98-
scope.dispatchEvent( { type: 'sessionend' } );
99-
10098
scope.isPresenting = false;
10199

100+
scope.dispatchEvent( { type: 'sessionend' } );
101+
102102
}
103103

104104
function onRequestReferenceSpace( value ) {
@@ -108,10 +108,10 @@ function WebXRManager( renderer, gl ) {
108108
animation.setContext( session );
109109
animation.start();
110110

111-
scope.dispatchEvent( { type: 'sessionstart' } );
112-
113111
scope.isPresenting = true;
114112

113+
scope.dispatchEvent( { type: 'sessionstart' } );
114+
115115
}
116116

117117
this.setFramebufferScaleFactor = function ( /* value */ ) {

0 commit comments

Comments
 (0)