For the text I created a sequence which looks like this : import { interpolate, useCurrentFrame, useVideoConfig, Easing, AbsoluteFill,
} from "remotion";
import React from 'react';
import {color} from '../../resources/constants';
import "../../resources/font.css";
import data from "../../../public/DiscoverData.json";
export const AnimTitre: React.FC = () => {
const frame = useCurrentFrame();
const {fps} = useVideoConfig();
const valeursBeziers = Easing.bezier(.58,.14,.45,.97);
// data
const dataTitre = data.Titre;
const imgCle03 = 5*25;
const imgCle04 = imgCle03 + 8;
const leftGen = interpolate(frame, [imgCle03, imgCle04,], [0, 0], {
easing: valeursBeziers,
extrapolateRight: "clamp",
extrapolateLeft: "clamp",
});
const topGen = interpolate(frame, [imgCle03, imgCle04], [0, 1000], {
easing: valeursBeziers,
extrapolateRight: "clamp",
extrapolateLeft: "clamp",
});
// Un nouveau caractère à chaque demi-image
const charsShown = Math.floor(frame / 0.5);
const textToShow = dataTitre.slice(0, charsShown);
return (
<div>
<AbsoluteFill>
<div
style={{
position:'absolute',
top:topGen + (540-(350/2)),
left: leftGen + ((1920/2)-(1150/2)),
width:1150,
height: 350,
textAlign: "center",
alignItems: "center",
fontSize: 95,
fontFamily: 'Montserrat',
fontWeight: 500,
lineHeight: "116px",
color: color.blanc,
}}>
{textToShow}
</div>
</AbsoluteFill>
</div>
);
};