, index: number, smooth: boolean): void {
let before: HTMLElement | undefined
@@ -91,6 +104,8 @@ export function Lyrics() {
if (fill !== item.fill) {
item.fill = fill
item.node.style.setProperty('--lyric-fill', String(fill))
+ item.node.classList.toggle('lyric-sung', smooth && fill > 0)
+ item.node.classList.toggle('lyric-held', smooth && fill > 0 && fill < 1 && wordEmphasis(item.word) > 0)
}
}
}
@@ -122,7 +137,7 @@ export function Lyrics() {
{lines.some(line => line.text)
? lines.map((line, index) => line.text && (
- {line.words?.map(word => {word.text}) ?? line.text}
+ {line.words?.map(word => ) ?? line.text}
{line.translation && {line.translation}}
))