"use client"; interface BlendshapeBarProps { name: string; value: number; color?: string; } function BlendshapeBar({ name, value, color = "#63b3ed" }: BlendshapeBarProps) { return (
{name} {Math.round(value * 100)}%
); } interface StatsPanel { fps: number; faceDetected: boolean; blendshapes: Record; } const KEY_BLENDSHAPES: Array<{ key: string; label: string; color: string }> = [ { key: "mouthSmileLeft", label: "Smile L", color: "#68d391" }, { key: "mouthSmileRight", label: "Smile R", color: "#68d391" }, { key: "browInnerUp", label: "Brow Up", color: "#f6ad55" }, { key: "jawOpen", label: "Jaw Open", color: "#63b3ed" }, { key: "browDownLeft", label: "Brow ↓L", color: "#fc8181" }, { key: "browDownRight", label: "Brow ↓R", color: "#fc8181" }, { key: "mouthFrownLeft", label: "Frown L", color: "#76e4f7" }, { key: "mouthFrownRight", label: "Frown R", color: "#76e4f7" }, ]; export default function StatsPanel({ fps, faceDetected, blendshapes }: StatsPanel) { return (

Analytics

{faceDetected ? "Active" : "Idle"}
{/* Stats Grid */}

Performance

{fps} fps

Detection

{faceDetected ? "1" : "0"} face
{/* Blendshapes */} {faceDetected && (
Signals
{KEY_BLENDSHAPES.map(({ key, label, color }) => ( ))}
)}
); }