fix(frontend): extend theme-preview window to 10s and raise SFX volume

This commit is contained in:
Gabriel Franco 2026-09-13 17:42:45 -03:00
parent beccfacc22
commit 892235cdaf
2 changed files with 6 additions and 6 deletions

View file

@ -21,7 +21,7 @@ class Sound {
return this.ctx; return this.ctx;
} }
private tone(freq: number, dur = 0.12, type: OscillatorType = 'sine', gain = 0.05, when = 0): void { private tone(freq: number, dur = 0.12, type: OscillatorType = 'sine', gain = 0.09, when = 0): void {
if (this.muted) return; if (this.muted) return;
const ctx = this.ensure(); const ctx = this.ensure();
if (!ctx) return; if (!ctx) return;
@ -40,12 +40,12 @@ class Sound {
} }
playOpen(): void { playOpen(): void {
this.tone(660, 0.07, 'triangle', 0.035); this.tone(660, 0.07, 'triangle', 0.065);
} }
playApply(): void { playApply(): void {
this.tone(523.25, 0.09, 'sine', 0.05); this.tone(523.25, 0.09, 'sine', 0.09);
this.tone(783.99, 0.12, 'sine', 0.045, 0.06); this.tone(783.99, 0.12, 'sine', 0.08, 0.06);
} }
playReveal(score: number): void { playReveal(score: number): void {
@ -54,7 +54,7 @@ class Sound {
: score >= 60 : score >= 60
? [523.25, 659.25, 783.99] ? [523.25, 659.25, 783.99]
: [392, 349.23]; : [392, 349.23];
notes.forEach((f, i) => this.tone(f, 0.2, 'triangle', 0.05, i * 0.1)); notes.forEach((f, i) => this.tone(f, 0.2, 'triangle', 0.09, i * 0.1));
} }
toggleMute(): boolean { toggleMute(): boolean {

View file

@ -9,7 +9,7 @@ export interface PreviewFlowElements {
canvas: HTMLCanvasElement; canvas: HTMLCanvasElement;
} }
const COUNTDOWN_SECONDS = 5; const COUNTDOWN_SECONDS = 10;
function bumpCountdown(el: HTMLElement, text: string): void { function bumpCountdown(el: HTMLElement, text: string): void {
el.textContent = text; el.textContent = text;