feat(04-04): wire audio and speech into lesson, reward, forest, and app
- playCorrectSound() on correct keypress in letter and word exercises - playRewardSound() when reward image appears - speakText() for companion comment on reward screen - playForestElementSound() when new forest element renders - speakText() for companion greeting on forest screen Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { Progress, LevelStatus } from "../types";
|
||||
import { levels } from "../game/levels";
|
||||
import { getProgress, getForestElements } from "../storage/db";
|
||||
import { playForestElementSound } from "../audio/sounds";
|
||||
|
||||
let activeObjectUrls: string[] = [];
|
||||
|
||||
@@ -44,6 +45,7 @@ export async function renderForestScene(
|
||||
// Animate newly added element
|
||||
if (element.id === newElementId) {
|
||||
slot.classList.add("forest__element--new");
|
||||
playForestElementSound();
|
||||
}
|
||||
|
||||
slot.appendChild(img);
|
||||
|
||||
Reference in New Issue
Block a user