Exit AR event #3457
-
Hi everyone, does anyone know if there is an exit-ar event i can listen to? I have a model in AR and i can change its height (position.y) but upon exiting the AR session the viewer remembers the y position the model was in before exiting the session. I would like to reset the y position upon exiting the session. I know i can make a custom exit ar button and than listen for events on that, but i would like to go with the default one :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
this is the way to go, in case anyone else gets stuck here :) |
Beta Was this translation helpful? Give feedback.
modelViewer.shadowRoot.querySelector('#default-exit-webxr-ar-button').addEventListener("click", function());
this is the way to go, in case anyone else gets stuck here :)