diff --git a/voicevox-remotion-template/src/yukkuri-composition.tsx b/voicevox-remotion-template/src/yukkuri-composition.tsx index afdb513..af866c6 100644 --- a/voicevox-remotion-template/src/yukkuri-composition.tsx +++ b/voicevox-remotion-template/src/yukkuri-composition.tsx @@ -75,9 +75,14 @@ return activeSegment; }; +const clampInterpolation = { + extrapolateLeft: "clamp", + extrapolateRight: "clamp", +} as const; + const Title: React.FC> = ({progress}) => { - const opacity = interpolate(progress, [0, 1], [0, 1]); - const translateY = interpolate(progress, [0, 1], [-30, 0]); + const opacity = interpolate(progress, [0, 1], [0, 1], clampInterpolation); + const translateY = interpolate(progress, [0, 1], [-30, 0], clampInterpolation); return (
> = ({text, progress, speakerName, accentColor = "#1f2a44"}) => { - const opacity = interpolate(progress, [0, 1], [0, 1]); - const translateY = interpolate(progress, [0, 1], [16, 0]); + const opacity = interpolate(progress, [0, 1], [0, 1], clampInterpolation); + const translateY = interpolate(progress, [0, 1], [16, 0], clampInterpolation); return (