Capítulo 906 de 988
<MotionBlur> and <Trail>The <Trail> and <CameraMotionBlur> components manipulate the React context that holds the current time. This means that the motion blur effect doesn't work if you use the useCurrentFrame() hook outside of a motion blur component.
export const MyComp = () => {
const frame = useCurrentFrame();
return (
<AbsoluteFill>
<CameraMotionBlur>
<AbsoluteFill
style={{
backgroundColor: 'red',
justifyContent: 'center',
alignItems: 'center',
color: 'white',
fontSize: frame,
}}
>
A
</AbsoluteFill>
</CameraMotionBlur>
</AbsoluteFill>
);
};
<MotionBlur> and <Trail> from the official docs.<MotionBlur> and <Trail>.