@braccato/core 1.12.3 → 1.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine.js +1 -1
- package/dist/inject.d.ts +1 -0
- package/dist/inject.js +4 -2
- package/package.json +1 -1
package/dist/engine.js
CHANGED
|
@@ -917,7 +917,7 @@ function startWordAnimations(engine, part, config, currentTime, appliedTimingOff
|
|
|
917
917
|
fill: "forwards",
|
|
918
918
|
};
|
|
919
919
|
const wobbleStartMs = correctedAnimationTimeMs(wordTimeMs, appliedTimingOffsetMs, config.word.wobbleDurationMs);
|
|
920
|
-
for (const wordElement of
|
|
920
|
+
for (const wordElement of part.wobbleElements) {
|
|
921
921
|
const animation = trackLyricAnimationTiming(engine, wordElement.animate(wobbleKeyframes, wobbleOptions), {
|
|
922
922
|
appliedTimingOffsetMs,
|
|
923
923
|
offsetMs: 0,
|
package/dist/inject.d.ts
CHANGED
package/dist/inject.js
CHANGED
|
@@ -64,7 +64,7 @@ export function deriveSyncType(lyrics) {
|
|
|
64
64
|
return "richsync";
|
|
65
65
|
return lyrics.every(item => item.startTimeMs === 0) ? "none" : "synced";
|
|
66
66
|
}
|
|
67
|
-
function newPartData(part, span, highlight, letterElements, highlightLetterElements) {
|
|
67
|
+
function newPartData(part, span, highlight, wobbleElements, letterElements, highlightLetterElements) {
|
|
68
68
|
return {
|
|
69
69
|
time: part.startTimeMs / 1000,
|
|
70
70
|
duration: part.durationMs / 1000,
|
|
@@ -72,6 +72,7 @@ function newPartData(part, span, highlight, letterElements, highlightLetterEleme
|
|
|
72
72
|
highlightElement: highlight,
|
|
73
73
|
letterElements,
|
|
74
74
|
highlightLetterElements,
|
|
75
|
+
wobbleElements,
|
|
75
76
|
animations: [],
|
|
76
77
|
wordState: WORD_STATE_UPCOMING,
|
|
77
78
|
};
|
|
@@ -278,7 +279,8 @@ function createWordGroup(doc, group, lineData) {
|
|
|
278
279
|
if (token.kind === "space")
|
|
279
280
|
continue;
|
|
280
281
|
const { span, highlight, letters, highlightLetters } = createTimedWordSpan(doc, token.part, wrapThreshold, perLetter);
|
|
281
|
-
|
|
282
|
+
const wobbleElements = lyricGroup.childNodes.length === 0 ? [lyricGroup, highlightGroup] : [];
|
|
283
|
+
lineData.parts.push(newPartData(token.part, span, highlight, wobbleElements, letters, highlightLetters));
|
|
282
284
|
lyricGroup.appendChild(span);
|
|
283
285
|
highlightGroup.appendChild(highlight);
|
|
284
286
|
}
|