Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

534 B
Raw Blame
export const MIC_BAR_MIN_SCALE = 0.14;

export interface MicBar {
  id: string;
  weight: number;
}

export const MIC_BARS: MicBar[] = [
  { id: 'far-left', weight: 0.45 },
  { id: 'left', weight: 0.75 },
  { id: 'center', weight: 1 },
  { id: 'right', weight: 0.75 },
  { id: 'far-right', weight: 0.45 },
];

export function micBarScale(level: number, weight: number): number {
  const bounded = Number.isFinite(level) ? Math.min(1, Math.max(0, level)) : 0;
  return MIC_BAR_MIN_SCALE + (1 - MIC_BAR_MIN_SCALE) * bounded * weight;
}