Files
wehub-resource-sync 85453da49f
regression / regression-shards (style-16-prod style-9-prod style-17-prod iframe-render-compat variables-prod mp4-h265-sdr, shard-4) (push) Has been cancelled
regression / regression-shards (style-4-prod style-11-prod style-2-prod animejs-adapter typegpu-adapter parallel-capture-regression, shard-5) (push) Has been cancelled
regression / regression-shards (style-7-prod style-8-prod style-10-prod css-spinner-render-compat webm-transparency mp4-h264-sdr webm-vp9, shard-3) (push) Has been cancelled
regression / regression-shards (sub-composition-video style-18-prod raf-ball-render-compat font-variant-numeric sub-comp-t0 sub-comp-id-selector, shard-7) (push) Has been cancelled
Windows render verification / Detect changes (push) Has been cancelled
Windows render verification / Preflight (lint + format) (push) Has been cancelled
Windows render verification / Render on windows-latest (push) Has been cancelled
Windows render verification / Tests on windows-latest (push) Has been cancelled
CI / Detect changes (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Fallow audit (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Producer: integration tests (push) Has been cancelled
CI / Producer: unit tests (push) Has been cancelled
CI / File size check (push) Has been cancelled
CI / Test: skills (push) Has been cancelled
CI / Skills: manifest in sync (push) Has been cancelled
CI / CLI: npx shim (macos-latest) (push) Has been cancelled
CI / CLI: npx shim (ubuntu-latest) (push) Has been cancelled
CI / CLI: npx shim (windows-latest) (push) Has been cancelled
CI / SDK: unit + contract + smoke (push) Has been cancelled
CI / Test: runtime contract (push) Has been cancelled
CI / Studio: load smoke (push) Has been cancelled
CI / Smoke: global install (push) Has been cancelled
CI / CLI smoke (required) (push) Has been cancelled
CI / Semantic PR title (push) Has been cancelled
Player perf / Detect changes (push) Has been cancelled
Player perf / Preflight (lint + format) (push) Has been cancelled
Player perf / player-perf (push) Has been cancelled
Player perf / Perf: drift (push) Has been cancelled
Player perf / Perf: fps (push) Has been cancelled
Player perf / Perf: parity (push) Has been cancelled
Player perf / Perf: scrub (push) Has been cancelled
Player perf / Perf: load (push) Has been cancelled
preview-regression / Detect changes (push) Has been cancelled
preview-regression / Preflight (lint + format) (push) Has been cancelled
preview-regression / Preview parity (push) Has been cancelled
preview-regression / preview-regression (push) Has been cancelled
regression / regression (push) Has been cancelled
regression / Detect changes (push) Has been cancelled
regression / Preflight (lint + format) (push) Has been cancelled
regression / regression-shards (hdr-regression style-5-prod style-3-prod mov-prores, shard-1) (push) Has been cancelled
regression / regression-shards (overlay-montage-prod style-12-prod chat missing-host-comp-id png-sequence portrait-edge-bleed, shard-6) (push) Has been cancelled
regression / regression-shards (style-13-prod style-6-prod vignelli-stacking gsap-letters-render-compat audio-mux-parity, shard-8) (push) Has been cancelled
regression / regression-shards (style-15-prod hdr-hlg-regression style-1-prod many-cuts vfr-screen-recording render-symlinked-assets, shard-2) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docs / Validate docs (push) Has been cancelled
Sync skills to ClawHub / Publish changed skills (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:58:35 +08:00

4.4 KiB

Transitions translation: @remotion/transitions → HF crossfades / shader-transitions

The @remotion/transitions package is Remotion's library of pre-built scene-to-scene transitions. HF has two paths to translate them:

  1. Manual GSAP crossfade — for simple opacity/transform transitions. Free, no extra package.
  2. HF shader-transitions package — for visually-rich transitions that match the @remotion/transitions presets.

Pattern: <TransitionSeries> is <Series> with overlap

<TransitionSeries>
  <TransitionSeries.Sequence durationInFrames={60}>
    <SceneA />
  </TransitionSeries.Sequence>
  <TransitionSeries.Transition
    presentation={fade()}
    timing={linearTiming({ durationInFrames: 15 })}
  />
  <TransitionSeries.Sequence durationInFrames={60}>
    <SceneB />
  </TransitionSeries.Sequence>
</TransitionSeries>

Translates to scenes that overlap by the transition duration:

  • SceneA: [0, 60] = data-start="0" data-duration="2"
  • SceneB: [60-15, 60-15+60] = data-start="1.5" data-duration="2" (the transition window overlaps the end of A and start of B)

Then drive the transition with GSAP:

// Manual fade (presentation={fade()})
tl.to(sceneA, { opacity: 0, duration: 0.5, ease: "none" }, 1.5);
tl.fromTo(sceneB, { opacity: 0 }, { opacity: 1, duration: 0.5, ease: "none" }, 1.5);

Presentation table

Remotion presentation HF translation
fade() manual gsap.to(opacity) crossfade
slide({direction: "from-right"}) gsap.fromTo(translateX: "100%" → 0) on incoming + to(translateX: "-100%") on outgoing
wipe({direction: "from-left"}) gsap.fromTo(clip-path: inset(0 100% 0 0) → inset(0 0 0 0)) on incoming
clockWipe() use HF's sdf-iris shader-transition (npx hyperframes add sdf-iris)
flip() gsap.to(rotateY) 180° split between scenes
cube() use HF's cinematic-zoom or build manually with rotateY + transform-origin
iris() use HF's sdf-iris shader-transition
none() no transition; hard cut at the boundary

Timing translations

linearTiming({durationInFrames: 15})               ease: "none"
linearTiming({durationInFrames: 15, easing: ...})  ease per the easing table in timing.md
springTiming({config: {damping: 12}})              ease: "back.out(1.4)" (~0.7 s)

Convert durationInFrames to seconds (/fps).

When to use HF shader-transitions

For transitions Remotion presets that have visually-rich GLSL equivalents (iris, ripple, zoom, glitch), use HF's shader-transitions package. They produce richer output than manual GSAP transforms.

npx hyperframes add sdf-iris

Then in the composition:

<div id="iris-transition" class="hf-shader-transition" data-start="1.5" data-duration="0.5">
  <!-- bound scenes via the shader-transition's data-from / data-to -->
</div>

Each shader-transition has its own data attributes; see the catalog page for the specific block.

When the source uses a custom Presentation

Remotion supports custom presentation implementations:

const customPresentation: PresentationComponent = ({
  children,
  presentationProgress,
  presentationDirection,
}) => {
  return (
    <div
      style={
        {
          /* compute transform from progress */
        }
      }
    >
      {children}
    </div>
  );
};

Translation: extract the math from the style={...} block and emit equivalent GSAP tweens. Specifically the transform formula maps directly to a gsap.to(target, { transform: ... }) parameterized by progress.

If the custom presentation uses useCurrentFrame() internally to animate something outside the simple progress curve, treat the source as untranslatable and bow out to the runtime interop pattern (see escape-hatch.md).