MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / resolveTweenTiming

Function resolveTweenTiming

packages/sdk-playground/src/main.ts:304–310  ·  view source on GitHub ↗
(anim: GsapAnimation, trackId: string)

Source from the content-addressed store, hash-verified

302}
303
304function resolveTweenTiming(anim: GsapAnimation, trackId: string): { start: number; d: number } {
305 const fbStart = anim.resolvedStart ?? 0;
306 const fbDur = numOr(anim.duration as number | undefined, 0.4);
307 const el = comp ? comp.getElement(trackId) : null;
308 if (!el) return { start: fbStart, d: fbDur };
309 return computeTiming(el.attributes["data-start"], el.attributes["data-end"], fbStart, fbDur);
310}
311
312function buildTweenBlock(
313 anim: GsapAnimation,

Callers 1

buildTweenBlockFunction · 0.85

Calls 3

numOrFunction · 0.85
computeTimingFunction · 0.85
getElementMethod · 0.65

Tested by

no test coverage detected