Fazbeeer commited on
Commit
582b0e3
·
verified ·
1 Parent(s): 3bba78d

get rid of the vr simulator and replace it with something cool

Browse files
Files changed (1) hide show
  1. 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">Try VR Interview Simulator</h3>
198
- <div class="relative w-full h-64 mb-4 rounded-lg overflow-hidden border-2 border-yellow-500">
199
- <div id="vr-container" class="w-full h-full bg-black cursor-grab active:cursor-grabbing">
200
- <div id="vr-scene" class="w-full h-full relative overflow-hidden"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  </div>
202
  </div>
203
- <p class="text-gray-300 mb-4">
204
- Click and drag to look around the virtual interview room. Use your mouse like Google Maps to explore the 360° environment.
205
- </p>
206
  </div>
207
  </div>
208
  </div>
@@ -453,65 +470,41 @@
453
  </footer>
454
 
455
  <script>
456
- // VR Panorama Viewer
457
  document.addEventListener('DOMContentLoaded', function() {
458
- const container = document.getElementById('vr-container');
459
- const scene = document.getElementById('vr-scene');
460
- const panoramaImage = new Image();
461
 
462
- panoramaImage.src = 'https://static.photos/office/2048x1024/42';
463
- panoramaImage.onload = function() {
464
- const imgWidth = panoramaImage.width;
465
- const imgHeight = panoramaImage.height;
466
- const aspectRatio = imgWidth / imgHeight;
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 deltaX = e.clientX - startX;
488
- targetX = currentX + deltaX;
489
-
490
- updatePanorama();
491
- });
492
-
493
- document.addEventListener('mouseup', () => {
494
- isDragging = false;
495
- container.style.cursor = 'grab';
496
- currentX = targetX;
497
  });
498
 
499
- document.addEventListener('mouseleave', () => {
500
- isDragging = false;
501
- container.style.cursor = 'grab';
502
- currentX = targetX;
503
- });
504
-
505
- function updatePanorama() {
506
- // Normalize the position to be within image width
507
- const normalizedX = targetX % imgWidth;
508
-
509
- // Apply the pan
510
- scene.style.backgroundPosition = `${normalizedX}px 0`;
511
- }
512
- };
513
  });
514
- // Initialize Vanta.js background
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,