rishik1111 commited on
Commit
ebc7c46
·
1 Parent(s): 11f2d76

feat(ui): update mic radar button design to match starburst spiderweb reference graphic

Browse files
Files changed (1) hide show
  1. demo/index.html +26 -30
demo/index.html CHANGED
@@ -555,25 +555,20 @@
555
  <!-- Terminal Container -->
556
  <div class="comic-panel p-5 flex flex-col items-center justify-center gap-4">
557
 
558
- <!-- Star Shaped Spider Web Mic Radar (Vibrant Spider-Web Theme) -->
559
- <div class="relative w-56 h-56 flex items-center justify-center filter drop-shadow-[6px_6px_0px_#000] my-2">
560
  <!-- Outer Black Star Border Shell -->
561
  <div class="absolute inset-0 bg-black clip-star-8 pointer-events-none"></div>
562
 
563
- <!-- Inner Star Container with Blue, Red & Black Web Gradient & Canvas -->
564
- <div class="absolute inset-[4px] clip-star-8 bg-gradient-to-br from-black via-cyan-950 to-pink-950 flex items-center justify-center overflow-hidden">
565
 
566
- <!-- Background Web Ring Accents (Cyan & Crimson Web Mesh) -->
567
- <div class="absolute inset-2 clip-star-8 border-2 border-cyan-400/50 pointer-events-none"></div>
568
- <div class="absolute inset-6 clip-star-8 border-2 border-pink-500/50 pointer-events-none"></div>
569
- <div class="absolute inset-10 clip-star-8 border-2 border-yellow-400/40 pointer-events-none"></div>
570
-
571
  <!-- Animated Interactive Spider Web Waveform Canvas -->
572
- <canvas id="waveformCanvas" class="absolute inset-0 w-full h-full opacity-95 pointer-events-none"></canvas>
573
 
574
- <!-- Star-Shaped Record Button (Crimson Red Star & White Mic) -->
575
- <button id="recordBtn" class="relative z-10 w-20 h-20 bg-beachpink hover:bg-pink-500 active:scale-95 border-3 border-black flex items-center justify-center shadow-brutal transition cursor-pointer clip-star-5 hover:rotate-12 transition-transform duration-300">
576
- <span id="micIcon" class="material-symbols-outlined text-3xl font-black text-white">mic</span>
577
  </button>
578
  </div>
579
  </div>
@@ -1305,7 +1300,11 @@
1305
  const numSpokes = 8;
1306
  const numRings = 5;
1307
 
1308
- // 1. Draw Spider Web Radial Spokes (High contrast Cyan & Crimson)
 
 
 
 
1309
  for (let i = 0; i < numSpokes; i++) {
1310
  const angle = (i * Math.PI * 2) / numSpokes - Math.PI / 2;
1311
  const x = cx + Math.cos(angle) * maxR;
@@ -1314,9 +1313,9 @@
1314
  ctx.moveTo(cx, cy);
1315
  ctx.lineTo(x, y);
1316
  ctx.strokeStyle = isRecording
1317
- ? "rgba(255, 0, 90, 0.85)"
1318
- : (i % 2 === 0 ? "rgba(0, 180, 255, 0.75)" : "rgba(255, 0, 90, 0.75)");
1319
- ctx.lineWidth = 2.0;
1320
  ctx.stroke();
1321
  }
1322
 
@@ -1327,8 +1326,8 @@
1327
 
1328
  ctx.beginPath();
1329
  ctx.strokeStyle = isRecording
1330
- ? `rgba(255, 0, 90, ${0.6 + r * 0.08})`
1331
- : (r % 2 === 0 ? `rgba(0, 180, 255, ${0.5 + r * 0.08})` : `rgba(255, 0, 90, ${0.5 + r * 0.08})`);
1332
  ctx.lineWidth = isRecording ? 2.5 : 2.0;
1333
 
1334
  const ringPoints = [];
@@ -1346,10 +1345,6 @@
1346
  const px = cx + Math.cos(angle) * currentR;
1347
  const py = cy + Math.sin(angle) * currentR;
1348
  ringPoints.push({ x: px, y: py, angle: angle });
1349
-
1350
- if (i === 0) {
1351
- ctx.moveTo(px, py);
1352
- }
1353
  }
1354
 
1355
  // Draw curved spider web strands dipping inwards towards center
@@ -1362,22 +1357,23 @@
1362
  const midX = cx + Math.cos(midAngle) * dipRadius;
1363
  const midY = cy + Math.sin(midAngle) * dipRadius;
1364
 
 
 
1365
  ctx.quadraticCurveTo(midX, midY, p2.x, p2.y);
 
1366
  }
1367
 
1368
- ctx.stroke();
1369
-
1370
- // 3. Draw Spider Web Intersecting Node Dots (Bright Cyan & Red)
1371
  for (let idx = 0; idx < ringPoints.length; idx++) {
1372
  const pt = ringPoints[idx];
1373
- ctx.fillStyle = isRecording ? "#FF0055" : (idx % 2 === 0 ? "#00F0FF" : "#FF0055");
1374
  ctx.beginPath();
1375
- ctx.arc(pt.x, pt.y, isRecording ? 4.0 : 3.2, 0, Math.PI * 2);
1376
  ctx.fill();
1377
 
1378
- // Outer node stroke outline
1379
  ctx.strokeStyle = "#000000";
1380
- ctx.lineWidth = 1;
1381
  ctx.stroke();
1382
  }
1383
  }
 
555
  <!-- Terminal Container -->
556
  <div class="comic-panel p-5 flex flex-col items-center justify-center gap-4">
557
 
558
+ <!-- Star Shaped Spider Web Mic Radar (Reference Image Design) -->
559
+ <div class="relative w-64 h-64 flex items-center justify-center filter drop-shadow-[8px_8px_0px_#000000] my-2">
560
  <!-- Outer Black Star Border Shell -->
561
  <div class="absolute inset-0 bg-black clip-star-8 pointer-events-none"></div>
562
 
563
+ <!-- Inner Star Container with Dark Teal Background (#0a1e28) & Canvas -->
564
+ <div class="absolute inset-[3.5px] clip-star-8 bg-[#0a1e28] flex items-center justify-center overflow-hidden">
565
 
 
 
 
 
 
566
  <!-- Animated Interactive Spider Web Waveform Canvas -->
567
+ <canvas id="waveformCanvas" class="absolute inset-0 w-full h-full pointer-events-none"></canvas>
568
 
569
+ <!-- Star-Shaped Record Button (Hot Pink / Magenta Star with White Mic Icon) -->
570
+ <button id="recordBtn" class="relative z-10 w-22 h-22 bg-[#ff007f] hover:bg-[#e60073] active:scale-95 border-2.5 border-black flex items-center justify-center filter drop-shadow-[3px_3px_0px_#000000] transition cursor-pointer clip-star-5 hover:rotate-12 transition-transform duration-300">
571
+ <span id="micIcon" class="material-symbols-outlined text-4xl font-black text-white selection:bg-transparent">mic</span>
572
  </button>
573
  </div>
574
  </div>
 
1300
  const numSpokes = 8;
1301
  const numRings = 5;
1302
 
1303
+ // Fill inner background of starburst container with solid dark teal (#0a1e28)
1304
+ ctx.fillStyle = "#0a1e28";
1305
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
1306
+
1307
+ // 1. Draw Spider Web Radial Spokes (Alternating Electric Cyan #00e5ff & Hot Pink #ff007f)
1308
  for (let i = 0; i < numSpokes; i++) {
1309
  const angle = (i * Math.PI * 2) / numSpokes - Math.PI / 2;
1310
  const x = cx + Math.cos(angle) * maxR;
 
1313
  ctx.moveTo(cx, cy);
1314
  ctx.lineTo(x, y);
1315
  ctx.strokeStyle = isRecording
1316
+ ? "#ff007f"
1317
+ : (i % 2 === 0 ? "#00e5ff" : "#ff007f");
1318
+ ctx.lineWidth = 2.2;
1319
  ctx.stroke();
1320
  }
1321
 
 
1326
 
1327
  ctx.beginPath();
1328
  ctx.strokeStyle = isRecording
1329
+ ? `rgba(255, 0, 127, ${0.7 + r * 0.06})`
1330
+ : (r % 2 === 0 ? `rgba(0, 229, 255, ${0.75 + r * 0.05})` : `rgba(255, 0, 127, ${0.75 + r * 0.05})`);
1331
  ctx.lineWidth = isRecording ? 2.5 : 2.0;
1332
 
1333
  const ringPoints = [];
 
1345
  const px = cx + Math.cos(angle) * currentR;
1346
  const py = cy + Math.sin(angle) * currentR;
1347
  ringPoints.push({ x: px, y: py, angle: angle });
 
 
 
 
1348
  }
1349
 
1350
  // Draw curved spider web strands dipping inwards towards center
 
1357
  const midX = cx + Math.cos(midAngle) * dipRadius;
1358
  const midY = cy + Math.sin(midAngle) * dipRadius;
1359
 
1360
+ ctx.beginPath();
1361
+ ctx.moveTo(p1.x, p1.y);
1362
  ctx.quadraticCurveTo(midX, midY, p2.x, p2.y);
1363
+ ctx.stroke();
1364
  }
1365
 
1366
+ // 3. Draw Spider Web Intersecting Node Dots (Bright Cyan & Hot Pink with Black Borders)
 
 
1367
  for (let idx = 0; idx < ringPoints.length; idx++) {
1368
  const pt = ringPoints[idx];
1369
+ ctx.fillStyle = isRecording ? "#ff007f" : (idx % 2 === 0 ? "#00e5ff" : "#ff007f");
1370
  ctx.beginPath();
1371
+ ctx.arc(pt.x, pt.y, isRecording ? 4.5 : 3.8, 0, Math.PI * 2);
1372
  ctx.fill();
1373
 
1374
+ // Black node stroke outline matching reference image
1375
  ctx.strokeStyle = "#000000";
1376
+ ctx.lineWidth = 1.4;
1377
  ctx.stroke();
1378
  }
1379
  }