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

Function findKeyframesObjectNode

packages/parsers/src/gsapParser.ts:2066–2069  ·  view source on GitHub ↗

Find the keyframes ObjectExpression node on a tween's varsArg, or null.

(varsArg: AstNode)

Source from the content-addressed store, hash-verified

2064
2065/** Find the keyframes ObjectExpression node on a tween's varsArg, or null. */
2066function findKeyframesObjectNode(varsArg: AstNode): AstNode | null {
2067 const node = findPropertyNode(varsArg, "keyframes");
2068 return node?.type === "ObjectExpression" ? node : null;
2069}
2070
2071/**
2072 * Convert array-form keyframes (`keyframes: [{x,y}, …]`) to even-percentage object

Callers 8

applyEaseUpdateFunction · 0.85
stripKeyframeEasesFunction · 0.85
locateKeyframeCtxFunction · 0.85
addKeyframeToScriptFunction · 0.85
moveKeyframeInScriptFunction · 0.85
setArcPathInScriptFunction · 0.85

Calls 1

findPropertyNodeFunction · 0.70

Tested by

no test coverage detected