Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function customEnterVR () {
- var scene = document.querySelector('a-scene');
- if (scene) {
- if (scene.hasLoaded) {
- scene.enterVR();
- } else {
- scene.addEventListener('loaded', scene.enterVR);
- }
- }
- }
- button.addEventListener('click', customEnterVR);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement