Skip to content

feat(Explainer): graceful enter/exit transitions for scene text#95

Open
xiangboit wants to merge 1 commit into
calesthio:mainfrom
xiangboit:feat/scene-text-transitions
Open

feat(Explainer): graceful enter/exit transitions for scene text#95
xiangboit wants to merge 1 commit into
calesthio:mainfrom
xiangboit:feat/scene-text-transitions

Conversation

@xiangboit

Copy link
Copy Markdown

What

Adds a SceneTextTransition wrapper so every scene's text/component gets a graceful enter and exit animation (fade + slide + subtle scale), instead of popping in and vanishing abruptly at cut boundaries.

Why

Currently scene components have entrance springs but no exit — text snaps in, then disappears instantly when the next cut starts. On real explainer videos this reads as jarring, especially between back-to-back text scenes.

How

  • New SceneTextTransition component drives opacity (0→1→1→0), translateY (slide up on enter / drift up on exit) and scale (0.88→1→1.08) from the cut's own duration, with clamped interpolation.
  • SceneRenderer.maybeWrapWithBg now wraps inner content in SceneTextTransition before the background layer — only the text/component layer animates; backgroundVideo / backgroundImage stay steady.
  • Timing auto-scales per cut (fadeIn ≈ duration*0.26, exit starts ~22 frames before end), so short and long cuts both transition cleanly.

Scope / Safety

  • Single file, ~40 lines added. No API/schema change — cuts props untouched.
  • Applies uniformly to all scene types (text_card / callout / comparison / hero_title / charts…) since they all flow through maybeWrapWithBg.
  • Verified by rendering full explainer videos (1080p, mixed text + background-video cuts).

Happy to gate this behind a prop (e.g. cut.transition: "none") if you'd prefer opt-in rather than default-on.

@xiangboit xiangboit requested a review from calesthio as a code owner June 5, 2026 17:40
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.

1 participant