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

Function applyGsapOp

packages/sdk/src/engine/mutate.ts:237–258  ·  view source on GitHub ↗
(parsed: ParsedDocument, op: EditOp)

Source from the content-addressed store, hash-verified

235}
236
237function applyGsapOp(parsed: ParsedDocument, op: EditOp): MutationResult | undefined {
238 const kf = applyGsapKeyframeOp(parsed, op);
239 if (kf !== undefined) return kf;
240 const arc = applyArcPathOp(parsed, op);
241 if (arc !== undefined) return arc;
242 const wkf = applyGsapWithKeyframesOp(parsed, op);
243 if (wkf !== undefined) return wkf;
244 switch (op.type) {
245 case "addGsapTween":
246 return handleAddGsapTween(parsed, op.target, op.tween);
247 case "setGsapTween":
248 return handleSetGsapTween(parsed, op.animationId, op.properties);
249 case "removeGsapProperty":
250 return handleRemoveGsapProperty(parsed, op.animationId, op.property, op.from);
251 case "removeGsapTween":
252 return handleRemoveGsapTween(parsed, op.animationId);
253 case "deleteAllForSelector":
254 return handleDeleteAllForSelector(parsed, op.selector);
255 default:
256 return undefined;
257 }
258}
259
260export function applyOp(parsed: ParsedDocument, op: EditOp): MutationResult {
261 const gsap = applyGsapOp(parsed, op);

Callers 1

applyOpFunction · 0.85

Calls 8

applyGsapKeyframeOpFunction · 0.85
applyArcPathOpFunction · 0.85
applyGsapWithKeyframesOpFunction · 0.85
handleAddGsapTweenFunction · 0.85
handleSetGsapTweenFunction · 0.85
handleRemoveGsapPropertyFunction · 0.85
handleRemoveGsapTweenFunction · 0.85

Tested by

no test coverage detected