ARES - authorized red-team engagement automation with dashboard, campaign scope, module orchestration, OPSEC controls, encrypted vault, and reporting.
Python active-directorycloud-securitydefensive-validationfastapigood-first-issuemitre-attackopsecreactred-teamreportingsecurity
feat(ui): add autonomous ambient wave to dragon scale mesh and tune visibility
Mafifrizi22fb93a13dc6
diff --git a/docs/assets/screenshots/login-enclave.png b/docs/assets/screenshots/login-enclave.pngindex 97fd62a..8943605 100644Binary files a/docs/assets/screenshots/login-enclave.png and b/docs/assets/screenshots/login-enclave.png differdiff --git a/frontend/src/features/auth/LoginPage.tsx b/frontend/src/features/auth/LoginPage.tsxindex e46aa1b..579b297 100644--- a/frontend/src/features/auth/LoginPage.tsx+++ b/frontend/src/features/auth/LoginPage.tsx@@ -39,10 +39,10 @@ export function LoginPage() {{/* Left Column */}<div className="hidden lg:flex lg:col-span-7 flex-col justify-between p-12 xl:p-16 border-r border-[#1a1a1f] bg-[#0b0b0e] relative overflow-hidden">{/* The mesh IS the animation — purposeful: visualises the live attack graph */}- <SecurityMeshCanvas className="opacity-70" />+ <SecurityMeshCanvas />- {/* Single ambient glow — draws eye toward centre of mesh */}- <div className="pointer-events-none absolute left-1/3 top-1/2 -translate-x-1/2 -translate-y-1/2 h-[32rem] w-[32rem] rounded-full bg-red-900/[0.06] blur-[80px] animate-ares-breathe" />+ {/* Ambient atmospheric glow — soft ember warmth behind dragon scales */}+ <div className="pointer-events-none absolute left-1/3 top-1/2 -translate-x-1/2 -translate-y-1/2 h-[36rem] w-[36rem] rounded-full bg-red-950/[0.22] blur-[110px] animate-ares-breathe" />{/* Brand header */}<div className="relative z-10 flex items-center gap-3 animate-login-enter" style={{ animationDelay: "0ms" }}>diff --git a/frontend/src/features/auth/SecurityMeshCanvas.tsx b/frontend/src/features/auth/SecurityMeshCanvas.tsxindex 90377f9..c676123 100644--- a/frontend/src/features/auth/SecurityMeshCanvas.tsx+++ b/frontend/src/features/auth/SecurityMeshCanvas.tsx@@ -38,12 +38,7 @@ export function SecurityMeshCanvas({ className = "" }: SecurityMeshCanvasProps)const mouse = { x: -9999, y: -9999 };// ── Hex geometry (flat-top orientation) ──────────────────────────────────- // R = circumradius (center → corner)- // HH = hex height flat-to-flat = √3 × R- // COL = horizontal distance between centers = R × 1.5 (columns overlap by R/2)- // ROW = vertical distance between centers in same column = HH- // Odd columns are offset down by HH/2- const R = 24;+ const R = 25;const HH = Math.sqrt(3) * R;const COL = R * 1.5;const ROW = HH;@@ -97,14 +92,14 @@ export function SecurityMeshCanvas({ className = "" }: SecurityMeshCanvasProps)parent?.addEventListener("mouseleave", onMouseLeave);// ── Render constants ──────────────────────────────────────────────────────- const MOUSE_R = 140; // radius of mouse-proximity glow- const DRAW_R = R - 1; // slightly smaller so gaps show between scales+ const MOUSE_R = 160; // radius of mouse-proximity glow+ const DRAW_R = R - 1.2; // clean spacing between scaleslet t = 0;const render = () => {if (document.hidden) { animId = requestAnimationFrame(render); return; }- t += 0.006; // breathing speed — slow, subliminal+ t += 0.009; // calm, authoritative breathing speedctx!.clearRect(0, 0, W, H);@@ -112,18 +107,24 @@ export function SecurityMeshCanvas({ className = "" }: SecurityMeshCanvasProps)// Skip hexes well outside the canvasif (cx < -R * 2 || cx > W + R * 2 || cy < -R * 2 || cy > H + R * 2) continue;- // ── Mouse proximity glow (dragon reacts to operator) ──────────────+ // ── Mouse proximity (reactive layer) ──────────────────────────────const dx = cx - mouse.x;const dy = cy - mouse.y;const distM = Math.hypot(dx, dy);- const mouse_t = distM < MOUSE_R ? 1 - distM / MOUSE_R : 0;+ const mouse_t = distM < MOUSE_R ? (1 - distM / MOUSE_R) ** 1.5 : 0;- // ── Breathing wave (diagonal drift = direction of dragon's attention) ─- // Wave travels diagonally top-left → bottom-right- const wave_t = Math.sin(t + cx * 0.012 + cy * 0.009) * 0.5 + 0.5;+ // ── Autonomous harmonic waves (automatic breathing motion) ────────+ // Primary diagonal drift across dragon scales+ const wave1 = Math.sin(t + cx * 0.009 + cy * 0.007) * 0.5 + 0.5;+ // Secondary cross-drift for organic fluidity+ const wave2 = Math.cos(t * 0.7 - cx * 0.006 + cy * 0.008) * 0.5 + 0.5;+ const autoWave = wave1 * 0.7 + wave2 * 0.3;- // Combined intensity- const glow = Math.max(mouse_t * 0.9, wave_t * 0.13);+ // Ambient energy is always visible and softly pulses+ const ambientGlow = 0.16 + autoWave * 0.40;++ // Total scale excitation: ambient wave plus operator cursor focus+ const glow = Math.min(1.0, ambientGlow + mouse_t * 0.65);// ── Draw hex path ─────────────────────────────────────────────────ctx!.beginPath();@@ -134,15 +135,25 @@ export function SecurityMeshCanvas({ className = "" }: SecurityMeshCanvasProps)}ctx!.closePath();- // Fill — barely there at rest, deep crimson near cursor- ctx!.fillStyle = `rgba(180, 15, 15, ${glow * 0.11})`;+ // Fill — subtle warm ember glow on wave crests, concentrated under cursor+ const fillAlpha = glow * 0.13;+ ctx!.fillStyle = `rgba(185, 28, 28, ${fillAlpha})`;ctx!.fill();- // Border — the scale edge, always visible but dim at rest- const border = 0.14 + glow * 0.5;- ctx!.strokeStyle = `rgba(220, 38, 38, ${border})`;- ctx!.lineWidth = 0.75;+ // Border — distinct, crisp crimson lattice lines+ const borderAlpha = 0.20 + glow * 0.38;+ ctx!.strokeStyle = `rgba(239, 68, 68, ${borderAlpha})`;+ ctx!.lineWidth = 0.85;ctx!.stroke();++ // Subtle node dot on energetic scale centers (looks like a live cyber lattice)+ if (glow > 0.48) {+ const dotAlpha = (glow - 0.48) * 0.7;+ ctx!.beginPath();+ ctx!.arc(cx, cy, 1.2, 0, Math.PI * 2);+ ctx!.fillStyle = `rgba(252, 165, 165, ${dotAlpha})`;+ ctx!.fill();+ }}animId = requestAnimationFrame(render);