Skip to content

Commit

Permalink
Fixes for clip anim and anim related performance.
Browse files Browse the repository at this point in the history
  • Loading branch information
ILOVEPIE committed Dec 26, 2023
1 parent f677a7b commit 68f8b89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/renderer-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,8 @@ const renderer_prototype = global.Object.create(Object, {
if (
events[i].getLineOverrides().hasMovement() ||
events[i].getLineOverrides().getFade() !== null ||
events[i].getLineTransitionTargetOverrides() !== null ||
(events[i].getLineTransitionTargetOverrides() !== null &&
events[i].getLineTransitionTargetOverrides().length > 0) ||
events[i].getOverrides().getKaraokeMode() !==
sabre.KaraokeModes.OFF ||
events[i].getOverrides().getTransitions().length > 0
Expand Down Expand Up @@ -3070,31 +3071,31 @@ const renderer_prototype = global.Object.create(Object, {
].getTransitionAcceleration();
clip[0] = sabre.performTransition(
time,
/** @type {number} */ (clip[0]),
/** @type {!number} */ (clip[0]),
transitionClip[0],
transitionStart,
transitionEnd,
transitionAcceleration
);
clip[1] = sabre.performTransition(
time,
/** @type {number} */ (clip[1]),
/** @type {!number} */ (clip[1]),
transitionClip[1],
transitionStart,
transitionEnd,
transitionAcceleration
);
clip[2] = sabre.performTransition(
time,
/** @type {number} */ (clip[2]),
/** @type {!number} */ (clip[2]),
transitionClip[2],
transitionStart,
transitionEnd,
transitionAcceleration
);
clip[3] = sabre.performTransition(
time,
/** @type {number} */ (clip[3]),
/** @type {!number} */ (clip[3]),
transitionClip[3],
transitionStart,
transitionEnd,
Expand Down
2 changes: 1 addition & 1 deletion src/subtitle-event.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ sabre["SSASubtitleEvent"] = function SSASubtitleEvent () {

"getLineTransitionTargetOverrides": {
value: function getLineTransitionTargetOverrides () {
return obj.lineTransitionTargetOverrides.slice(0);
return obj.lineTransitionTargetOverrides;
},
writable: false
}
Expand Down

0 comments on commit 68f8b89

Please sign in to comment.