How to find when xr session starts three.js webxr

I want to toggle style property of my carousel catalogue when the ar session starts so I write this :

const session = renderer.xr.getSession();

session.addEventListener( 'start', function () {
                            slider.style.display = "block";

                        });

But it does’nt work , how to know when xr session starts ?

71 thoughts on “How to find when xr session starts three.js webxr”

Leave a Comment