Metaprime commited on
Commit
6c7fbb1
·
verified ·
1 Parent(s): f62a04c

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +11 -0
index.html CHANGED
@@ -64,6 +64,8 @@
64
  <video id="myVideo" controls loop></video>
65
  </div>
66
 
 
 
67
  <input type="file" id="skyInput" accept="image/*,video/*" style="display:none;">
68
  <input type="file" id="screenInput" accept="video/*,image/*" style="display:none;">
69
 
@@ -99,6 +101,15 @@
99
  container.style.display = 'none';
100
  }
101
 
 
 
 
 
 
 
 
 
 
102
  // Sky Launcher
103
  document.getElementById('skyInput').addEventListener('change', function(e) {
104
  const file = e.target.files[0];
 
64
  <video id="myVideo" controls loop></video>
65
  </div>
66
 
67
+ <button onclick="enterVR()" style="position:fixed; bottom:30px; right:30px; padding:10px 18px; background:rgba(255,255,255,0.1); color:white; border:2px solid white; border-radius:8px; font-size:15px; z-index:1000;">VR</button>
68
+
69
  <input type="file" id="skyInput" accept="image/*,video/*" style="display:none;">
70
  <input type="file" id="screenInput" accept="video/*,image/*" style="display:none;">
71
 
 
101
  container.style.display = 'none';
102
  }
103
 
104
+ function enterVR() {
105
+ const scene = document.querySelector('a-scene');
106
+ if (scene) {
107
+ scene.enterVR();
108
+ } else {
109
+ alert("VR mode not available on this device");
110
+ }
111
+ }
112
+
113
  // Sky Launcher
114
  document.getElementById('skyInput').addEventListener('change', function(e) {
115
  const file = e.target.files[0];