Skip to content

feat(studio): GSAP runtime read layer + shared helpers#1557

Open
miguel-heygen wants to merge 1 commit into
feat/cli-keyframes-commandfrom
feat/studio-gsap-read-layer
Open

feat(studio): GSAP runtime read layer + shared helpers#1557
miguel-heygen wants to merge 1 commit into
feat/cli-keyframes-commandfrom
feat/studio-gsap-read-layer

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Stack: GSAP keyframe + motion-path editing — studio runtime read layer (#1553#1561).

What

A read layer that reads live GSAP keyframes / motion-paths from the preview iframe runtime, plus shared time helpers, a parsed-animation fetch fallback, and a per-element tween cache.

Why

The static parser can't always resolve keyframes (data-driven loops, computed selectors, fetched values). Reading the live __timelines runtime fills the gap; a cold-parse fetch fallback covers the initial-load race where the parse endpoint isn't warm yet.

How

  • gsapRuntimeKeyframes.ts: readRuntimeKeyframes / scanAllRuntimeKeyframes read the live timeline (skipping zero-duration hold sets).
  • gsapShared.ts: tween-relative ↔ clip-relative percentage conversion.
  • useGsapAnimationFetchFallback.ts: retry the parse endpoint on a cold read.
  • useGsapTweenCache.ts: memoize parsed animations per element.

Test plan

  • Unit tests added (runtime read, shared helpers, fetch fallback)
  • bun run test (studio) green

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at 74c37f3a per Rames D Jusso + Via stack review. GSAP runtime read layer + shared helpers — focused, isolated, no concerns.

Reminder: PR body is the unfilled template (stack-wide process flag from Rames D Jusso + Via); please fill in before merge.

@miguel-heygen miguel-heygen force-pushed the feat/cli-keyframes-command branch from 5e8cf5e to f6a0cbb Compare June 18, 2026 15:47
@miguel-heygen miguel-heygen force-pushed the feat/studio-gsap-read-layer branch from 74c37f3 to 52dfaa9 Compare June 18, 2026 15:48

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approved at 52dfaa9e post-restack. GSAP runtime read layer unchanged in substance; clean.

readRuntimeKeyframes skips zero-duration hf-hold sets and picks the first real
timeline; shared tween/selector helpers, tween cache, and fetch fallback.
@miguel-heygen miguel-heygen force-pushed the feat/studio-gsap-read-layer branch from 52dfaa9 to 06aecb2 Compare June 18, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants