fix(producer): suppress GSAP call side effects during render seeks (#2037)

* fix(producer): suppress GSAP call side effects during render seeks

* fix(core): preserve GSAP root render nudge safely
This commit is contained in:
Miguel Ángel
2026-07-07 21:06:59 -04:00
committed by GitHub
parent c6408b620e
commit 5b9b71df25
17 changed files with 462 additions and 51 deletions
+3 -2
View File
@@ -13,13 +13,14 @@ export function createGsapAdapter(deps: GsapAdapterDeps): RuntimeDeterministicAd
if (!timeline) return;
timeline.pause();
const safeTime = Math.max(0, Number(ctx.time) || 0);
const suppressEvents = ctx.suppressEvents === true;
if (typeof timeline.totalTime === "function") {
// GSAP 3.x skips rendering when the new totalTime equals _tTime.
// Nudge first to force a dirty state, then seek to the exact time.
timeline.totalTime(safeTime + 0.001, true);
timeline.totalTime(safeTime, false);
timeline.totalTime(safeTime, suppressEvents);
} else {
timeline.seek(safeTime, false);
timeline.seek(safeTime, suppressEvents);
}
},
pause: () => {