From 4f4976159e4dedb651e393cfebac2739bb20d4c0 Mon Sep 17 00:00:00 2001 From: Antonio Date: Tue, 14 Nov 2023 23:08:33 +0100 Subject: [PATCH] Start the light probe only when entering ar-mode --- src/components/scene/reflection.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/scene/reflection.js b/src/components/scene/reflection.js index 8485c629199..020c850f21e 100644 --- a/src/components/scene/reflection.js +++ b/src/components/scene/reflection.js @@ -42,11 +42,10 @@ module.exports.Component = register('reflection', { } this.el.addEventListener('enter-vr', function () { + if (!self.el.is('ar-mode')) { return; } var renderer = self.el.renderer; var session = renderer.xr.getSession(); - if ( - session.requestLightProbe && self.el.is('ar-mode') - ) { + if (session.requestLightProbe) { self.startLightProbe(); } });