Spaces:
Running
Running
get rid of the vr simulator and replace it with something cool
Browse files- index.html +53 -60
index.html
CHANGED
|
@@ -194,15 +194,32 @@
|
|
| 194 |
</div>
|
| 195 |
</div>
|
| 196 |
<div class="bg-black bg-opacity-70 p-8 rounded-xl border border-gray-800">
|
| 197 |
-
<h3 class="text-2xl font-bold mb-4 text-red-500">
|
| 198 |
-
<div class="relative w-full h-64 mb-4 rounded-lg overflow-hidden border-2 border-yellow-500">
|
| 199 |
-
<div id="
|
| 200 |
-
<div
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 201 |
</div>
|
| 202 |
</div>
|
| 203 |
-
<p class="text-gray-300 mb-4">
|
| 204 |
-
|
| 205 |
-
</p>
|
| 206 |
</div>
|
| 207 |
</div>
|
| 208 |
</div>
|
|
@@ -453,65 +470,41 @@
|
|
| 453 |
</footer>
|
| 454 |
|
| 455 |
<script>
|
| 456 |
-
//
|
| 457 |
document.addEventListener('DOMContentLoaded', function() {
|
| 458 |
-
const
|
| 459 |
-
const
|
| 460 |
-
const panoramaImage = new Image();
|
| 461 |
|
| 462 |
-
|
| 463 |
-
|
| 464 |
-
|
| 465 |
-
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
scene.style.backgroundImage = `url(${panoramaImage.src})`;
|
| 469 |
-
scene.style.backgroundSize = `${imgWidth}px ${imgHeight}px`;
|
| 470 |
-
|
| 471 |
-
let isDragging = false;
|
| 472 |
-
let startX, startY;
|
| 473 |
-
let currentX = 0;
|
| 474 |
-
let targetX = 0;
|
| 475 |
-
|
| 476 |
-
container.addEventListener('mousedown', (e) => {
|
| 477 |
-
isDragging = true;
|
| 478 |
-
startX = e.clientX;
|
| 479 |
-
startY = e.clientY;
|
| 480 |
-
container.style.cursor = 'grabbing';
|
| 481 |
-
e.preventDefault();
|
| 482 |
-
});
|
| 483 |
-
|
| 484 |
-
document.addEventListener('mousemove', (e) => {
|
| 485 |
-
if (!isDragging) return;
|
| 486 |
|
| 487 |
-
const
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
currentX = targetX;
|
| 497 |
});
|
| 498 |
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
|
| 505 |
-
|
| 506 |
-
|
| 507 |
-
|
| 508 |
-
|
| 509 |
-
// Apply the pan
|
| 510 |
-
scene.style.backgroundPosition = `${normalizedX}px 0`;
|
| 511 |
-
}
|
| 512 |
-
};
|
| 513 |
});
|
| 514 |
-
|
| 515 |
VANTA.GLOBE({
|
| 516 |
el: "#vanta-bg",
|
| 517 |
mouseControls: true,
|
|
|
|
| 194 |
</div>
|
| 195 |
</div>
|
| 196 |
<div class="bg-black bg-opacity-70 p-8 rounded-xl border border-gray-800">
|
| 197 |
+
<h3 class="text-2xl font-bold mb-4 text-red-500">Real-Time Performance Dashboard</h3>
|
| 198 |
+
<div class="relative w-full h-64 mb-4 rounded-lg overflow-hidden border-2 border-yellow-500 bg-black">
|
| 199 |
+
<div id="performance-dashboard" class="w-full h-full flex flex-col justify-center items-center">
|
| 200 |
+
<div class="flex justify-around w-full mb-8">
|
| 201 |
+
<div class="text-center">
|
| 202 |
+
<div class="text-4xl font-bold text-yellow-500" id="confidence-level">87%</div>
|
| 203 |
+
<div class="text-gray-300">Confidence</div>
|
| 204 |
+
</div>
|
| 205 |
+
<div class="text-center">
|
| 206 |
+
<div class="text-4xl font-bold text-red-500" id="stress-level">42%</div>
|
| 207 |
+
<div class="text-gray-300">Stress</div>
|
| 208 |
+
</div>
|
| 209 |
+
<div class="text-center">
|
| 210 |
+
<div class="text-4xl font-bold text-green-500" id="focus-level">93%</div>
|
| 211 |
+
<div class="text-gray-300">Focus</div>
|
| 212 |
+
</div>
|
| 213 |
+
</div>
|
| 214 |
+
<div class="w-4/5 h-4 bg-gray-800 rounded-full mb-2">
|
| 215 |
+
<div id="performance-bar" class="h-full bg-gradient-to-r from-red-500 via-yellow-500 to-green-500 rounded-full" style="width: 72%"></div>
|
| 216 |
+
</div>
|
| 217 |
+
<p class="text-gray-300">Your current performance score</p>
|
| 218 |
</div>
|
| 219 |
</div>
|
| 220 |
+
<p class="text-gray-300 mb-4">
|
| 221 |
+
This interactive dashboard simulates real biometric data from our training sessions.
|
| 222 |
+
</p>
|
| 223 |
</div>
|
| 224 |
</div>
|
| 225 |
</div>
|
|
|
|
| 470 |
</footer>
|
| 471 |
|
| 472 |
<script>
|
| 473 |
+
// Performance Dashboard Animation
|
| 474 |
document.addEventListener('DOMContentLoaded', function() {
|
| 475 |
+
const metrics = ['confidence-level', 'stress-level', 'focus-level'];
|
| 476 |
+
const performanceBar = document.getElementById('performance-bar');
|
|
|
|
| 477 |
|
| 478 |
+
function animateMetrics() {
|
| 479 |
+
metrics.forEach(metric => {
|
| 480 |
+
const element = document.getElementById(metric);
|
| 481 |
+
const target = Math.floor(Math.random() * 30) + 70;
|
| 482 |
+
let current = parseInt(element.textContent);
|
| 483 |
+
const increment = target > current ? 1 : -1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 484 |
|
| 485 |
+
const interval = setInterval(() => {
|
| 486 |
+
current += increment;
|
| 487 |
+
element.textContent = current + '%';
|
| 488 |
+
|
| 489 |
+
if (current === target) {
|
| 490 |
+
clearInterval(interval);
|
| 491 |
+
setTimeout(animateMetrics, 2000);
|
| 492 |
+
}
|
| 493 |
+
}, 30);
|
|
|
|
| 494 |
});
|
| 495 |
|
| 496 |
+
// Animate performance bar
|
| 497 |
+
const newWidth = Math.floor(Math.random() * 30) + 60;
|
| 498 |
+
performanceBar.style.width = `${newWidth}%`;
|
| 499 |
+
performanceBar.style.background = `linear-gradient(to right,
|
| 500 |
+
${newWidth < 30 ? '#ef4444' : newWidth < 70 ? '#f59e0b' : '#10b981'},
|
| 501 |
+
${newWidth < 30 ? '#f59e0b' : newWidth < 70 ? '#10b981' : '#3b82f6'})`;
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
+
// Start the animation
|
| 505 |
+
animateMetrics();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 506 |
});
|
| 507 |
+
// Initialize Vanta.js background
|
| 508 |
VANTA.GLOBE({
|
| 509 |
el: "#vanta-bg",
|
| 510 |
mouseControls: true,
|