File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,10 @@ module.exports.Component = register('reflection', {
4242 }
4343
4444 this . el . addEventListener ( 'enter-vr' , function ( ) {
45+ if ( ! self . el . is ( 'ar-mode' ) ) { return ; }
4546 var renderer = self . el . renderer ;
4647 var session = renderer . xr . getSession ( ) ;
47- if (
48- session . requestLightProbe && self . el . is ( 'ar-mode' )
49- ) {
48+ if ( session . requestLightProbe ) {
5049 self . startLightProbe ( ) ;
5150 }
5251 } ) ;
@@ -61,9 +60,9 @@ module.exports.Component = register('reflection', {
6160 this . xrLightProbe = null ;
6261 if ( this . probeLight ) {
6362 this . probeLight . components . light . light . intensity = 0 ;
63+ this . needsVREnvironmentUpdate = true ;
64+ this . el . object3D . environment = this . cubeRenderTarget . texture ;
6465 }
65- this . needsVREnvironmentUpdate = true ;
66- this . el . object3D . environment = this . cubeRenderTarget . texture ;
6766 } ,
6867 startLightProbe : function ( ) {
6968 this . needsLightProbeUpdate = true ;
You can’t perform that action at this time.
0 commit comments