fix: allow Google Fonts in CSP so 3D announcement font loads in production

fontSrc blocked fonts.gstatic.com and styleSrc blocked fonts.googleapis.com,
causing Honk font to fail in production. The chromatic aberration pseudo-elements
then appeared as doubled plain text instead of a styled 3D effect.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-09 07:18:57 +00:00
co-authored by Claude Opus 4.6
parent b28d0b220e
commit 7b82803868
6 changed files with 135 additions and 38 deletions
+35 -1
View File
@@ -80,9 +80,43 @@ export const PHYSICAL_CONTACT_BASE = 0.35 // Base chance for brawl/cli
export const PHYSICAL_CONTACT_INTENSITY_SCALE = 0.2 // Added per unit of intensity
export const PHYSICAL_CONTACT_EXCHANGE_BONUS = 0.15 // Added after first exchange
export const CROWD_REACTION_CHANCE = 0.4 // Crowd reacts to round results
export const MAYBE_SHOW_HUMAN_CHANCE = 0.2 // Show human coach
export const CREATOR_VOICE_LINE_CHANCE = 0.6 // Creator gets a voice line
// --- Hyperdetail (grotesque close-up) ---
export const HYPERDETAIL_BASE_CHANCE = 0.05 // Base hyperdetail chance
export const HYPERDETAIL_INTENSITY_SCALE = 0.45 // Scales with intensity
// --- Scene layout ---
export const GROUND_Y_RATIO = 0.78 // Ground line as fraction of canvas height
export const HOME_A_RATIO = 0.28 // Fighter A home X position ratio
export const HOME_B_RATIO = 0.72 // Fighter B home X position ratio
export const REFERENCE_HEIGHT = 500 // Reference canvas height for scale factor
export const SPRITE_LOAD_TIMEOUT_MS = 5_000 // Max wait for sprite loading (mobile hang prevention)
// --- Fighter scaling ---
export const FIGHTER_BASE_SCALE = 1.8 // Base fighter sprite scale
export const FIGHTER_TIER_SCALE = 0.4 // Additional scale per tier level
export const JUDGE_SCALE = 1.3 // Judge sprite scale
export const HUMAN_COACH_SCALE = 1.2 // Human coach sprite scale
export const HUMAN_RUN_SCALE = 1.3 // Human run-across sprite scale
// --- Scene visual constants ---
export const AMBIENT_PARTICLE_COUNT = 18 // Floating dust/embers in air
export const SKY_GRADIENT_BANDS = 6 // Number of sky gradient bands
export const GROUND_DEPTH_LINES = 12 // Ground gradient fade lines
export const PERSPECTIVE_GRID_LINES = 24 // Floor grid convergence lines
export const PILLAR_WIDTH = 8 // Side pillar frame width
export const SPEECH_BUBBLE_MAX_CHARS = 80 // Max chars in speech bubble
export const SPEECH_BUBBLE_WRAP = 18 // Chars per line in speech bubble
export const SPEECH_BUBBLE_MAX_LINES = 5 // Max lines in speech bubble
export const SPEECH_BUBBLE_FONT_SIZE = 12 // Speech bubble font size
export const SPEECH_BUBBLE_DEFAULT_DURATION = 3 // Default speech bubble duration (seconds)
// --- Human appearance ---
export const HUMAN_SHOW_CHANCE = 0.15 // Chance per round for human appearance
export const HUMAN_COACH_CHANCE = 0.4 // Of appearances: coach (most common)
export const HUMAN_RUN_CHANCE = 0.7 // Of appearances: run across (cumulative cutoff)
// --- Haptic scaling ---
export const HAPTIC_MIN_SHAKE = 3 // Min shake intensity to trigger haptic
export const HAPTIC_SCALE = 8 // Haptic ms = intensity * scale (capped 100)