Update index.html
Browse files- index.html +43 -54
index.html
CHANGED
|
@@ -5,45 +5,45 @@
|
|
| 5 |
<title>Holodeck</title>
|
| 6 |
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
|
| 7 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
#bead {
|
| 9 |
position:fixed; bottom:35px; left:30px; width:38px; height:38px;
|
| 10 |
-
background:rgba(255,30,30,0.08);
|
|
|
|
|
|
|
| 11 |
box-shadow:0 0 18px #ff3366, 0 0 35px #ff3366, inset 0 0 12px rgba(255,255,255,0.3);
|
| 12 |
z-index:1000; cursor:pointer;
|
| 13 |
}
|
|
|
|
| 14 |
#panel {
|
| 15 |
position:fixed; bottom:88px; left:22px; width:205px;
|
| 16 |
-
background:rgba(
|
| 17 |
-
border:2px solid #ff3366;
|
|
|
|
| 18 |
border-radius:16px; padding:12px; display:none; flex-direction:column; gap:8px;
|
| 19 |
z-index:1002;
|
| 20 |
}
|
|
|
|
| 21 |
button {
|
| 22 |
-
background:rgba(255,50,50,0.
|
| 23 |
color:#ff99aa;
|
| 24 |
border:1px solid #ff3366;
|
| 25 |
box-shadow:0 0 12px #ff3366;
|
| 26 |
padding:11px 12px;
|
| 27 |
border-radius:10px;
|
| 28 |
font-size:15px;
|
| 29 |
-
margin: 4px 0;
|
| 30 |
-
}
|
| 31 |
-
#videoContainer {
|
| 32 |
-
position:fixed; bottom:170px; left:50%; transform:translateX(-50%);
|
| 33 |
-
width:380px; display:none; z-index:1000; background:rgba(0,0,0,0.85);
|
| 34 |
-
border-radius:12px; padding:8px;
|
| 35 |
-
}
|
| 36 |
-
#myVideo { width:100%; border-radius:8px; }
|
| 37 |
-
.close-btn {
|
| 38 |
-
position:absolute; top:12px; right:12px; color:white; font-size:24px;
|
| 39 |
-
background:rgba(255,60,60,0.9); width:28px; height:28px; border-radius:50%;
|
| 40 |
-
display:flex; align-items:center; justify-content:center; z-index:1001;
|
| 41 |
}
|
| 42 |
</style>
|
| 43 |
</head>
|
| 44 |
<body>
|
| 45 |
-
|
| 46 |
-
|
|
|
|
| 47 |
</a-scene>
|
| 48 |
|
| 49 |
<div id="bead" onclick="togglePanel()"></div>
|
|
@@ -54,22 +54,21 @@
|
|
| 54 |
<button onclick="playSky()">▶️ Play</button>
|
| 55 |
<button onclick="pauseSky()">⏸️ Pause</button>
|
| 56 |
<button onclick="toggleMute()">🔇 Mute / Unmute</button>
|
| 57 |
-
<button onclick="alert('AI Chat
|
| 58 |
-
<button onclick="alert('Knowledge base coming soon')">📖 Knowledge</button>
|
| 59 |
</div>
|
| 60 |
|
| 61 |
-
<div id="videoContainer">
|
| 62 |
-
<div class="close-btn" onclick="closeVideo()">×</div>
|
| 63 |
-
<video id="myVideo" controls loop></video>
|
| 64 |
</div>
|
| 65 |
|
| 66 |
<input type="file" id="skyInput" accept="image/*,video/*" style="display:none;">
|
| 67 |
<input type="file" id="screenInput" accept="video/*,image/*" style="display:none;">
|
| 68 |
|
| 69 |
<script>
|
|
|
|
| 70 |
const screenVideo = document.getElementById('myVideo');
|
| 71 |
const container = document.getElementById('videoContainer');
|
| 72 |
-
let skyVideo = null;
|
| 73 |
|
| 74 |
function togglePanel() {
|
| 75 |
const panel = document.getElementById('panel');
|
|
@@ -80,12 +79,10 @@
|
|
| 80 |
function pickScreenMedia() { document.getElementById('screenInput').click(); }
|
| 81 |
function playSky() { if (skyVideo) skyVideo.play(); }
|
| 82 |
function pauseSky() { if (skyVideo) skyVideo.pause(); }
|
| 83 |
-
|
| 84 |
function toggleMute() {
|
| 85 |
if (skyVideo) skyVideo.muted = !skyVideo.muted;
|
| 86 |
-
else screenVideo.muted = !screenVideo.muted;
|
| 87 |
}
|
| 88 |
-
|
| 89 |
function closeVideo() {
|
| 90 |
screenVideo.pause();
|
| 91 |
container.style.display = 'none';
|
|
@@ -99,39 +96,31 @@
|
|
| 99 |
const isVideo = file.type.startsWith('video/');
|
| 100 |
|
| 101 |
if (isVideo) {
|
| 102 |
-
if (skyVideo) skyVideo.pause();
|
| 103 |
skyVideo = document.createElement('video');
|
| 104 |
skyVideo.src = url;
|
| 105 |
skyVideo.loop = true;
|
| 106 |
skyVideo.muted = false;
|
| 107 |
skyVideo.volume = 0.6;
|
| 108 |
-
skyVideo.
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
skyVideo.play();
|
| 118 |
-
}
|
| 119 |
-
}
|
| 120 |
-
};
|
| 121 |
-
skyVideo.load();
|
| 122 |
} else {
|
| 123 |
-
const
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
}
|
| 134 |
-
});
|
| 135 |
}
|
| 136 |
});
|
| 137 |
|
|
|
|
| 5 |
<title>Holodeck</title>
|
| 6 |
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
|
| 7 |
<style>
|
| 8 |
+
body {
|
| 9 |
+
margin:0;
|
| 10 |
+
overflow:hidden;
|
| 11 |
+
background: transparent;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
#bead {
|
| 15 |
position:fixed; bottom:35px; left:30px; width:38px; height:38px;
|
| 16 |
+
background:rgba(255,30,30,0.08);
|
| 17 |
+
border:2px solid #ff3366;
|
| 18 |
+
border-radius:50%;
|
| 19 |
box-shadow:0 0 18px #ff3366, 0 0 35px #ff3366, inset 0 0 12px rgba(255,255,255,0.3);
|
| 20 |
z-index:1000; cursor:pointer;
|
| 21 |
}
|
| 22 |
+
|
| 23 |
#panel {
|
| 24 |
position:fixed; bottom:88px; left:22px; width:205px;
|
| 25 |
+
background:rgba(10,0,20,0.75);
|
| 26 |
+
border:2px solid #ff3366;
|
| 27 |
+
box-shadow:0 0 25px #ff3366, 0 0 45px #ff3366;
|
| 28 |
border-radius:16px; padding:12px; display:none; flex-direction:column; gap:8px;
|
| 29 |
z-index:1002;
|
| 30 |
}
|
| 31 |
+
|
| 32 |
button {
|
| 33 |
+
background:rgba(255,50,50,0.1);
|
| 34 |
color:#ff99aa;
|
| 35 |
border:1px solid #ff3366;
|
| 36 |
box-shadow:0 0 12px #ff3366;
|
| 37 |
padding:11px 12px;
|
| 38 |
border-radius:10px;
|
| 39 |
font-size:15px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
}
|
| 41 |
</style>
|
| 42 |
</head>
|
| 43 |
<body>
|
| 44 |
+
|
| 45 |
+
<!-- Just the 3D scene, no sky -->
|
| 46 |
+
<a-scene background="color: #000000" fog="type: linear; color: #000000">
|
| 47 |
</a-scene>
|
| 48 |
|
| 49 |
<div id="bead" onclick="togglePanel()"></div>
|
|
|
|
| 54 |
<button onclick="playSky()">▶️ Play</button>
|
| 55 |
<button onclick="pauseSky()">⏸️ Pause</button>
|
| 56 |
<button onclick="toggleMute()">🔇 Mute / Unmute</button>
|
| 57 |
+
<button onclick="alert('AI Chat - Coming soon')">💬 AI Chat</button>
|
|
|
|
| 58 |
</div>
|
| 59 |
|
| 60 |
+
<div id="videoContainer" style="position:fixed; bottom:170px; left:50%; transform:translateX(-50%); width:380px; display:none; z-index:1000; background:rgba(0,0,0,0.85); border-radius:12px; padding:8px;">
|
| 61 |
+
<div class="close-btn" onclick="closeVideo()" style="position:absolute; top:12px; right:12px; color:white; font-size:24px; background:rgba(255,60,60,0.9); width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center;">×</div>
|
| 62 |
+
<video id="myVideo" controls loop style="width:100%; border-radius:8px;"></video>
|
| 63 |
</div>
|
| 64 |
|
| 65 |
<input type="file" id="skyInput" accept="image/*,video/*" style="display:none;">
|
| 66 |
<input type="file" id="screenInput" accept="video/*,image/*" style="display:none;">
|
| 67 |
|
| 68 |
<script>
|
| 69 |
+
let skyVideo = null;
|
| 70 |
const screenVideo = document.getElementById('myVideo');
|
| 71 |
const container = document.getElementById('videoContainer');
|
|
|
|
| 72 |
|
| 73 |
function togglePanel() {
|
| 74 |
const panel = document.getElementById('panel');
|
|
|
|
| 79 |
function pickScreenMedia() { document.getElementById('screenInput').click(); }
|
| 80 |
function playSky() { if (skyVideo) skyVideo.play(); }
|
| 81 |
function pauseSky() { if (skyVideo) skyVideo.pause(); }
|
|
|
|
| 82 |
function toggleMute() {
|
| 83 |
if (skyVideo) skyVideo.muted = !skyVideo.muted;
|
| 84 |
+
else if (screenVideo) screenVideo.muted = !screenVideo.muted;
|
| 85 |
}
|
|
|
|
| 86 |
function closeVideo() {
|
| 87 |
screenVideo.pause();
|
| 88 |
container.style.display = 'none';
|
|
|
|
| 96 |
const isVideo = file.type.startsWith('video/');
|
| 97 |
|
| 98 |
if (isVideo) {
|
|
|
|
| 99 |
skyVideo = document.createElement('video');
|
| 100 |
skyVideo.src = url;
|
| 101 |
skyVideo.loop = true;
|
| 102 |
skyVideo.muted = false;
|
| 103 |
skyVideo.volume = 0.6;
|
| 104 |
+
skyVideo.style.position = 'fixed';
|
| 105 |
+
skyVideo.style.top = '0';
|
| 106 |
+
skyVideo.style.left = '0';
|
| 107 |
+
skyVideo.style.width = '100%';
|
| 108 |
+
skyVideo.style.height = '100%';
|
| 109 |
+
skyVideo.style.objectFit = 'cover';
|
| 110 |
+
skyVideo.style.zIndex = '-1';
|
| 111 |
+
document.body.appendChild(skyVideo);
|
| 112 |
+
skyVideo.play();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
} else {
|
| 114 |
+
const img = document.createElement('img');
|
| 115 |
+
img.src = url;
|
| 116 |
+
img.style.position = 'fixed';
|
| 117 |
+
img.style.top = '0';
|
| 118 |
+
img.style.left = '0';
|
| 119 |
+
img.style.width = '100%';
|
| 120 |
+
img.style.height = '100%';
|
| 121 |
+
img.style.objectFit = 'cover';
|
| 122 |
+
img.style.zIndex = '-1';
|
| 123 |
+
document.body.appendChild(img);
|
|
|
|
|
|
|
| 124 |
}
|
| 125 |
});
|
| 126 |
|