Cette page est affichée en anglais. Une traduction française est en cours.
SkillsMar 29, 2026·2 min de lecture

Remotion Rule: Timing

Remotion skill rule: Interpolation curves in Remotion - linear, easing, spring animations. Part of the official Remotion Agent Skill for programmatic video in React.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Remotion Rule: Timing
Commande d'installation directe
npx -y tokrepo@latest install ee8f13ea-5f67-4a08-ae1d-3366b53e593f --target codex

À exécuter après confirmation du plan en dry-run.

TL;DR
Master Remotion timing with interpolation, easing curves, and spring animations.
§01

What it is

This Remotion skill rule covers interpolation and timing in Remotion videos. Remotion renders video frame-by-frame in React, and animations are driven by the current frame number rather than CSS transitions or requestAnimationFrame. You use the interpolate() function to map frame numbers to property values, with configurable easing curves and spring physics.

This rule is part of the official Remotion Agent Skill set. It provides the correct patterns for creating smooth motion, fade effects, and spring-based animations in programmatic video compositions.

§02

Why it saves time or tokens

Getting animation timing right in Remotion requires understanding how interpolate() maps frame ranges to output ranges. Without this skill rule, developers (and AI agents) often produce jerky animations because they use linear interpolation where easing is needed, or miscalculate frame boundaries. This rule provides the correct formulas and patterns upfront, reducing trial-and-error iterations.

§03

How to use

  1. Import interpolate and useCurrentFrame from the remotion package
  2. Map frame ranges to output values using interpolate(frame, inputRange, outputRange)
  3. Apply easing curves or spring physics for natural-feeling motion
§04

Example

import { useCurrentFrame, interpolate, spring, useVideoConfig } from 'remotion';
import { Easing } from 'remotion';

const MyAnimation = () => {
  const frame = useCurrentFrame();
  const { fps } = useVideoConfig();

  // Linear fade in over 30 frames
  const opacity = interpolate(frame, [0, 30], [0, 1], {
    extrapolateRight: 'clamp'
  });

  // Eased slide from left
  const translateX = interpolate(frame, [0, 45], [-100, 0], {
    easing: Easing.out(Easing.cubic),
    extrapolateRight: 'clamp'
  });

  // Spring animation
  const scale = spring({ frame, fps, config: { damping: 12 } });

  return (
    <div style={{ opacity, transform: `translateX(${translateX}px) scale(${scale})` }}>
      Animated content
    </div>
  );
};
FunctionUse Case
interpolateMap frames to any numeric value
springPhysics-based natural motion
Easing.inSlow start, fast end
Easing.outFast start, slow end
Easing.inOutSlow start and end
§05

Related on TokRepo

§06

Common pitfalls

  • Forgetting extrapolateRight: 'clamp' causes values to keep increasing past the intended range, producing unexpected animation behavior
  • Using interpolate without easing produces robotic linear motion; add Easing.out(Easing.cubic) for natural deceleration
  • Spring animations do not have a fixed duration; use measureSpring() to calculate how many frames a spring animation takes for accurate composition timing

Questions fréquentes

What is the difference between interpolate and spring?+

interpolate maps frame numbers to output values using mathematical easing curves. You define exact start and end frames. spring simulates physics-based motion with damping and stiffness parameters. Spring animations feel more natural but do not have a fixed end frame. Use interpolate for precise timing and spring for organic motion.

How do I clamp interpolation values?+

By default, interpolate extrapolates beyond the input range. Set extrapolateLeft and extrapolateRight to 'clamp' to prevent values from going outside the output range. For example, an opacity interpolation should always clamp to prevent values below 0 or above 1.

Can I chain multiple animations in sequence?+

Yes. Use different input ranges for each phase. For example, fade in on frames 0-30 and slide on frames 30-60. The Sequence component also helps by offsetting child component start frames, letting you compose animations declaratively.

How do I calculate spring animation duration?+

Use the measureSpring() function from Remotion. Pass the same spring config (damping, stiffness, mass) and fps, and it returns the number of frames the spring takes to settle. Use this value to set your Sequence or composition duration accurately.

What easing curves are available in Remotion?+

Remotion provides Easing.linear, Easing.ease, Easing.quad, Easing.cubic, Easing.sin, Easing.exp, Easing.circle, Easing.back, Easing.elastic, and Easing.bounce. Each can be wrapped with Easing.in, Easing.out, or Easing.inOut to control the acceleration pattern.

Sources citées (3)
🙏

Source et remerciements

Created by Remotion. Licensed under MIT. remotion-dev/skills — Rule: timing

Part of the Remotion AI Skill collection on TokRepo.

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires