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

Function isPositionTween

packages/cli/src/commands/keyframes.ts:120–127  ·  view source on GitHub ↗
(anim: GsapAnimation)

Source from the content-addressed store, hash-verified

118}
119
120function isPositionTween(anim: GsapAnimation): boolean {
121 if (anim.propertyGroup === "position") return true;
122 const has = (p: Record<string, number | string> | undefined) => !!p && ("x" in p || "y" in p);
123 if (has(anim.properties) || has(anim.fromProperties)) return true;
124 return (anim.keyframes?.keyframes ?? []).some(
125 (kf) => "x" in kf.properties || "y" in kf.properties,
126 );
127}
128
129// The rest-state value for an animated property (what GSAP animates to/from when
130// the other endpoint is the element's natural pose): 1 for scale/opacity, 0 for

Callers 1

surfaceTweenFunction · 0.85

Calls 1

hasFunction · 0.70

Tested by

no test coverage detected