mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
fix(runtime): show elements at exact end of their duration (inclusive boundary) (#1166)
Visibility check used strict less-than (currentTime < end), hiding elements at exactly t=duration. Changed to <= so the last frame renders the final animation state.
This commit is contained in:
@@ -1413,7 +1413,7 @@ export function initSandboxRuntimeModular(): void {
|
||||
duration != null && duration > 0 ? start + duration : Number.POSITIVE_INFINITY;
|
||||
const isVisibleNow =
|
||||
state.currentTime >= start &&
|
||||
(Number.isFinite(computedEnd) ? state.currentTime < computedEnd : true);
|
||||
(Number.isFinite(computedEnd) ? state.currentTime <= computedEnd : true);
|
||||
rawNode.style.visibility = isVisibleNow ? "visible" : "hidden";
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user