diff --git a/skills/remotion-to-hyperframes/references/.gitkeep b/skills/remotion-to-hyperframes/references/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/skills/remotion-to-hyperframes/references/api-map.md b/skills/remotion-to-hyperframes/references/api-map.md new file mode 100644 index 000000000..906d7957e --- /dev/null +++ b/skills/remotion-to-hyperframes/references/api-map.md @@ -0,0 +1,142 @@ +# Remotion → HyperFrames API Map + +Authoritative translation table. Load this reference when starting a translation +to know the high-level mapping; load the per-topic references for fragile +details (timing, transitions, etc.). + +## Reading this table + +- **`drop`** = remove from output entirely. The HF runtime handles it. +- **`see references/X.md`** = the mapping is non-trivial; read the linked file. +- **`refuse + interop`** = the skill bows out and recommends the runtime adapter + pattern from [PR #214](https://github.com/heygen-com/hyperframes/pull/214). + +## Composition root + +| Remotion | HyperFrames | +| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `` | root `
` | +| `defaultProps={...}` | `data-*` attributes on `#stage` (one per scalar prop). Nested objects/arrays — see [parameters.md](parameters.md) | +| `schema={z.object(...)}` | not represented in HTML; the schema lives in the agent's translation step only | +| `calculateMetadata` (sync) | resolve at translation time, write concrete values into `data-*` | +| `calculateMetadata` (async) | **refuse + interop** — see [escape-hatch.md](escape-hatch.md) | +| `registerRoot(RemotionRoot)` | drop | +| `` | `
` | + +## Sequencing + +See [sequencing.md](sequencing.md) for nesting and stagger details. + +| Remotion | HyperFrames | +| ------------------------------------------ | --------------------------------------------------------------------------------------------------------- | +| `` | `
` | +| `` + `` | siblings with sequential `data-start` values | +| `` | not a primitive — emit a custom GSAP `repeat: -1` loop with manual offset math | +| `` | drop the wrapper; HF doesn't have running animation outside the seek-driven timeline so freeze is a no-op | + +## Timing + +See [timing.md](timing.md) — this is the highest-leverage section. + +| Remotion | HyperFrames | +| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | +| `useCurrentFrame()` | drop — HF seeks the timeline. The math derived from `frame` becomes an animatable property of a paused GSAP tween. | +| `useVideoConfig()` for `fps` / `durationInFrames` | drop — read from `data-fps` / `data-duration` on `#stage` | +| `interpolate(frame, [a,b], [x,y])` (linear) | `gsap.fromTo(t, {p:x}, {p:y, duration:(b-a)/fps, ease:"none"})` at offset `a/fps` | +| `interpolate(frame, [a,b,c,d], [x,y,y,z])` (multi-segment) | three `gsap.to` calls at offsets `a/fps`, `b/fps`, `c/fps` | +| `interpolate(..., {easing: Easing.bezier})` | GSAP `CustomEase.create("c", "M0,0 C${a},${b} ${c},${d} 1,1")` | +| `spring({frame, fps, config: {damping, stiffness, mass}})` | GSAP `back.out(N)` — see [timing.md](timing.md) for damping → overshoot table | +| `interpolateColors(frame, range, colors)` | `gsap.to({...}, { backgroundColor, color, duration, ease })` — GSAP handles color tweens natively | +| `Easing.in / .out / .inOut(power)` | GSAP `power.in` / `power.out` / `power.inOut` | + +## Media + +See [media.md](media.md) for trim, volume ramps, and decoder notes. + +| Remotion | HyperFrames | +| -------------------------------------- | --------------------------------------------------------------------------- | +| `